-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Site Assembler: ensure only one snackbar notice is shown per unique action #78421
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~350 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
client/landing/stepper/declarative-flow/internals/steps-repository/pattern-assembler/index.tsx
Outdated
Show resolved
Hide resolved
699c045
to
fd4151c
Compare
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.
The UX LGTM 👍
Screen.Recording.2566-06-21.at.13.09.09.mov
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 and looks good to me 🎉
...ng/stepper/declarative-flow/internals/steps-repository/pattern-assembler/notices/notices.tsx
Outdated
Show resolved
Hide resolved
@fushar, tested again and looks ready to ship 👍 Screen.Recording.2566-06-22.at.16.20.02.movSome friendly reminders:
|
@miksansegundo Thanks for testing it again and the reminders 😄 shipping... 🚀 |
Fixes:
Proposed Changes
Currently, each action (add/replace/remove) in the pattern inserter in the Site Assembler flow triggers a snackbar notice in the bottom-right corner of the preview panel on the right. When we do many actions in a short time interval (e.g. trying out headers), this will generate noisy notices and somewhat block the preview.
This PR fixes this problem by only showing one notice per action (add/replace/remove). This is done by assigning the action itself as the ID of the notice, so that we can first remove the previous notice with the same ID before creating a new one.
Testing Instructions
/setup/with-theme-assembler/patternAssembler?siteSlug=<site slug>
.Block pattern ... replaced
notice is shown.Block pattern ... added
/Block pattern ...
removed` notice is shown (for each add/remove).Illustrative videos:
Screen.Capture.on.2023-06-20.at.15-20-41.mp4
Screen.Capture.on.2023-06-20.at.14-52-01.mp4
Pre-merge Checklist