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

Minimize Work needed for Theme Changes/Additions #345

Open
pr1sm opened this issue Feb 20, 2019 · 0 comments
Open

Minimize Work needed for Theme Changes/Additions #345

pr1sm opened this issue Feb 20, 2019 · 0 comments
Labels
area:frontend Related to Nebula's Frontend Electron app focus:layout things involving UI layout changes (for frontend) priority:low Issues that are low priority don't need to be solved right away type:enhancement New feature or request type:tech-debt Issues related to adjusting underlying implementation details without affecting the end product

Comments

@pr1sm
Copy link
Collaborator

pr1sm commented Feb 20, 2019

Is your feature request related to a problem? Please describe.
With #344 about to merge, we have theme support and some automation with regards to adding new themes. This is focused on sass specifically and is great! However, we still have css-in-js classes that are applied to the react-select components separately from sass.

The current implementation will require manual changes to be made when adjusting or adding themes.

Describe the solution you'd like
Ideally we should have a separate file that contains all theme related style data and have both the sass classes and css-in-js styles pull from that single source of truth. This would minimize the work needed to adjust/add themes as well as keep both style injections in sync with each other.

There will be two things we need to take care of:

  1. Separate out theme data to a format that both sass and js can pull from
  2. Adjust the select.jsx file to lookup data rather than have it hardcoded

For #1 I think we can use a .json format to handle the theme data. This can be imported automatically in js and we can use a library to get it imported into sass (something like this library would work).

For #2 I think we can simply look up the data from the .json file based on the given theme that is passed in.

Describe alternatives you've considered
There are other libraries that allow you to extract structured variables from a sass file, but I'm not sure which direction is more efficient.

Additional context
Originally from https://github.com/walmat/nebula/pull/344#discussion_r258280697

@pr1sm pr1sm added type:enhancement New feature or request area:frontend Related to Nebula's Frontend Electron app type:tech-debt Issues related to adjusting underlying implementation details without affecting the end product focus:layout things involving UI layout changes (for frontend) priority:low Issues that are low priority don't need to be solved right away labels Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:frontend Related to Nebula's Frontend Electron app focus:layout things involving UI layout changes (for frontend) priority:low Issues that are low priority don't need to be solved right away type:enhancement New feature or request type:tech-debt Issues related to adjusting underlying implementation details without affecting the end product
Projects
None yet
Development

No branches or pull requests

1 participant