Skip to content

[chore]: Use theme color variables instead of hardcoded values #661#701

Open
shivsubh wants to merge 1 commit intoopenwisp:masterfrom
shivsubh:issues/661-use-theme-color-variables
Open

[chore]: Use theme color variables instead of hardcoded values #661#701
shivsubh wants to merge 1 commit intoopenwisp:masterfrom
shivsubh:issues/661-use-theme-color-variables

Conversation

@shivsubh
Copy link
Copy Markdown
Contributor

@shivsubh shivsubh commented Apr 6, 2026

Replace hardcoded colors in CSS files and templates with the CSS variables introduced in openwisp-utils#516 to ensure unified theming and simplify future palette updates.

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #661 .

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

Warning

Rate limit exceeded

@shivsubh has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 19 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 15 minutes and 19 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 76826f9c-3084-4535-81b1-76accf28b625

📥 Commits

Reviewing files that changed from the base of the PR and between 73f7098 and 02cee4a.

📒 Files selected for processing (4)
  • openwisp_radius/integrations/monitoring/static/radius-monitoring/css/device-change.css
  • openwisp_radius/static/openwisp-radius/css/mode-switcher.css
  • openwisp_radius/static/openwisp-radius/css/radiusbatch.css
  • openwisp_radius/templates/openwisp-radius/prefix_pdf.html
📝 Walkthrough

Walkthrough

This pull request replaces hardcoded color values with OpenWISP theme CSS variables across four files: device-change.css, mode-switcher.css, radiusbatch.css, and prefix_pdf.html. Examples: greenvar(--ow-color-success, green), #333var(--ow-color-fg-darker, #333), #000var(--ow-color-black, #000), and #cccvar(--ow-color-fg-medium, #ccc). No structural, logic, template flow, or exported/public API changes were made.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format with [chore] prefix and clearly describes the change of using theme color variables instead of hardcoded values.
Description check ✅ Passed The description covers the main changes and references issue #661, though manual testing, test cases, and documentation updates are not yet completed.
Linked Issues check ✅ Passed The PR successfully replaces hardcoded colors with CSS theme variables across multiple CSS and template files, directly addressing the objective to refactor the codebase per issue #661.
Out of Scope Changes check ✅ Passed All changes are focused on replacing hardcoded color values with CSS theme variables in style files and templates, directly aligned with issue #661 requirements.
Bug Fixes ✅ Passed This PR is labeled as [chore] and refactors code for theming consistency without fixing core user-facing bugs, so custom check requirements do not apply.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@shivsubh shivsubh force-pushed the issues/661-use-theme-color-variables branch from 7b03dbb to 73f7098 Compare April 6, 2026 06:08
…sp#661

Refactor hardcoded color values in CSS files and templates to use the CSS variables introduced in openwisp-utils#516.

Closes openwisp#661
@shivsubh shivsubh force-pushed the issues/661-use-theme-color-variables branch from 73f7098 to 02cee4a Compare April 6, 2026 06:14
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 97.46%. remained the same
when pulling 02cee4a on shivsubh:issues/661-use-theme-color-variables
into b512f3a on openwisp:master.

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.

[chores] Use theme colors from openwisp-utils variables

2 participants