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

chore: Use barrel files consistently in Lemon UI #17368

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

maxbelm
Copy link
Contributor

@maxbelm maxbelm commented Sep 10, 2023

This PR should make it so that all lemon-ui components can have their imports reference the @posthog/lemon-ui package.

The goal of this PR is to help with #16827 / #10471 -- this doesn't quite accomplish any of the listed work items, but should help move towards finishing

move lemon ui to their own package folder

mentioned in #10471

I'd be happy to help complete that work item, but I could use a bit of clarification about what that entails 😄

In my mind there's at least two more steps:

  1. Moving the lib/lemon-ui folder/files under the @posthog/lemon-ui package directory
  2. Update all the lib imports across the app to use the package import -- Given how many places this touches, feels like something to break down over multiple PRs?

Note:

In updating the barrel file, I noticed some folders were exporting with a local barrel file, and others were not. It didn't seem like this was necessarily intentional, so I went ahead and made it more (not perfectly) uniform, making all the components have a barrel file of their own. There were also a couple of index.tsx files that were renamed to .ts files.

Please let me know if any of these changes aren't desired, or should be modified in some way!

@raquelmsmith raquelmsmith requested a review from Twixes September 13, 2023 18:40
@maxbelm maxbelm force-pushed the chore/lemon-ui-barrel branch from 6fb3cd7 to ccaf935 Compare September 19, 2023 03:23
Copy link
Member

@Twixes Twixes left a comment

Choose a reason for hiding this comment

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

That's some really nice cleanup, thanks! You're correct with this approach and the follow-up steps – we just haven't been prioritizing this refactoring highly

@Twixes Twixes changed the title chore: update lemon-ui exports for @posthog/lemon-ui barrel file chore: Use barrel files consistently in Lemon UI Sep 19, 2023
@Twixes Twixes merged commit 1fc8877 into PostHog:master Sep 19, 2023
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.

2 participants