Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Consolidate lib directories #141

Closed
agarwal opened this issue Mar 11, 2021 · 8 comments
Closed

Consolidate lib directories #141

agarwal opened this issue Mar 11, 2021 · 8 comments
Assignees

Comments

@agarwal
Copy link
Member

agarwal commented Mar 11, 2021

We have several directories with pure ReScript code (by "pure" I mean non-pages files): bindings, common, components, and layouts. It feels like too much categorization. I think we could simplify this into a single directory.

@agarwal agarwal self-assigned this Mar 11, 2021
@ghost
Copy link

ghost commented Mar 23, 2021

Mind the tailwind config. There is a purge section which is sensitive to these locations.

@ghost
Copy link

ghost commented Apr 1, 2021

Some getStaticProps implementations refer to directory names

@ghost
Copy link

ghost commented Apr 3, 2021

Let's finish this sooner, since more people are getting familiar with the directory layout currently.

@agarwal
Copy link
Member Author

agarwal commented Apr 9, 2021

Yes, I want to do this next, immediately after merging my current PR.

@ghost
Copy link

ghost commented Apr 30, 2021

The directory layout below shows one example of a directory layout for a large, real world nextjs project.

image

@ghost
Copy link

ghost commented May 12, 2021

@agarwal It's useful having components in a subdirectory because we aren't using StoryBook currently, so browsing the contents of a components directory is one quick way to find the available reusable components when implementing a new page.

@rdavison
Copy link
Contributor

rdavison commented May 12, 2021

Merged: ocaml/ocaml.org#346

@agarwal It's useful having components in a subdirectory because we aren't using StoryBook currently, so browsing the contents of a components directory is one quick way to find the available reusable components when implementing a new page.

One way to answer that question would be to generate documentation for the library and look for all values that produce React.elements.

@agarwal
Copy link
Member Author

agarwal commented May 12, 2021

It's useful having components in a subdirectory because we aren't using StoryBook currently

We've merged all into a single directory for now. Let's see how we feel after a while. I do think if we create separate directories, it indicates you're seeking a namespace. Thus, my inclination is to then make a separate library. Also, we do certainly need to write documentation that gives an overview of the modules, and every module should have documentation at the top if its .resi file. Both are currently missing, so we have more work to do.

I QA'd also. Everything seems to work. Closing this issue.

@agarwal agarwal closed this as completed May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants