Repository navigation
feat(follow): size the confirmation notice to its text - #349
Closed
thomasguillot wants to merge 1 commit into
Closed
thomasguillot wants to merge 1 commit into
thomasguillot wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Closing: Newspack UI keeps snackbars at a fixed width, like Sonner, so there's no fit option to pass. |
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.
"Alerts on" sat in a full-width box, which looked oversized for two words.
What changes
The Follow Coverage button now asks Newspack UI to size its confirmation notice to its text. It takes effect once sites run the newspack-plugin release that adds the option (DSGNEWS-299). Older Newspack UI versions ignore it, so nothing breaks in the meantime.
With this change:
Ref DSGNEWS-299.
How to test
Technical details
getSnackbar()insrc/blocks/shared/snackbar.tsaccepts an optional thirdoptionsargument and passes it tocreateNoticeonly when set, so the Share block's calls are unchanged.confirmToggle()callsshowSnackbar( full, 'success', { fit: true } ). Error snackbars don't pass it.{ fit: true }on the on and off confirmations; the existing error assertions already fail if a third argument is passed.npm run build,npm test,npm run typecheckandnpm run lint:js.