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

refactor: Add 'src' folder in 'site' #445

Merged
merged 5 commits into from
Mar 16, 2022

Conversation

bryphe-coder
Copy link
Contributor

This refactoring re-organizes the site folder to have a nested src folder.

Originally, we wanted to keep the directory structure shallow - but there were two points that motivated this change to introduce the src level.

  1. We have several non-src folders now (e2e, static, html_templates, .storybook)
  2. Having a src folder makes it easier to run XState Typegen

So given those two data points - I believe it makes sense to revisit that and introduce a src folder.

@codecov
Copy link

codecov bot commented Mar 15, 2022

Codecov Report

Merging #445 (49232aa) into main (15beb98) will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #445      +/-   ##
==========================================
+ Coverage   68.13%   68.17%   +0.04%     
==========================================
  Files         158      156       -2     
  Lines        9224     9082     -142     
  Branches       73       83      +10     
==========================================
- Hits         6285     6192      -93     
+ Misses       2318     2291      -27     
+ Partials      621      599      -22     
Flag Coverage Δ
unittest-go-macos-latest 62.90% <ø> (+0.25%) ⬆️
unittest-go-ubuntu-latest 67.59% <ø> (+0.15%) ⬆️
unittest-go-windows-2022 ?
unittest-js 62.37% <ø> (-1.86%) ⬇️
Impacted Files Coverage Δ
site/.storybook/main.js 0.00% <ø> (ø)
site/src/Main.tsx 0.00% <ø> (ø)
site/src/api.ts 23.68% <ø> (ø)
site/src/app.tsx 0.00% <ø> (ø)
site/src/components/Button/CopyButton.tsx 52.38% <ø> (ø)
site/src/components/Button/LoadingButton.tsx 100.00% <ø> (ø)
site/src/components/Button/SplitButton.tsx 89.47% <ø> (ø)
site/src/components/Button/index.ts 100.00% <ø> (ø)
site/src/components/CodeBlock/index.tsx 100.00% <ø> (ø)
site/src/components/CodeExample/CodeExample.tsx 100.00% <ø> (ø)
... and 73 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 15beb98...49232aa. Read the comment docs.

Copy link
Contributor

@greyscaled greyscaled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open question (did not look at files before posing): should we update our tsconfigs?


EDIT: To clarify:

  • I can imagine e2e having a separate tsconfig and that our product tsconfig doesn't glob outside of src. This sometimes means a separate tsconfig just for webpack, but that's OK.

EDIT: Another possibility is moving e2e outside of site, since it can be completely isolated. This is usually a "better" practice in terms of approaching the system as a blackbox, and not sharing anything with it.

Copy link
Contributor

@presleyp presleyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@bryphe-coder
Copy link
Contributor Author

Open question (did not look at files before posing): should we update our tsconfigs?

@vapurrmaid - I don't have a strong feeling in the context of this PR, but it seems like it might be necessitated once we do the work to split out E2E in #446 . Would you be OK if we merge this as-is and then look at splitting out the tsconfigs as part splitting out E2E?

@greyscaled
Copy link
Contributor

Open question (did not look at files before posing): should we update our tsconfigs?

@vapurrmaid - I don't have a strong feeling in the context of this PR, but it seems like it might be necessitated once we do the work to split out E2E in #446 . Would you be OK if we merge this as-is and then look at splitting out the tsconfigs as part splitting out E2E?


Yea absolutely, I meant to capture that this was more of a follow-up concern, just context-attached here. I didn't mean to give an impression of it being a blocker.

@bryphe-coder bryphe-coder enabled auto-merge (squash) March 16, 2022 03:44
@bryphe-coder bryphe-coder merged commit d8e530e into main Mar 16, 2022
@bryphe-coder bryphe-coder deleted the bryphe/refactor/site-src-folder branch March 16, 2022 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants