feature-sliced / documentation

🍰 Architectural methodology for frontend projects
https://feature-sliced.design
MIT License
1.5k stars 159 forks source link

feat: add new sample #634

Closed paghar closed 9 months ago

paghar commented 11 months ago

Volt React Dashboard-FSD It features over 100 UI elements, plugins, and example-based built with React components.

netlify[bot] commented 11 months ago

Deploy request for pr-fsd rejected.

Name Link
Latest commit 6c3db4167eb6ca00d4d36cdcd10141f8af75ab3e
paghar commented 10 months ago

@illright Hi, Many thanks for your response.

I will change the structure to follow the rules shortly! Just wanted to know, If I remove the entities layer or rename it to something like presentation would that be OK just for that part?

illright commented 10 months ago

I wouldn't recommend renaming entities to presentation because FSD layer names are standardized.

This project is a very unusual case, something that I haven't seen other people build with FSD. Usually people use FSD to build websites that are intended for regular people, not other developers.

I would suggest to put everything in Widgets and Pages, maybe with a little bit of Shared, because the business domain in this application is very small, not substantial enough for layers Entities and Features.

paghar commented 10 months ago

I wouldn't recommend renaming entities to presentation because FSD layer names are standardized.

This project is a very unusual case, something that I haven't seen other people build with FSD. Usually people use FSD to build websites that are intended for regular people, not other developers.

I would suggest to put everything in Widgets and Pages, maybe with a little bit of Shared, because the business domain in this application is very small, not substantial enough for layers Entities and Features.

Is there any chance to add this project to the FSD examples in the community?

illright commented 10 months ago

Of course, but only after all the structural FSD issues are resolved.

Currently, I still don't see the division to slices and segments, only layers with files inside of them. Let me know if any FSD concepts are unclear

paghar commented 10 months ago

Of course, but only after all the structural FSD issues are resolved.

Currently, I still don't see the division to slices and segments, only layers with files inside of them. Let me know if any FSD concepts are unclear

Slices and Segments are now implemented please take a look https://github.com/paghar/volt-react-FSD/

as there is no API in this example and it is only presentation oriented, there is only on UI segment available. please let me know if there are more stuff to fix, Thank you.

illright commented 9 months ago

There are still some structural issues, for example:

  1. There are forbidden imports from layers above, like how src/widgets/Navbar/ui/index.tsx imports from the App layer.
  2. There are cross-imports between slices on the Pages layer, and generally the division by slice is a bit hard to see, especially with the pages/routes folder.

I actually think that there is a larger issue with this project, namely, that I don't see the value that Feature-Sliced Design brings to this project. As I'm browsing through the files, I find the FSD structure creates more obstruction and overhead than it does benefit. The question I wonder when I'm looking at this project is "Why does this project use Feature-Sliced Design?". As it stands, I wouldn't want to add this project to the FSD examples, because I don't think it's representative of FSD or that it has something to teach to the people looking at examples.

I will close this PR. If you have any further questions, let me know.