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

Monorepo conversion (using bun) #1264

Merged
merged 119 commits into from
Mar 24, 2024
Merged

Monorepo conversion (using bun) #1264

merged 119 commits into from
Mar 24, 2024

Conversation

SutuSebastian
Copy link
Collaborator

@SutuSebastian SutuSebastian commented Feb 7, 2024

Summary

Since there is a lot of confusion regarding which files belong to docs, and which belong to the UI library, as well as which files are simply for code quality and which not, we should have a split bringing separation of concerns that isolates each app/package into their own namespace, while still allowing the flexibility of re-usage of one another (eg: UI lib being used in docs namespace).

To achieve this, the answer is monorepo.

Structure

  • apps
    • storybook
    • web
  • packages
    • cli
    • ui

Stack

Task runner: Bun
Package manager: Bun
Lint: ESLint
Format: Prettier
Test: Vitest
Release: Changesets
Monorepo: Bun
Monorepo build system: Turborepo

Changes

General:

  • upgrade all packages to safe latest
  • refactor github actions
  • setup github actions using bun
  • remove storybook github action (redo later if needed)
  • formatter - switch from singleQuote to double
  • re-do from the ground up: IDE, linting, formatting configs
  • removed cypress (to be replaced with playwright)
  • removed codecov
  • split into multiple packages and apps [web(docs), ui(library), storybook, cli]

Docs:

  • improve homepage speed
  • fix homepage components section card hover on dark mode
  • add new CLI page
  • add new Editor Setup page
  • add CLI command section to all integration guides
  • refactor Quickstart page
  • code preview
    • desktop/tablet/phone toggle buttons sizes
    • RTL toggle button
    • light/dark mode actually working in isolation (+ syncing with root on init and change if mode matches)
  • remix guide: add dark mode section
  • refactor Dark mode page

UI library:

  • bring in intellisense, linting and formatting in all theme objects, using createTheme() proxy function
  • fix and upgrade all deprecated tests by upgrading vitest to latest
  • cleanup dependencies (of all kind)

Storybook:

  • upgrade to storybook 8
  • light/dark mode widget toggle
  • remove next dependency examples

CLI:

Result

Docs - Quickstart

Screen.Recording.2024-03-20.at.10.49.40.mov

Docs - Integration Guides - CLI section

Screenshot 2024-03-20 at 10 50 24

Docs - code preview

Screen.Recording.2024-03-20.at.10.53.50.mov
Screen.Recording.2024-03-20.at.10.54.21.mov

Storybook - light/dark mode toggle

Screen.Recording.2024-03-20.at.11.25.21.mov

CLI

Screen.Recording.2024-03-20.at.11.04.27.mov
Screenshot 2024-03-20 at 11 05 06

SutuSebastian added 30 commits January 16, 2024 13:37
- bun [runtime, package manager, task runner, test runner]
- biome [format, lint]
- removed `cypress` (to be replaced with `playwright`)
- removed codecov
- split into multiple packages and apps [web(docs), ui(library), storybook, cli]

UNSTABLE
fix(ui): exports
fix(root): sort `package.json`
- replace `@vitejs/plugin-react-sw` -> `@vitejs/plugin-react`
- fix build
- add `.gitignore`
- update stories path
- remove `biome` and drop `bun:test` until stable
- add `prettier`
- imporve `.vscode` files and add extentions suggestions
- remove more biome leftover
- add package json sorter
- prettier config: add import sorting
- format files
- add `eslint` to `web`
- optimise onboarding flow
- fix tailwind lint errors here and there
- refactor github actions
- setup github actions using `bun`
- remove storybook github action (redo later)
@SutuSebastian SutuSebastian added the 📚 documentation Improvements or additions to documentation label Mar 19, 2024
…0.31` due to storybook failing; update some packages
@SutuSebastian SutuSebastian marked this pull request as ready for review March 20, 2024 09:06
@SutuSebastian
Copy link
Collaborator Author

@coderabbitai resume

Copy link
Collaborator

@rluders rluders left a comment

Choose a reason for hiding this comment

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

All right. This PR is waaaay too big to be reviewed properly. My browser is struggling to pass through all the changes. However, I've been following the changes for ~2 months, and today I tested it locally. I didn't notice any immediate problem. Nothing seems to be broken at first glance, and I think that the benefits of getting it merged are bigger than the risks related to it. So... I'm approving this PR.

Good job, @SutuSebastian! This is a great improve.

@zoltanszogyenyi
Copy link
Member

This is an amazing PR @SutuSebastian. Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation Improvements or additions to documentation 🚀 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants