-
Notifications
You must be signed in to change notification settings - Fork 22
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
Shows default image in the frontend #91
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also drop the default image: api/base/default.png
and the management command folder: api/base/management
. We are not using them anymore
showRecipeImageThumb: function() { | ||
if (this.props.data.photo_thumbnail) { | ||
return ( | ||
<img className="img-responsive" src={ this.props.data.photo_thumbnail } /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also show the default image here as well. Just doesn't look as good without it, IMO.
id: 'recipe.photo_placeholder', | ||
description: 'Photo placeholder', | ||
defaultMessage: 'Generic placeholder thumbnail' | ||
} | ||
}); | ||
|
||
return ( | ||
<div className="recipe-details"> | ||
<h1 className="title hidden-xs">{this.props.data.title}</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we only show this header if there is an Image? Looks weird to have it twice so quickly. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, but now that I've had a good look, I'm not convinced the current layout makes a lot of sense. If the image exists, we show the image twice, which looks kinda weird. And if there is no image, then we show the title of the recipe in a different place and a useless placeholder. I feel like we should either just show the large image first and no first header or thumbnail. Or just the thumbnail (with a placeholder if no image) and have the green title always be the header. Or maybe the large image appears under the green title?
I'm going to remove the first title if the image doesn't exist for the time being, and we can open a separate issue to see if we can improve this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm by no means a UX/UI expert. If you have some ideas, I'd love to see them
c55a317
to
78be059
Compare
78be059
to
0d55c5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still seeing the default image in the api api/base/default.png
. I'm not 100% sure of the license for that, we should drop it.
Otherwise LGTM!
Good point, deleted! |
Maybe I'm crazy but I'm not seeing the image as deleted. Did you forget to push a commit? |
adc6c16
to
8a47dc9
Compare
Not crazy, I'm a moron. Commit pushed for reals this time. |
Because finding a new logo image is outside of the scope of this PR I've just created a placeholder for the time being.
Fixes #82.