Skip to content

fix(css): resolve Sonar maintainability findings - #379

Merged
ReenigneArcher merged 2 commits into
masterfrom
codex/fix-sonar-css-findings
Oct 30, 2026
Merged

ReenigneArcher merged 2 commits into
masterfrom
codex/fix-sonar-css-findings

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Description

Remove !important from the Crowdin themes and shared styles while preserving the intended colors and layout. Scope the Crowdin selectors to override its dynamically injected styles, clear conflicting inline Dockle positioning, and use Bootstrap's --bs-dark-rgb variable to preserve the dark background in either stylesheet order.

Restrict the image zoom transition to transform and enable it only when the user has no reduced-motion preference. Keep the same hover state without animation for users who request reduced motion.

Screenshot

Issues Fixed or Closed

  • Addresses 28 css:S9423 findings (!important) and one css:S9449 finding (transition scope) in LizardByte_shared-web.
  • Addresses css:S9440 for the zoom transition's reduced-motion behavior.
  • SonarQube Cloud PR analysis: zero open/confirmed findings; quality gate passed on 9de38abf9824ba4c0004ffe7d167d081064fd92b.

Roadmap Issues

Testing

  • Updated the existing Crowdin tests to verify immediate and delayed picker initialization clears conflicting inline positioning while preserving an unrelated inline property. These assertions fail with the previous positioning code.
  • npm test: all 56 tests passed with 100% statement, branch, function, and line coverage; ESLint passed.
  • npm run build: passed with dependencies installed from the lockfile using npm ci --ignore-scripts.
  • 126 headless Edge comparisons using live Crowdin CSS and Bootstrap 5.3.8: picker states, desktop/mobile breakpoints, and both stylesheet orders passed; the intended dark background is preserved when Bootstrap loads last.
  • Browser checks at desktop and mobile widths with reduced motion enabled and disabled passed.
  • git diff --check passed. GitHub CI build, Common Lint, CodeQL, and Sonar checks passed.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

Codex investigated the Sonar findings, implemented the fixes and regression-test updates, and ran local and browser validation.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (93fe106) to head (9de38ab).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #379   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          196       196           
  Branches        52        52           
=========================================
  Hits           196       196           
Files with missing lines Coverage Δ
src/js/crowdin.js 100.00% <100.00%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93fe106...9de38ab. Read the comment docs.

@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit 12cbc5c into master Oct 30, 2026
15 checks passed
@ReenigneArcher
ReenigneArcher deleted the codex/fix-sonar-css-findings branch October 30, 2026 00:07
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.

1 participant