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

Change folder structure in core #56

Open
MartinP460 opened this issue Mar 28, 2024 · 0 comments
Open

Change folder structure in core #56

MartinP460 opened this issue Mar 28, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@MartinP460
Copy link
Owner

MartinP460 commented Mar 28, 2024

Description

This is part 1 of changing the folder structure and in this issue changes should be made in the core project. Currently, there is no formal convention on folder structure and we would like to change that by adopting a feature-based structure.

Proposed solution

In the components directory in the core project, change the folder structure to a feature based structure. Remember to change the internal documentation in packages/core/README.md.

Additional context

A feature-based folder structure is a folder structure where components, types, utility functions, etc. related to a feature are encapsulated in their own folder. Keep in mind that we define the map, tooltip and zoompane components and all the areas as "features" in this case. Below is a shortened diagram showing how the file and folder structure should roughly look after the change.

components/
├── areas/
│   ├── municipalities/
│   │   ├── municipalities.data.ts
│   │   ├── index.tsx
│   │   └── ...
│   ├── regions
│   └── ...
├── map/
│   ├── map.types.ts
│   ├── map.test.tsx
│   ├── index.tsx
│   └── ...
├── tooltip
└── zoompane

Inside of each folder, the index.tsx file should be the component and the other files should named according to what they are, e.g. [name].types.ts or [name].test.ts for types and tests respectively.

@MartinP460 MartinP460 added the feature request New feature or request label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant