feat(tech-insights-maturity): add groupBy and categoryOrder props to MaturityScorePage#8969
Conversation
Changed Packages
|
There was a problem hiding this comment.
Pull request overview
Adds configurable grouping to the MaturityScorePage in the tech-insights maturity plugin, allowing consumers to group maturity checks by either built-in rank tiers or custom metadata.category values.
Changes:
- Introduces
MaturityScorePagePropswithgroupByandcategoryOrder, and exports them via the package public API. - Updates the check table rendering to support category-grouped accordions with status chips.
- Adds tests for category grouping +
categoryOrder, updates API report, and includes a changeset.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
workspaces/tech-insights/plugins/tech-insights-maturity/src/components/MaturityScorePage/MaturityScorePage.tsx |
Adds groupBy/categoryOrder props and category-based grouping logic |
workspaces/tech-insights/plugins/tech-insights-maturity/src/components/MaturityScorePage/maturityTableRows.tsx |
Supports category headers via Chip and updated expansion logic |
workspaces/tech-insights/plugins/tech-insights-maturity/src/components/MaturityScorePage/MaturityScorePage.test.tsx |
Adds tests for category grouping and ordering |
workspaces/tech-insights/plugins/tech-insights-maturity/src/index.ts |
Exports MaturityScorePage + MaturityScorePageProps from package entrypoint |
workspaces/tech-insights/plugins/tech-insights-maturity/src/components/MaturityScorePage/index.ts |
Re-exports MaturityScorePageProps from component barrel |
workspaces/tech-insights/plugins/tech-insights-maturity/report.api.md |
API report updated for new exports |
workspaces/tech-insights/.changeset/add-category-grouping.md |
Minor changeset for new props |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5a573dd to
5ec9ed4
Compare
5ec9ed4 to
4475fe1
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4475fe1 to
b286329
Compare
b286329 to
d5c963d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d5c963d to
dc185a6
Compare
…MaturityScorePage Add configurable grouping mode to MaturityScorePage component: - groupBy='rank' (default): groups by Bronze/Silver/Gold tiers (unchanged behavior) - groupBy='category': groups by check metadata.category - categoryOrder: optional ordered list of category names This allows adopters to organize maturity checks by custom categories rather than the built-in rank tiers, without breaking existing usage. Changes: - MaturityScorePage: accept MaturityScorePageProps with groupBy/categoryOrder - maturityTableRows: support both rank-based and category-based accordion headers - Export MaturityScorePage and MaturityScorePageProps from package index - Add tests for category grouping mode and categoryOrder ordering Signed-off-by: joao-m-ferreira <joao.m.n.ferreira@gmail.com>
dc185a6 to
ed84c3a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| By default, the Maturity Scorecards page groups checks by rank tier (Bronze / Silver / Gold). You can switch to category-based grouping using the `groupBy` prop: | ||
|
|
||
| ```tsx | ||
| <EntityMaturityScorecardContent groupBy="category" /> | ||
| ``` |
What
Add configurable grouping mode to
MaturityScorePagecomponent via newgroupByandcategoryOrderprops.New props on
MaturityScorePagegroupBy'rank' | 'category''rank'categoryOrderstring[]undefinedBehavior
groupBy='rank'(default): Groups by Bronze / Silver / Gold tiers — identical to current behaviorgroupBy='category': Groups bymetadata.categoryon each check. Categories with failing checks auto-expand. Headers show coloredChipcomponents (green for all-passing, default for failing).Why
The current
MaturityScorePageonly supports rank-based grouping (Bronze/Silver/Gold). Adopters who define maturity checks across custom categories (e.g., Security, Documentation, Operations) have no way to group by those categories in the UI.This is a common need — maturity models often organize around pillars/domains rather than rank tiers.
How
MaturityScorePage.tsx: AddedMaturityScorePagePropsinterface. WhengroupBy='category', iterates unique categories (respectingcategoryOrderif provided) instead of hardcoded rank tiers. DeduplicatescategoryOrderentries viaSet.maturityTableRows.tsx:Propsis a discriminated union (rank mode vs category mode). Expand logic and header chip rendering are conditional on which prop is provided. Category chips includedata-testidfor stable test targeting.index.ts/src/index.ts: ExportMaturityScorePageandMaturityScorePagePropsfrom package public API.report.api.md: Updated API report with new exports.README.md: Added documentation section for category grouping with usage examples and props table.Testing
groupBy='category'categoryOrdercontrols chip orderingcategoryOrderentriesChecklist
@publicTSDoc on new interfacedata-testidselectorscategoryOrderdeduplicates input