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

Code guidelines #64

Open
HugoGresse opened this issue Aug 2, 2019 · 0 comments
Open

Code guidelines #64

HugoGresse opened this issue Aug 2, 2019 · 0 comments
Labels
tech Technical issue or improvement

Comments

@HugoGresse
Copy link
Owner

HugoGresse commented Aug 2, 2019

The whole codebase should be written in similar style and using the same components/library.

Styled Component

Styled Component should be used mostly for base component like button, generic layout reused outside of one specific pages.

Grid

Material UI Grid should be used for most basic layout. Styled component should be used if the target design is not possible using Grid or if the overhead is much lower (in term of code complexity/readability & verbosity)

MaterialUI / MUI

Material UI should be used only for layout parts & low design / generic element like checkboxes. Button for exemple is specific for OpenFeedback thus MUI buttons shouldn't be used. Plus it's design are different for admin & feedback pages.

File architecture

Features should be regrouped together inside the same folder. So reducers, selectors, components used for a given feature should live inside the same folder.

Common action or selector from the admin and the feedback pages should live inside the src/core

Common components for admin or feedback should live inside the components folder like src/admin/components/OFButton.js.

Because the design of the admin and the feedback are different, they should mostly don't share components.

About this

This is just a dump of my mind regarding the organisation of the project. Everyone can contribute to those guidelines to improve them. They may probably also evolve with the time.

@HugoGresse HugoGresse added the tech Technical issue or improvement label Aug 2, 2019
HugoGresse added a commit that referenced this issue Aug 5, 2019
* Remove all index.js except main one + rename actions to match `domain/action/status` nomenclature

* Rename selectors

* Hound review
@HugoGresse HugoGresse changed the title Uniform codebase Code guidelines Aug 5, 2019
@HugoGresse HugoGresse pinned this issue Aug 5, 2019
HugoGresse added a commit that referenced this issue Sep 19, 2019
* Remove all index.js except main one + rename actions to match `domain/action/status` nomenclature

* Rename selectors

* Hound review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech Technical issue or improvement
Projects
None yet
Development

No branches or pull requests

1 participant