-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Reader Stream Refresh: add photo-only card #8843
Conversation
One minor issue is that I sometimes see a flash of the standard card whilst the photo-only card is loading. It's because the card hasn't received the |
We're going to be hiding the excerpts, right? |
@bluefuton As mentioned here: #8823 (comment)
|
Ah yes, we are indeed :) As of b995d5c the excerpt is hidden and the cards look like this: |
Changed up the background to use a linear gradient instead of the full overlay, which makes many cards look a fair bit better. No more muted colors! :) Also expanded the title. It was getting chopped at 50 characters, which felt way too short. Instead, dynamically truncate it using overflow and text-overflow along with an ellipsis on supported browsers. |
@jancavan woo, that's looking nice! |
@@ -96,7 +96,7 @@ export default class RefreshPostCard extends React.Component { | |||
const featuredImage = post.canonical_image; | |||
const isPhotoOnly = post.display_type & DisplayTypes.PHOTO_ONLY; | |||
const title = truncate( post.title, { | |||
length: isPhotoOnly ? 50 : 140, | |||
length: isPhotoOnly ? 500 : 140, |
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.
do we even need this now?
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.
If that's to truncate the post title in photo cards, then I don't think so since we're doing it in css.
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.
Dropped in 3d65c07.
I noticed this too. The excerpts have completely been removed in photo cards, but the post title still flashes using the default card's style: https://cloudup.com/cTNFfmXaXTc Example: http://calypso.dev:3000/read/feeds/23059853 (first post in stream) |
@jancavan the font color was needed because the ellipsis is black otherwise... |
I think the loading issue can be handled in a separate PR. We'll need to assign PHOTO_ONLY earlier i think. |
99b8f8c
to
3d65c07
Compare
Fixes #8518