Skip to content

react-component-layout: one file per region, folders per area, no line limits - #26

Merged
joeldickson merged 2 commits into
mainfrom
react-component-layout-one-file-one-region
Oct 1, 2026
Merged

joeldickson merged 2 commits into
mainfrom
react-component-layout-one-file-one-region

Conversation

@joeldickson

@joeldickson joeldickson commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Updates react-component-layout to replace line-count rules with structural ones.

  • One File, One Region: a file is named after one thing on screen and exports one component. Parts (a toggle, a label, an icon, a variant) stay with their region. A region (a row, panel, section, picker, anything another file needs, or a helper that composes other helpers) gets its own file. No files by kind (Cells.tsx, helpers.tsx).
  • Folders Follow the Screen: one folder per area under components/; shared components at the top (no shared/ or common/); a sub-folder only for a region with its own family; two levels at most; no one-file folders; folders named after the screen.
  • Keep the Component Tree Shallow: compose at the parent instead of chaining pass-through wrappers; siblings over chains; nothing split below a part.
  • No line limits: a long component that draws one region is fine; a short one that draws three is not.
  • Also adds the view-model section (push display formatting to the server).

Same text as agoda-com/dropmcp#43, where it is applied to the client. Docs-only change to the skill file.

dicko2 added 2 commits October 1, 2026 10:41
Drop the 60-80 and 15 line limits. A file names one thing on screen and
exports one component; parts stay with their region, regions (rows,
panels, sections, pickers, anything another file needs) get their own
file, and files grouped by kind (Cells, Rows, helpers) are buckets.
Also adds the view-model section from the canonical copy.
Same text as agoda-com/dropmcp#43.
…low.

Add two sections: one folder per area under components/, shared
components at the top (no shared/ or common/), a sub-folder only for a
region with its own family, two levels at most, no one-file folders,
folders named after the screen; and keep the component tree shallow by
composing at the parent instead of chaining pass-through wrappers.
@joeldickson joeldickson changed the title react-component-layout: replace line limits with one file, one region react-component-layout: one file per region, folders per area, no line limits Oct 1, 2026
@joeldickson
joeldickson merged commit e980338 into main Oct 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants