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

App Themes #344

Merged
merged 24 commits into from
Feb 20, 2019
Merged

App Themes #344

merged 24 commits into from
Feb 20, 2019

Conversation

walmat
Copy link
Owner

@walmat walmat commented Feb 18, 2019


name: App Themes
about: Implements dark mode / light mode

Changes

  • Added themifying to the app
    • themes.scss defined variables to be used during scaffolding
    • fonts.scss defined to be used for differing operating systems
  • Added global action to toggle between themes

TODO

  • Fix button toggle propagation throughout app
  • Fix react-select styling
  • Iron out icon visual bugs

Checks

  • CI passes
  • Coverage (<2%∆)
  • Manual Checks
    • Test out visualality of light and dark mode ALL features
    • Think about captcha window dark mode?

fixes #327

@walmat walmat requested a review from pr1sm February 18, 2019 23:29
pr1sm
pr1sm previously requested changes Feb 19, 2019
Copy link
Collaborator

@pr1sm pr1sm left a comment

Choose a reason for hiding this comment

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

I'm looking forward to seeing this hit master!

Most of the comments I had were around changing the naming scheme of the action and adding a constant THEMES map to reference instead of using string literals.

One thing I noticed as well is that there is nothing in the current code that tells the top level app component to redraw itself. Since this component is outside of the redux connected components, triggering a state change will not automatically trigger a redraw. You'll have to use this.forceUpdate() (reference is here) to redraw the app component.

packages/frontend/src/app.jsx Outdated Show resolved Hide resolved
packages/frontend/src/app.jsx Outdated Show resolved Hide resolved
packages/frontend/src/app.jsx Outdated Show resolved Hide resolved
packages/frontend/src/app.jsx Outdated Show resolved Hide resolved
packages/frontend/src/app.jsx Outdated Show resolved Hide resolved
packages/frontend/src/app.jsx Outdated Show resolved Hide resolved
packages/frontend/src/state/actions.js Outdated Show resolved Hide resolved
packages/frontend/src/state/actions.js Outdated Show resolved Hide resolved
packages/frontend/src/state/reducers.js Outdated Show resolved Hide resolved
packages/frontend/src/state/reducers.js Outdated Show resolved Hide resolved
@walmat walmat changed the title [WIP] App Themes App Themes Feb 19, 2019
@walmat
Copy link
Owner Author

walmat commented Feb 19, 2019

@pr1sm think I'm ready for a second review (hopefully final!)

Copy link
Collaborator

@pr1sm pr1sm left a comment

Choose a reason for hiding this comment

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

Nice, this looks great! Just had a couple of quick suggestions.

One thing I noticed while testing is that the react-select components are a hair slower than the rest of the frontend at updating. Not sure if that's a quick fix or not, but I don't think it's important enough to be a blocker, we can make a separate issue to improve the performance of theme switching

packages/frontend/src/constants/themes.js Outdated Show resolved Hide resolved
packages/frontend/src/utils/styles/select.jsx Outdated Show resolved Hide resolved
packages/frontend/src/utils/styles/select.jsx Outdated Show resolved Hide resolved
packages/frontend/tool/compile_css.sh Outdated Show resolved Hide resolved
@walmat
Copy link
Owner Author

walmat commented Feb 20, 2019

Think about captcha window (and other windows..) dark mode

Any ideas @pr1sm?

@pr1sm
Copy link
Collaborator

pr1sm commented Feb 20, 2019

I'm not sure what the best way is to send the theme over. Maybe using a query string on the captcha url? A script could look for this and make adjustments to the css.

There's probably a better solution out there, but that's just the first thing off the top of my head

Copy link
Collaborator

@pr1sm pr1sm left a comment

Choose a reason for hiding this comment

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

Just a couple of small changes.

packages/frontend/src/utils/styles/select.jsx Outdated Show resolved Hide resolved
packages/frontend/package.json Outdated Show resolved Hide resolved
@pr1sm pr1sm added this to the Beta 6 Release milestone Feb 20, 2019
@pr1sm pr1sm added type:enhancement New feature or request area:frontend Related to Nebula's Frontend Electron app focus:layout things involving UI layout changes (for frontend) labels Feb 20, 2019
Copy link
Collaborator

@pr1sm pr1sm left a comment

Choose a reason for hiding this comment

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

Nice, looks great!

@pr1sm
Copy link
Collaborator

pr1sm commented Feb 20, 2019

merging...

@pr1sm pr1sm merged commit 7ac6f7e into b1.0.0-beta.6 Feb 20, 2019
@pr1sm pr1sm deleted the issue_327 branch February 20, 2019 04:27
This was referenced 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) type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants