-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Split GifEmbed props #5615
Split GifEmbed props #5615
Conversation
link={link} | ||
thumb={link.thumb} | ||
altText={altText} | ||
isPreferredAltText={true} |
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.
Note these can just be altText
and true
now because we're always passing down the "preferred" version. (In any case they don't really matter because it's a preview and has hideAlt
. Arguably maybe it shouldn't get any alt at all.)
|
Until I just saw this, I was under the mistaken impression that GIFs that didn't display the ALT badge didn't have alt in DOM, so it's good to know that they actually do. Given that this might be confusing other people too (see #4918), is it planned as part of your refactor to show the badge for GIFs with implicit ALT too? I think this would be helpful and less confusing for users. |
This PR is really a drive-by refactor for unrelated things I'm working on so I'm not taking a super close look at how it behaves.
With the behavior currently in main, it won't show the badge until you open the "alt" popup, but once you do (and close it), that alt will be considered explicit. Which is slightly confusing in a different way but probably ok. |
Meh I'll just roll it all into one PR. |
Ah fair enough 👍
Yeah the behavior on main is a big improvement over 1.91.1. |
This would help me in an upcoming refactor. Just splitting the props so it doesn't always accept the whole
link
object.Test Plan
Verify GIFs with explicit ALT and implicit ALT still show up (and both have alt in DOM, but only explicit one shows badge).
Verify editor still works.