google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.23k stars 286 forks source link

Create `ChipTabGroup` component #9378

Open zutigrm opened 1 week ago

zutigrm commented 1 week ago

Feature Description

New ChipTabGroup component should be implemented, to support the selection panel layout updates. Said component should handle group switching, and styles, but it will not contain the implementation of full metrics selection and lists. That will be handled in separate issue.

As part of this issue assets/js/components/SelectionPanel/SelectionPanelItems.js should be used as a starting point for creating a key metrics specific SelectionPanelItems which will be rendering the ChipTabGroup component instead of the current markdown. A new story for the said SelectionPanelItems should be added, to visually test and develop new component. It shouldn't replace the usage of generic SelectionPanelItems in this issue.

Basic group filtering should be implemented as part of this issue

Check New Metric Grouping Logic Within Sidebar/Selection Panel - Tabbed Functionality section and more particularly Implementation of tabbed containers and tab functionality sub-section of the design doc


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Add assets/js/components/KeyMetrics/ChipTabGroup/Chip.js

Add assets/js/components/KeyMetrics/ChipTabGroup/TabGroup.js

Add assets/js/components/KeyMetrics/ChipTabGroup/index.js

Add assets/js/components/KeyMetrics/SelectionPanelItems.js

Test Coverage

QA Brief

Changelog entry

eugene-manuilov commented 4 days ago

@zutigrm, could you please remove all technical details from AC and leave only requirements that the new component should match.

zutigrm commented 3 days ago

@eugene-manuilov AC updated. Thanks

eugene-manuilov commented 3 days ago

Great! Thanks, @zutigrm. AC ✔️