-
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
Home: Move notices to separate components #40299
Conversation
*/ | ||
import CelebrateNotice from '../celebrate-notice'; | ||
|
||
const SiteSetupCompleteCard = ( { displayChecklist } ) => { |
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.
Minor naming note for these. I think we'd probably call these banners or notices vs cards.
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.
Agree names are confusing, but decided to stick with a cards terminology for consistency reasons since we're aiming for an API that returns a layout of cards. Happy to rename them if rest of folks agree on a better name 🙂
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.
Excellent refactor @mmtr! I left a few minor notes but nothing blocking!
@gwwar Your screenshot shows a WordPress import ("content only"), not a WordPress migration ("import everything"). So, no banner should be shown on the Home page afterwards. |
dc3c00b
to
566e061
Compare
Yeah, I noted this too while testing locally but wasn't sure if it was a caching issue. Will investigate before landing. |
Pushed a commit adding a secondary text explaining the quick links if the checklist is completed:
Is the copy clear? cc @obi2020 for feedback. |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~3524 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. |
Turns out that CSS chunks are loaded in different order on page load. Without reloading, there was a CSS file overriding the desired margin ( But on page load, that CSS file was loaded with lower priority, leaving the header with the right margin: I handled this on 087518a by removing the sometimes overriding margin given it is actually not needed. |
Going to land this. We can open a follow-up PR if we want to change the "quick-links explanation" copy. |
Looks good @mmtr. I like that the styles are all consolidated to create a standardized pattern here. I'd like to follow up with maybe some custom illustrations so we don't overuse the fireworks. One question (also not blocking for this PR): thoughts on making these dismissible with the |
Yup, agree. Not sure how trivial would be that work (have a feeling we cannot reuse the existing dismissible card component straight away) but it definitely worths to take a look at it. |
Changes proposed in this Pull Request
Testing instructions