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

🙀 Image field naming & new img_url helper #8364

Merged
merged 5 commits into from
Apr 24, 2017

Conversation

kirrg001
Copy link
Contributor

@kirrg001 kirrg001 commented Apr 19, 2017

refs #8348

I have to finish all sub tasks in one PR, because they are related. Each sub tasks get's a commit.
e.g. if i change the schema, the meta helper won't work anymore.

You can use the new img_url helper everywhere.

{{img_url post.feature_image}}
{{img_url @blog.cover_image}}

If the target url path is null, nothing happens - the helper just returns.
If the target url is undefined e.g. {{img_url}} -> an error is thrown.


TODO list

@kirrg001 kirrg001 force-pushed the 1.0.0-dev/image-refactoring branch 2 times, most recently from bbb2421 to dc5da7a Compare April 19, 2017 20:42
@kirrg001 kirrg001 changed the title [WIP] 🙀 Image field naming & new img_url helper 🙀 Image field naming & new img_url helper Apr 24, 2017
@kirrg001 kirrg001 requested a review from aileen April 24, 2017 11:21
Copy link
Member

@aileen aileen left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Things I've tested:

  • image uploads and usage everywhere
  • usage of {{img_url}} helper in theme
  • import and export of data

- rename user/post/tag images
- contains all the required changes from the schema change
- rename cover to cover_image
- also rename default settings to match the pattern
- rename image to profile_image for user
- rename image to feature_image for tags/posts
- rename
- change the functionality
- attr is required
- e.g. {{img_url feature_image}}
- update yarn.lock
@kirrg001 kirrg001 force-pushed the 1.0.0-dev/image-refactoring branch from 70decfc to a3718bc Compare April 24, 2017 16:07
@kevinansfield kevinansfield merged commit 76bd4fd into TryGhost:master Apr 24, 2017
@kevinansfield kevinansfield deleted the 1.0.0-dev/image-refactoring branch April 24, 2017 17:21
kevinansfield pushed a commit to TryGhost/Admin that referenced this pull request Apr 24, 2017
refs TryGhost/Ghost#8348, requires TryGhost/Ghost#8364
- rename all image properties
- e.g. author.image --> author.profile_image
- test all image functionality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants