Repository navigation
UI: Rename components/ui to system-components and group imports - #72349
Merged
ryanahamilton merged 4 commits intoAug 31, 2026
Merged
Conversation
The directory holds the project's customized Chakra primitives — its design system — but sitting under components/ it read as just another components subfolder, to the point that AGENTS.md needed a line telling contributors not to put generic app components there. Promoting it to a top-level directory makes that boundary structural rather than documented.
Nothing imports it and it was never re-exported from the barrel, so it has been dead since it was added. Chakra's Tag is available directly for anyone who needs one.
Five components were reachable only by deep path, so files needing one of them ended up importing the design system twice — once from the barrel and once from a subpath. Completing the barrel lets every consumer use a single import, and callers no longer need to know which file a component lives in. Menu and Modal keep sibling-relative imports rather than going through the barrel, which would make the barrel depend on its own members.
Import blocks previously collapsed the design system, pages, components and every other src layer into one undifferentiated block, so a file's dependencies gave no sense of which layers it actually reached into. Splitting them into blank-line-separated groups makes that legible at a glance, and makes a layering violation visible in review. Ordering stays with the existing Prettier plugin rather than moving to an ESLint rule: the prek hook runs eslint --fix before prettier --write, so an ESLint rule would be overwritten on disk and leave lint unfixable.
ryanahamilton
marked this pull request as ready for review
August 31, 2026 20:51
ryanahamilton
requested review from
bbovenzi,
choo121600,
guan404ming,
pierrejeambrun,
shubhamraj-git and
vatsrahul1001
as code owners
August 31, 2026 20:51
bbovenzi
approved these changes
Aug 31, 2026
bbovenzi
left a comment
Contributor
There was a problem hiding this comment.
We should make sure we update the react_plugin_template and edge3 plugin too
Contributor
|
Or maybe we finally do our own local npm package |
Contributor
Author
Yeah, I'll look into this as a follow-up. A shared package might be the ideal solution. |
1 task done
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.
src/components/ui/holds the UI's customized Chakra primitives — its design system — but sitting undercomponents/it read as just another components subfolder, to the point thatAGENTS.mdneeded a line telling contributors not to put generic app components there. This promotes it to a top-levelsrc/system-components/so that boundary is structural rather than documented.Four commits, each independently green so the history bisects cleanly:
components/uitosystem-components— the move plus every importer. All access forms collapse tosrc/system-components: the barrel, deep paths, and the relative variants (./ui,../ui,../../ui) that already violated the documented alias convention.Tagsystem component — nothing imported it and it was never re-exported from the barrel, so it had been dead since it was added.ActionBar,NumberInput,RadioCard,ResizableWrapper,SegmentedControl) were reachable only by deep path, so files needing one ended up importing the design system twice. Completing the barrel lets every consumer use a single import and stops callers needing to know which file a component lives in. There are now no deepsrc/system-components/*imports left.srclayer into one undifferentiated block, so a file's dependencies gave no sense of which layers it reached into. They are now blank-line-separated groups: react → external →openapi→system-components→layouts→pages→components→ remainingsrc→ relative.Ordering stays with the existing
@trivago/prettier-plugin-sort-importsrather than moving to an ESLint rule. Two reasons:eslint-plugin-importcaps its ESLint peer at^9while this repo is on ESLint 10, and thets-compile-lint-uiprek hook runseslint --fixbeforeprettier --write, so an ESLint ordering rule would be overwritten on disk and leavepnpm lintfailing with no possible fix. There is a comment inrules/perfectionist.jsrecording that, sosort-importsis not enabled later by mistake.No functional change — the diff is a directory move, import specifiers, and import ordering.
pnpm lint(ESLint +tsc),prettier --check,pnpm buildand the full test suite (1140 tests) pass, and thets-compile-lint-uiprek hook is clean.Was generative AI tooling used to co-author this PR?