Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: profile and cover photos #2722

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

adrianthedev
Copy link
Collaborator

@adrianthedev adrianthedev commented Apr 25, 2024

Description

Adds a cover and profile photo to the show view of the record.

CleanShot 2024-04-25 at 11 46 47@2x

Todo:

  • Add cover images to the index/edit page
  • add support for plain paths (interpolated with the record data) (Paul's suggestion)

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

Screenshots & recording

Manual review steps

  1. Step 1
  2. Step 2

Manual reviewer: please leave a comment with output from the test if that's the case.

@adrianthedev adrianthedev reopened this Apr 28, 2024
Copy link

codeclimate bot commented Apr 28, 2024

Code Climate has analyzed commit c161264 and detected 0 issues on this pull request.

View more on Code Climate.

@adrianthedev adrianthedev marked this pull request as ready for review May 2, 2024 15:05
Copy link
Contributor

@Paul-Bob Paul-Bob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great!

I have one concern about the way to declare the cover/photo components. IMO it should not rely on existing fields, and pass the photo URL directly on the API like grid view cover.

Pros:

  • Any image can be used even an external URL
  • Custom path helpers can be used to get the image URL
  • No need of field declaration if user don't want to have that fields.
self.cover_photo = -> do
  {
    # size: :sm,
    source: main_app.url_for(record.cover_photo.url)
  }
end

@adrianthedev
Copy link
Collaborator Author

yup! makes sense!
Thanks for the review!

Copy link
Contributor

This PR has been marked as stale because there was no activity for the past 15 days.

@github-actions github-actions bot added the Stale label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants