-
Notifications
You must be signed in to change notification settings - Fork 93
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
add support for quoted tweets #117
Conversation
packages/react-tweet/src/twitter-theme/tweet-author-verified-badge.tsx
Outdated
Show resolved
Hide resolved
const getSkeletonStyle = (media: MediaDetails, itemCount: number) => { | ||
let paddingBottom = 100 // default of 1x1 | ||
|
||
// if we have 2 items, use 8x9 | ||
if (itemCount === 2) paddingBottom = 112.5 | ||
|
||
return { | ||
width: media.type === 'photo' ? undefined : 'unset', | ||
paddingBottom: `${paddingBottom}%`, | ||
} | ||
} |
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 might be missing something, but I wouldn't think that this getSkeletonStyle
method would need to differ at all from the one used in tweet-media.tsx
. The layout of media should have the same layout as a normal tweet.
That makes me then wonder why we need a separate tweet-quoted-tweet-media.tsx
at all? The minor styling differences might be able to be accounted for in the main media component.
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.
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.
Also its behaviour with 4 images is weird, I can leave it as it is for the moment and open another issue for aligning its behaviour with twitter one.
@tywayne just updated |
Could we see some examples to validate it's working? |
} | ||
switch (user.verified_type) { | ||
case 'Government': | ||
icon = <VerifiedGovernment /> |
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'll probably want to do X Verified Businesses at some point, where it shows the affiliate logos
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.
Seems good, will defer to @lfades for final call
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.
Tested it out locally and looks good. Thank you!
Add support for quoted tweets.
Fixes #111