-
Notifications
You must be signed in to change notification settings - Fork 2k
Dashboard v2: Add SummaryButtonList
and SectionHeader
components
#103555
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
base: trunk
Are you sure you want to change the base?
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~182 bytes added 📈 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~32 bytes added 📈 [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. |
9cba517
to
37cf3c1
Compare
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
A quick test shows me this, is that the component in question? Very nice animation, by the way. Speaking of breadcrumbs, I do wonder if for the hosting dashboard we should adopt the simpler "Back" button rather than breadcrumbs here. It seems like a simpler in/out flow, and would likely address the main feedback. We'd still want to explore the breadcrumb in context of more complex settings, but curious what you think, @matt-west @jameskoster. As for the implementation, it looks close: ![]() Storybook shows me this: That also looks fairly solid. Just to be sure, this is a separate thing, a Subheading, yes? ![]() |
Yes. You can test it better in storybook.
@jasmussen I'm not sure what you mean by Subheading but your last screenshot is the ActionsList component. |
In this example, I mean "Actions" and "Danger zone": ![]() Note that there's a recent change to the main heading design of the summarylist, that we're discussing. Previously the heading wasn't part of the button list, but sat above it, just like the above example. I don't have a strong opinion, just want to make sure it was intentional, CC: @matt-west @jameskoster |
I’d consider that a nice-to-have. The workaround is pretty easy if we don’t want to complicate the main component with that logic. |
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.
Thanks @ntsekouras! I noticed a couple things testing this in Storybook.
There’s a double border at the bottom of the empty state example.

The dividers between SummaryButtons appear to be a box-shadow that a regular border. Is that intentional?

This combined with the border-radius that’s still applied to SummaryButtons within the list make it look like there’s a gap between the dividers and the left/right borders of the container.

@jameskoster is this component supposed to support any component or it should internally have
That is part SummaryButton and was polishing made by Jay. We should polish some styles to both SummaryButton and SummaryButtonList like this one. As I mention in the description we should definitely look at these too:
|
@ntsekouras we have a few components that share the same format; a Header and some content inside a Card. The example screenshot demonstrates the DataFormFields component, but SummaryButtonList follows the convention: SummaryButtonList should only have internal SummaryButtons. Apologies for the confusion. |
37cf3c1
to
0134682
Compare
For the header, ideally I think we'd create and use an instance of DS-199 for consistency. If that's out of scope for the PR then I'd suggest we use consistent heading sizes in both the medium and low density variants. That's Otherwise can we update the spacing to match the |
In the low density variant the gap between the header section and the list of SummaryButtons should be |
Another small oversight in the medium density Making the shadow inset also means we can remove the Related to this, the medium density |
<CardHeader>{ header }</CardHeader> | ||
<VStack | ||
spacing="1px" | ||
className="client-dashboard-components-summary-button-list__children-container" |
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.
Those long classnames are giving me headaches 😅 Is this some remnant of abiding wpcalypso/jsx-classname-namespace
? Should we keep them shorter?
SummaryButtonList
componentSummaryButtonList
and SectionHeader
components
Resolves: DS-207
Resolves: DS-199
This PR adds a
SummaryButtonList
first in the dashboard and not directly in '@automattic/components'. It also updates the site settings page of the dashboard v2 to use these.After some feedback in this PR, I'm also adding
SectionHeader
component and I'm keepingPageHeader
component as a thin wrapper for now, mostly for semantic clarity and make consumption a bit easier by not passinglevel
etc..This PR needs design input and polishing. At least:
low and medium
densitiesmedium
density between header and the children.SectionHeader
based on thelevel
, such as decoration styles, etc..Testing Instructions
yarn storybook:start
v2
go to a site's settings pagePre-merge Checklist