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

Make adding themes easier #5071

Open
wants to merge 6 commits into
base: development
Choose a base branch
from

Conversation

kommunarr
Copy link
Collaborator

@kommunarr kommunarr commented May 6, 2024

Make adding themes easier

Pull Request Type

  • Other - Code Cleanup

Related issue

#5066 (comment)

Description

Summary: When adding a base theme and/or theme color today, there are many different files and CSS rules you have to modify to do that. This eliminates unnecessary instances of that, alongside adding code comments outlining what each section is. There is some reordering of the base themes & their corresponding primary/secondary colors to match their ordering elsewhere in the codebase, so the diff over-represents the magnitude of the change.

Changes (no behavioral changes):

  • Adds code commenting to better explain and delineate themes.css sections
  • Moves Invidious and YT logo theme logic to be in themes.css as opposed to the ft-share-button.scss file (most contributors don't think to check here, and for good reason)
  • Simplifies destructive color collision logic to check for "Red" or "Purple" in theme color name
  • Simplifies rules in 3 cases to reduce manual effort & better clarify purpose
  • Moves CSS variable declaration to body rule instead of .app rule to allow for base theme rules lower in the themes.css file to have precedence over the initial declaration
  • Makes ft-share-button a CSS file instead of an SCSS file

Fixes:

  • Fixes Invidious / YT logo colors for Nordic and Dracula base themes
  • Fixes missing destructive theme color overrides

Note:

  • Uses CSS nesting in one portion (the dark theme Invidious and YT logo styling). See browser support (relevant for unofficial forks).

Testing

  • REG: test destructive colors change properly for red theme color and red+purple theme color cases
  • REG: test Invidious / YT logos appear properly on any given light or dark theme on the share button (e.g., on a Channel page)
  • (Optional) REG: sanity test a light theme, dark theme, and hot pink theme

Desktop

  • OS: OpenSUSE
  • OS Version: TW

Copy link
Collaborator Author

@kommunarr kommunarr left a comment

Choose a reason for hiding this comment

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

I requested a tentative review, but I do want #4805 and #5066 merged first just to minimize frustration for the authors.

@PikachuEXE
Copy link
Collaborator

Maybe re-request review (leave a comment) after those are merged? (I will forget this PR in < 5 minutes

@kommunarr kommunarr force-pushed the feat/making-adding-themes-easier branch from c4e0f30 to eb160bb Compare May 6, 2024 11:42
@github-actions github-actions bot added PR: merge conflicts / rebase needed and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels May 8, 2024
Copy link
Contributor

github-actions bot commented May 8, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@kommunarr
Copy link
Collaborator Author

kommunarr commented May 21, 2024

I'm seeing that the authors of PRs #4293 and #4805 are still working on their changes. I'll give it another couple weeks before I move forward with these changes.

Edit: Giving it another two weeks, as the Gruvbox theme PR is close to done.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

@kommunarr kommunarr added PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: WIP labels Jun 18, 2024
Co-authored-by: ChunkyProgrammer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: waiting for review For PRs that are complete, tested, and ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants