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

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

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) May 6, 2024 00:48
@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label May 6, 2024
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]>
Copy link
Contributor

This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: WIP PR: waiting for review For PRs that are complete, tested, and ready for review and removed PR: waiting for review For PRs that are complete, tested, and ready for review PR: stale labels Jul 18, 2024
Copy link
Contributor

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

@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 Jul 18, 2024
@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link
Member

efb4f5ff-1298-471a-8973-3d47447115dc commented Jul 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.

PR seems to be abandoned as it has been stale for more than a month

6 june was the last commit to it and I requested them to look at some unresolved changes at 15 june

Copy link
Contributor

github-actions bot commented Oct 3, 2024

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 Oct 3, 2024
@ChunkyProgrammer ChunkyProgrammer self-requested a review October 4, 2024 02:46
@efb4f5ff-1298-471a-8973-3d47447115dc

@PikachuEXE @ChunkyProgrammer 👋

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

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

I skipped hot pink theme test, my eyes hurts

@FreeTubeBot FreeTubeBot merged commit 0dc3e39 into FreeTubeApp:development Oct 5, 2024
5 checks passed
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Oct 5, 2024
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 this pull request may close these issues.

6 participants