Repository navigation
[6.x] Forms 2: Fade long condition summaries before the Preview button - #16160
Merged
Merged
Conversation
- Drop the always-on mask-image, so content that fits isn't faded - Fade the left end in right-to-left languages - Add --mask-start for a fully clear strip at the edge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 of the Problem
When an email or webhook's condition summary is too long for its row, it's cut off mid-pill, and the cut-off pill runs straight into the Preview button so the two blend together.
What this PR Does
Long summaries now fade out, finishing just before the Preview button. Short ones are left alone.
It uses the existing
st-mask-horizontal-overflowutility rather than measuring overflow in JS. That needed three small fixes to the utility:mask-imagefaded the last 1rem even when everything fitted. The summary is only as wide as its content, so every short summary would have had its last pill faded.--mask-startvariable leaves a clear strip at the edge, used here for the gap before Preview.The summary never scrolls, so it also sets
animation-range: 0 100%. With the utility's default range, a summary that only overflowed by a little (under about 24px) still got the hard cut.The utility's other users (Bard and Replicator set headers, the listing filters bar) only change when their content fits: they're no longer faded.
Before / After
How to Reproduce