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

Implement client facing theme #95

Open
Jipperism opened this issue Mar 15, 2023 · 2 comments · May be fixed by #96
Open

Implement client facing theme #95

Jipperism opened this issue Mar 15, 2023 · 2 comments · May be fixed by #96
Assignees

Comments

@Jipperism
Copy link

Starting work on implementing the client facing theme. Some questions, which we may have partially answered already but good to leave a written down version so it's available to everybody.

  • What developer experience do we envision. From the way it's currently build, I don't think merely swapping out the theme/wrapping the component in a separate provider will be sufficient, as not all styling is done entirely through the theme (for example, in some composed components like Card.tsx. In our previous call, I think we decided to duplicate components as well as providing a raidguild/client theme. The downside of this approach is that developers will be required to import the correct components from eg @raidguild/design-system/rg and @raidguild/design-system/client. The upside is that we don't have to rewrite anything that's already there.
  • Do we expect to see components from both sets side-by-side? In separate stories, under dropdowns for rg/client? It's pretty straightforward to show them side-by-side as the theme is currently only passed in through the global storybook parmas, which can also be defined on a story or component level (see the docs).

Pinging @scottrepreneur and @bitbeckers

@Jipperism Jipperism self-assigned this Mar 15, 2023
@scottrepreneur
Copy link
Member

From the way it's currently build, I don't think merely swapping out the theme/wrapping the component in a separate provider will be sufficient, as not all styling is done entirely through the theme (for example, in some composed components like Card.tsx.

Any styles that are currently handled in the component could ideally be moved to the theme. Streamlining to one set of components unless there is additional complexity there.

Do we expect to see components from both sets side-by-side?

Could be a separate storybook. Whatever solution seems easiest to maintain.

@Jipperism Jipperism linked a pull request Mar 21, 2023 that will close this issue
@Jipperism
Copy link
Author

Jipperism commented Mar 21, 2023

@scottrepreneur ended up implementing it as a theme switch. Going through the components to determine where styling still has to be moved into the theme, doesn't seem to be much.

Some open questions

  • Do we expect every component to have a functioning version in both themes? For example, <Button /> with variant="gradientOutline".
  • Do we want to be able to conditionally show stories, for only a specific theme?

Also, the Modal, Card, Dialog and Menu components do not seem to fully function on the raidguild theme, but this seems to already be an issue on main so it probably makes more sense to create separate issues for those.

@scottrepreneur scottrepreneur linked a pull request May 31, 2023 that will close this issue
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 a pull request may close this issue.

2 participants