[refactor] move tests back to test/ and move components to flat directory#465
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
|
fyi @platypii (merging because I think you won't disagree). |
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.
Before, tests were mixed between test/ and src/ which was confusing.