WebUI - Layout folder should be inside Component folder because It encloses a component responsible for building the header presented in all pages

Timeline

Cláudio Silva (claudioantonio) opened

My suggestion is: /layout - only react reusable components (UI) with no GQL involved. /components - Only reusable components with GQL involved. Each component in its own folder to group tsx file and the corresponding gql file.

IMHO this suggestion will communicate fast and clear where each type of artefact must be stored.

Michael Muré (MichaelMure) commented

If that make sense for you, sure!

Cláudio Silva (claudioantonio) commented

I reviewed this code and now understand. The folder /layout, in fact, should be in /component/layout because It encloses a component called Layout to define the header of webui pages. The Layout component is referenced only by App.tsx.

Inside /layout we have IfLoggedIn component but this component is not used exclusively by Layout component, so It should be in its own folder inside /component (/component/IfLoggedIn).

This way things become more clear and quickly communicates a pattern for every new developer in the project.

Cláudio Silva (claudioantonio) changed the title from WebUI - Layout folder should be inside Component folder because It encloses a component responsible for building the header presented in all pages to WebUI - Layout folder should be inside Component folder because It encloses a component responsible for building the header presented in all pages

Michael Muré (MichaelMure) closed the bug