Add theming system with light/dark mode support and CSS variables#453
Open
TheDormouse wants to merge 1 commit intodanielbrendel:mainfrom
Open
Add theming system with light/dark mode support and CSS variables#453TheDormouse wants to merge 1 commit intodanielbrendel:mainfrom
TheDormouse wants to merge 1 commit intodanielbrendel:mainfrom
Conversation
Owner
|
Wow, another nice PR! I will need some time for reviewing both of your PRs, as they are kinda big and I really want to take my time, so please be patient. But it's really nice to see someone getting into the core app! |
Author
No worries at all, please feel free to reach out with questions if needed. It's been fun to work with. ~ Marchy |
Owner
|
Hey, I've been starting to review your PR and I've got a few questions:
- In your change to app/controller/_base.php you're going to load a default
theme if there hasn't been one selected by the user. However it's by design
that the system falls back to what is set via the admin dashboard -> media
section. That particular logic is handled in app/views/layout.php:17-21.
With the upcoming v5.3 users will have the opportunity to unselect any
theme (even default one), so they are being served with what's adjusted in
that particular section of the admin area.
- Your implementation of ThemeModule::getCssVariablesInline() uses HTML
strings, which I'm always a bit wary of. Can you elaborate how this is
beneficial? Would it be possible to outsource this in a view script?
- I'd put the navbar-item for bright/dark mode toggle between the logout
and the location dropdown elements. Preferably with a bit of a gap at both
sides, so it's clear that it's not part of the other regular menu actions.
- Could you provide a small preview video or images that shows the workflow
of toggling light/dark mode? For documentation and a visual presentation,
this would help me as a reviewer.
That's it for now. :D As this is a huge PR, we'll take our time to work
through this. ;-) Really appreciate your coding style. Just one suggestion:
For future contributions, it's better to avoid putting everything in a
single commit (as stated in the contribution guidelines). While I do this
myself sometimes, it makes things difficult if more people are involved. It
will fasten the review if a PR is thematically splitted into multiple
commits. For instance, server-side implementations, then frontend, then
theme settings files, etc.
If you have any questions, let me know!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #441
Site will default to system setting, allowing for override which is stored in local storage.
Replaces many hardcoded values with CSS variables for easier theming.