Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize file structure for common components #518

Open
taesungh opened this issue Dec 22, 2024 · 0 comments
Open

Reorganize file structure for common components #518

taesungh opened this issue Dec 22, 2024 · 0 comments

Comments

@taesungh
Copy link
Member

Noticed in #498 we have a apps/site/src/components directory which is mostly unused because currently components are stored in apps/site/src/lib/components instead. Conceptually, I see no reason to nest the components one level deeper, and it would be simpler to store them in the higher-up location. It is also mildly annoying to have this detachment because in the VS Code Source Control view, the changed files are listed alphabetically by path, and any modifications to the form components would be listed further away from changes to form pages in src/app when there are also changes to files in src/lib/admin.

This will require updating all of the corresponding imports which should make each of them slightly shorter as well. This does not have to happen all it once, and it would help to have a gradual migration in multiple phases. This would also be a good opportunity to further shorten the imports by adding index files with reexports, e.g.

import Button from "@/components/Button";

or

import { Button } from "@/components";

instead of

import Button from "@/lib/components/Button/Button";
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

No branches or pull requests

1 participant