feat: add Comparison Table (v0) [WIP]#4820
Draft
ernst-dev wants to merge 2 commits into
Draft
Conversation
ernst-dev
had a problem deploying
to
allure-report
July 23, 2026 16:23 — with
GitHub Actions
Failure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
[WIP] First-cut (v0) of a Comparison Table component — tracking AWSUI-59913.
Comparison Table lets customers compare two or more entities (resources) side-by-side: attributes are rendered as rows, entities as columns, with a sticky attribute column and optional highlight-differences. The requesting teams on the ticket are Amazon RDS (already using a bespoke version), Redshift, and DynamoDB.
Approach
Rather than reimplement a data grid, v0 is a thin, opt-in composition over the existing
Tablecomponent (viaInternalTable), so it inherits Table's rendering, sticky-column, and accessibility machinery. The public component transformsattributes+entitiesinto TablecolumnDefinitions/items:isRowHeaderand pinned viastickyColumns={{ first: 1 }}.entity.data[attribute.id](or a per-attributerender).highlightDifferencescompares raw per-entity values (Object.is) and emphasizes cells in rows that are not identical across all entities.What's done in this v0 ✅
ComparisonTable(src/comparison-table/):index.tsx,internal.tsx,interfaces.ts,styles.scss.ComparisonTablePropswith full JSDoc —attributes,entities,attributeColumnHeader,stickyAttributeColumn(defaulttrue),highlightDifferences(defaultfalse),variant,ariaLabel, plusAttribute/Entitysub-interfaces.render, empty-state safe.findComparisonTable/findAllComparisonTables,findAttributeLabels,findHighlightedCells,findRows).pages/comparison-table/simple.page.tsx(toggles for highlight + sticky, plus an empty-state example).Remaining work / follow-ups 🚧 (out of scope for this v0)
highlightDifferencesusesObject.ison raw values; add a configurable comparator for objects/ReactNode.ariaLabelscoverage beyondtableLabel, RTL check.Related links, issue #, if available: AWSUI-59913 (Cloudscape contribution request: Comparison Table)
How has this been tested?
Local, Node v24.15.0:
eslint(touched files) — pass;stylelint(scss) — pass.gulp quick-build— pass.src/comparison-table— 8/8 pass.src/__tests__/functional-tests, which iterate every component incl. the new one: base-props, ssr, use-base-component, use-telemetry, naming-convention, outer-form-submit, test-utils) — 1843/1843 pass.gulp build(incl. static dev-pages compile) — pass.src/__tests__/snapshot-tests/documenter.test.ts) regenerated and re-verified — 98/98 pass.Reviewers can explore the component via the dev page
comparison-table/simpleafternpm run quick-build+npm start.Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
Security
checkSafeUrl. — N/A (no URL handling).Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.