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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create component library lego-bricks #4073

Merged
merged 7 commits into from Aug 8, 2023
Merged

Create component library lego-bricks #4073

merged 7 commits into from Aug 8, 2023

Conversation

eikhr
Copy link
Member

@eikhr eikhr commented Aug 2, 2023

Description

Adds a nested package inside lego-webapp, monorepo style, where we can put components we want to use in other projects.

I've done some webpack and typescript trickery to make hot-reload and jump-to-definition work. Not the cleanest code, but I think it's worth it to get a better dev experience. None of it is used in production anyways. For production builds we need to build lego-bricks first so that it can be imported like any other npm package in lego-webapp.

It currently contains LoadingIndicator and Button, but most components could be moved fairly easily (just a bit of work to fix all the imports). The only thing I have found so far that doesn't work is the composes: feature of post-css. This is because of the internal workings of vite, so any components that make use of this must be changed before being moved.


For reviewing I would highly recommending reviewing the commits separately

Result

Hopefully everything works exactly the same as before in lego-webapp馃

I did fix some broken LoadingIndicators though, that were never loading.

Testing

  • I have thoroughly tested my changes.

Please describe what and how the changes have been tested, and provide instructions to reproduce if necessary.


Resolves ABA-524

@linear
Copy link

linear bot commented Aug 2, 2023

ABA-524 Create component library

We reuse the same components in multiple projects. Currently they are simply copy/pasted, which is obviously not a great solution. A package with shared components would be better.

@github-actions github-actions bot added the review-needed Pull requests that need review label Aug 2, 2023
@eikhr eikhr force-pushed the component-library branch 4 times, most recently from 9704f7c to f405ccd Compare August 7, 2023 21:29
@eikhr eikhr added the testing-needed Pull requests that need testing, e.g. stress tests by users or specs label Aug 7, 2023
@eikhr eikhr marked this pull request as ready for review August 7, 2023 21:34
Copy link
Member

@ivarnakken ivarnakken left a comment

Choose a reason for hiding this comment

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

Can't wait! 馃槏

packages/lego-bricks/src/global.css Show resolved Hide resolved
packages/lego-bricks/.eslintrc.cjs Show resolved Hide resolved
packages/lego-bricks/package.json Outdated Show resolved Hide resolved
packages/lego-bricks/package.json Outdated Show resolved Hide resolved
packages/lego-bricks/package.json Outdated Show resolved Hide resolved
packages/lego-bricks/package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@ollfkaih ollfkaih left a comment

Choose a reason for hiding this comment

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

馃槑

package.json Show resolved Hide resolved
packages/lego-bricks/package.json Outdated Show resolved Hide resolved
packages/lego-bricks/tsconfig.json Show resolved Hide resolved
app/routes/pages/components/PageDetail.tsx Outdated Show resolved Hide resolved
@eikhr eikhr force-pushed the component-library branch 3 times, most recently from 792df96 to 1bf92b7 Compare August 8, 2023 20:46
@eikhr eikhr force-pushed the component-library branch 5 times, most recently from af449ef to 0118778 Compare August 8, 2023 21:16
@eikhr eikhr added approved Pull requests that have been approved ready-to-merge Pull requests that have been approved and are ready to be merged and removed review-needed Pull requests that need review testing-needed Pull requests that need testing, e.g. stress tests by users or specs labels Aug 8, 2023
@github-actions github-actions bot added the review-needed Pull requests that need review label Aug 8, 2023
@eikhr eikhr enabled auto-merge August 8, 2023 21:32
@eikhr eikhr merged commit b63677c into master Aug 8, 2023
4 checks passed
@eikhr eikhr deleted the component-library branch August 8, 2023 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Pull requests that have been approved ready-to-merge Pull requests that have been approved and are ready to be merged review-needed Pull requests that need review
Projects
None yet
3 participants