ROX-27186: Delete conditional code for classic dark theme#13436
Merged
pedrottimark merged 3 commits intomasterfrom Dec 4, 2024
Merged
ROX-27186: Delete conditional code for classic dark theme#13436pedrottimark merged 3 commits intomasterfrom
pedrottimark merged 3 commits intomasterfrom
Conversation
Contributor
|
Images are ready for the commit at 188d31b. To use with deploy scripts, first |
|
@pedrottimark: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
dvail
approved these changes
Dec 4, 2024
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.
Description
Problem
On one side of the coin, some classic colors are used only for dark theme that was turned off on 2023-06-10 in #6432
On other side of the coin, accessibility guidelines are easier to reinforce via rules with as much PatternFly as possible, and even then, rarely
classNameorcolorprops and usually semantic color withvariantprop:Analysis
Find in Files
useTheme()has 18 results in 18 files.isDarkModehas 76 results in 22 files.bg-base-0has 7 results in 6 files before changes, but none after changes.bg-primary-100has 8 results in 7 files before changes, but 6 results in 6 files after changes.bg-primary-300has 3 results in 2 files before changes, but 2 results in 1 file after changes.Solution
isDarkModeconditional rendering.bg-primary-100because it is stylistic variation on light background.Residue
User-facing documentation
Testing and quality
Automated testing
How I validated my change
npm run lintin ui/apps/platformnpm run buildin ui/apps/platform and then compute branch - master for the followingwc build/static/js/*.jsmain.js -22536 = 4615497 - 4638033 some code moved to another bundle
total -2541 = 11553577 - 11556118
ls -al build/static/js/*.js | wcfiles 0 = 179 - 179
npm run startin ui/apps/platformManual testing
Visit /main/compliance
With

isDarkModebefore changes, see presence oftext-base-100that is not used.Without

isDarkModeafter changes, see absence and the usual hover background.Visit /main/vulnerability-management/images and then click to open side panel.
With

isDarkModebefore changes, see Related entities area has blue background color.Without

isDarkModeafter changes, see Related entities area has same background color as rest of side panel content.Remove
ThemeProviderthat dynamically setsclassattribute ofbodyelement.Without static

class="theme-light"attribute before changes, see absence of match for some style rules.With static

class="theme-light"attribute after changes, see absence of match for some style rules.Visit /main/configmanagement/namespaces click to open side panel and then click to visit single page.
With

isDarkModebefore changes, see presence of line break inclassattribute.Without

isDarkModeafter changes, see absence of line break inclassattribute, but same style.