Repository navigation
chore(tasks): add a shared component analysis report - #6986
poluru-labs wants to merge 6 commits into
Conversation
…ist from packages folder and stored in reports folder
|
Hi @poluru-labs — thanks for your contribution! There is one thing that may be holding this up: for security reasons, USWDS requires that all commits to this repo have a verified commit. The following commit(s) on this PR aren't verified:
Here's what's needed:
Please let us know if you have any questions. We appreciate your help here. This comment will update automatically once your commits are verified. |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Accessibility Verification Declared | The check applies because the new report adds ARIA attributes, tabindex, skip navigation, accordion buttons, filter-button state updates, and interactive filtering. The PR description does not name … |
Add a test matrix to the PR description. Name each assistive technology and browser combination used, and state what was verified for: skip-link navigation; accordion expand/collapse and focus; filter-button aria-pressed state; search and… |
✅ Passed checks (9 passed)
-
Check name Status Explanation Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. Breaking Change Declared ✅ Passed The description contains exactly one template statement: "This is not a breaking change." The reviewed diff changes only .gitignore,package.json,package-lock.json, and adds `tasks/shared-compo…No New Runtime Dependency ✅ Passed package.jsonkeeps the samedependenciesfield: onlylit: 3.3.3is present at both base and head. The PR changes no files underpackages/**/src/**, so it introduces no new production JavaScrip…Regression Test Targets The Change ✅ Passed PASS: The authoritative PR diff changes only .gitignore,package.json,package-lock.json, and addstasks/shared-components.js. It does not change production JavaScript under `packages/**/src/*…New Api Surface Follow-Ups ✅ Passed PASS: The check is not applicable. The authoritative diff changes only .gitignore, package metadata, and the new local report task; it adds no$theme-*setting, public Sass mixin/function, Sass so…Theme Token Discipline ✅ Passed PASS. The authoritative pull-request diff changes only .gitignore,package-lock.json,package.json, andtasks/shared-components.js. It changes no*.scssfile underpackages/, so the theme-…Title check ✅ Passed The title follows the required Conventional Commit format with the lowercase type "chore", scope "tasks", colon, and concise description. It accurately describes the added shared component analysis re… Description check ✅ Passed The description clearly explains the new npm script, dependency scanning task, generated report, output location, implementation, limitations, and testing steps. It is directly related to the changese…
Full details: Accessibility Verification Declared
-
Explanation
The check applies because the new report adds ARIA attributes,
tabindex, skip navigation, accordion buttons, filter-button state updates, and interactive filtering. The PR description does not name any assistive technology or browser combinations, and the checklist sub-item remains blank. It also does not state what was verified for those combinations.Resolution
Add a test matrix to the PR description. Name each assistive technology and browser combination used, and state what was verified for: skip-link navigation; accordion expand/collapse and focus; filter-button
aria-pressedstate; search and filter updates; table keyboard access and scrolling; hidden table rows; and the search label and landmark associations. Do not leave the physical-device and assistive-technology checklist entry blank.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Please review this PR when you all get a time. |
Summary
Added npm run shared:components, which scans every directory under packages/ and writes a USWDS-styled HTML report to reports/shared-components.html. Maintainers can see which packages are reused, by whom, and through which Sass, JS, or Twig paths before changing a shared package.
Breaking change
This is not a breaking change.
Related issue
N/A
Related pull requests
None. This is a local analysis task and does not require a documentation-site update or changelog entry on uswds-site.
Preview link
Preview link:
Preview link: generate locally, then open the file
npm run shared:components open reports/shared-components.htmlThe HTML is written to reports/ and is gitignored, so there is no hosted demo on this PR.
Problem statement
Desired state: Maintainers can list every package under packages/ and see how those packages depend on and reuse one another — lines of source, UI-component uses, reused by, depends on, and used in — in one report.
Actual state: Package folders and Storybook show each component in isolation. They do not show Sass @forward, JS require/import, or Twig @components/ composition across the library.
Consequences: Changing a widely reused package (for example usa-icon, usa-input, or usa-button) has an unclear blast radius. Aggregators such as uswds and uswds-form-controls make it look as if every component is “shared,” which hides real UI-to-UI composition.
Solution
A Node task, tasks/shared-components.js, walks packages/, builds a dependency graph, and writes reports/shared-components.html.
What it does
Why this approach
How it is implemented
Limitations
Major changes
AI disclosure
What AI tools did you use to create this MR?
Author's checklist
Testing and review
npm run shared:componentsConfirm the log reports 25 shared UI components across 88 packages and Wrote reports/shared-components.html.Feedback that would help: whether uses should stay UI-to-UI only, whether reports/ is the right output path, and whether this task should stay a standalone npm script or be wired into gulp.