Skip to content

[refactor] move tests back to test/ and move components to flat directory#465

Merged
severo merged 1 commit into
masterfrom
simpler-code-structure
Mar 6, 2026
Merged

[refactor] move tests back to test/ and move components to flat directory#465
severo merged 1 commit into
masterfrom
simpler-code-structure

Conversation

@severo

@severo severo commented Mar 6, 2026

Copy link
Copy Markdown
Contributor
  • move component tests to test/
  • move components one level up (instead of one directory per component)
  • storybook stories to their own stories/ subdirectory.

Before, tests were mixed between test/ and src/ which was confusing.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This is a pure refactoring PR that reorganizes the project's file structure in three ways: moving component tests from src/ to test/, flattening the src/components/ directory (removing per-component subdirectories), and moving storybook stories to a dedicated stories/ directory.

Changes:

  • All component test files moved to test/components/ with updated import paths pointing to ../../src/...
  • Components previously in nested subdirectories (e.g., src/components/Cell/Cell.tsx) are now in a flat structure (e.g., src/components/Cell.tsx), with all intra-component imports updated accordingly
  • Storybook configuration and story files updated to reference the new stories/ directory

Reviewed changes

Copilot reviewed 24 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/components/*.test.tsx (10 files) Import paths updated to reference ../../src/... after moving tests from src/ to test/
src/components/Cell.tsx Import paths updated from ../../contexts/ to ../contexts/ etc. after flattening
src/components/ColumnHeader.tsx Import paths updated; now references sibling components via ./ instead of ../ComponentName/
src/components/ColumnMenu.tsx Import paths updated to ../contexts/ and ../helpers/
src/components/ColumnMenuButton.tsx Moved from subdirectory to flat structure (appears as new file)
src/components/ColumnResizer.tsx Moved from subdirectory to flat structure (appears as new file)
src/components/HighTable.tsx Import paths updated to ../helpers/, ../providers/, etc.
src/components/Row.tsx Moved from subdirectory to flat structure (appears as new file)
src/components/RowHeader.tsx Import paths updated to ../hooks/
src/components/Scroller.tsx Import paths updated to ../contexts/ and ../HighTable.module.css
src/components/Slice.tsx Import paths updated; component imports now use ./ prefix
src/components/TableCorner.tsx Import paths updated to ../contexts/ and ../hooks/
src/components/TableHeader.tsx Import paths updated to ../contexts/ and ./ColumnHeader.js
src/components/Wrapper.tsx Import paths updated to ../contexts/, ../hooks/, ../types.js
src/index.ts Entry point updated to reference flattened component paths
src/types.ts Updated import of CellContentProps to new flat path
stories/HighTable.stories.tsx Moved from src/ to stories/; import paths updated to ../src/...
.storybook/main.ts Stories glob updated from ../src/**/*.stories. to ../stories/**/*.stories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@severo

severo commented Mar 6, 2026

Copy link
Copy Markdown
Contributor Author

fyi @platypii (merging because I think you won't disagree).

@severo severo merged commit ad925c4 into master Mar 6, 2026
9 checks passed
@severo severo deleted the simpler-code-structure branch March 6, 2026 17:57
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