fix(Quick Reblog): restore AlreadyReblogged tick in new post footer variants #1852
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Updates Quick Reblog to restore the AlreadyReblogged tick on already-reblogged posts' reblog buttons when the user has one of the two new 2025 post footer variants, via
mask-imagemagic that I stole from my past self (the new post header's avatar component uses this to display cut-outs for badges/sub-avatars too).The magic numbers for how the mask works is... part science, part magic. The first two magic numbers are the ellipsis dimensions, which should match the tick's bounding box dimensions. The positional magic numbers are... kind of just whatever worked? To figure out how to get a perfect overlap, I temporarily added
background-color: redto the masked SVG element andbackground-color: blueto the tick pseudo-element. Then, I just played with the position until they fit into each other perfectly. For the "single action" reblog button variant, the numbers make sense, the position values for the tick and the mask being identical; for the other new variant, the numbers are backwards for some reason. 🤷♀️This is all done in pure CSS, dropping the CSS map calls introduced in #1847, thanks to the observation that there are now only three reblog button variants:
footer a[href^="/reblog/"]:has(use[href="#managed-icon__reblog"])—the pre-redesign reblog buttonfooter a[href^="/reblog/"]:has(use[href="#managed-icon__ds-reblog-24"])—the "split notes count" reblog buttonfooter button:has(use[href="#managed-icon__ds-reblog-24"])—the "single action" reblog buttonNone of these selectors should target anything in the notes view; only the pre-redesign notes view has a reblog icon, and it's not part of a link. When combining these selectors to target all of them in one go, the
buttonselector part must be swapped out forbutton:not([role])so as not to target thebutton[role="tab"]containing the old reblog icon in the pre-redesign notes view.Oh, and this removes the outdated CSS that changes the tick position on mobile-sized viewports. Now that we're putting the tick on the reblog anchor/button directly, instead of the control button container, the difference in the container size on mobile doesn't affect us anymore. In fact, in attempting to still account for it, the tick just goes in the wrong corner.
Testing steps
postFooterSplitNotesCountpostFooterSplitNotesCountSingleAction