Skip to content

scale-color $lightness must use $secondary for dark themes#4

Open
ShashankFC wants to merge 1 commit into
theme-color-scheme-prefrom
theme-color-scheme-post
Open

scale-color $lightness must use $secondary for dark themes#4
ShashankFC wants to merge 1 commit into
theme-color-scheme-prefrom
theme-color-scheme-post

Conversation

@ShashankFC

Copy link
Copy Markdown

Test 7

Summary by CodeRabbit

Release Notes

  • Style
    • Enhanced color rendering throughout the interface to improve visual contrast and support for light and dark themes. Colors now dynamically adjust based on your selected theme for better readability and visual consistency across all UI components, including buttons, links, badges, headers, notifications, modals, login forms, and user profiles.

✏️ Tip: You can customize this high-level summary in your review settings.


Replicated from ai-code-review-evaluation/discourse-coderabbit#7

@ShashankFC ShashankFC requested a review from Copilot January 30, 2026 10:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances color rendering to support both light and dark themes by replacing static scale-color calls with dark-light-choose function calls that provide appropriate color variations for each theme.

Changes:

  • Replaced hardcoded scale-color($primary, $lightness: X%) with dark-light-choose(scale-color($primary, $lightness: X%), scale-color($secondary, $lightness: Y%)) throughout the codebase
  • Applied consistent lightness adjustments for dark themes (typically using inverse percentages)
  • Updated color definitions across UI components including buttons, badges, links, modals, headers, notifications, and user profiles

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
app/assets/stylesheets/mobile/user.scss Updated color definitions for instructions, icons, and group member info to support theme switching
app/assets/stylesheets/mobile/upload.scss Modified description text color for theme compatibility
app/assets/stylesheets/mobile/topic.scss Updated private message glyph color with theme-aware function
app/assets/stylesheets/mobile/topic-post.scss Enhanced color definitions for post elements, headers, and domain displays
app/assets/stylesheets/mobile/topic-list.scss Modified topic list colors for table cells, icons, and featured topics
app/assets/stylesheets/mobile/modal.scss Updated custom message length color for dark theme support
app/assets/stylesheets/mobile/login.scss Modified login form link and label colors for theme compatibility
app/assets/stylesheets/mobile/compose.scss Updated draft status and composer UI element colors
app/assets/stylesheets/embed.css.scss Modified new user link color for theme switching
app/assets/stylesheets/desktop/user.scss Updated instructions, headers, and group member colors for desktop view
app/assets/stylesheets/desktop/upload.scss Modified upload description and hint colors
app/assets/stylesheets/desktop/topic.scss Updated private message glyph and reply button colors
app/assets/stylesheets/desktop/topic-post.scss Enhanced extensive color definitions for post controls, badges, links, and various UI elements
app/assets/stylesheets/desktop/topic-list.scss Modified topic list icons, actions, and status colors
app/assets/stylesheets/desktop/queued-posts.scss Updated queued post span colors
app/assets/stylesheets/desktop/modal.scss Enhanced modal footer, close button, and breadcrumb colors
app/assets/stylesheets/desktop/login.scss Modified login form link and instruction colors
app/assets/stylesheets/desktop/header.scss Updated search highlight and blurb colors
app/assets/stylesheets/desktop/compose.scss Modified composer icon colors
app/assets/stylesheets/common/components/buttons.css.scss Updated disabled button hover state colors
app/assets/stylesheets/common/components/badges.css.scss Modified badge background and link colors
app/assets/stylesheets/common/base/user.scss Updated username, name, and title colors
app/assets/stylesheets/common/base/user-badges.scss Modified badge count and grant count colors
app/assets/stylesheets/common/base/topic-post.scss Enhanced quote, link, and icon colors
app/assets/stylesheets/common/base/share_link.scss Updated date display colors
app/assets/stylesheets/common/base/search.scss Modified search result and highlight colors
app/assets/stylesheets/common/base/notification-options.scss Updated muted notification icon colors
app/assets/stylesheets/common/base/login.scss Modified login paragraph and button colors
app/assets/stylesheets/common/base/header.scss Updated topic counts, notification icons, and status colors
app/assets/stylesheets/common/base/discourse.scss Modified coldmap color intensity levels
app/assets/stylesheets/common/base/_topic-list.scss Updated table headers, cells, excerpts, and date strings
app/assets/stylesheets/common/admin/admin_base.scss Enhanced admin panel colors including descriptions, help text, borders, and filters

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

.custom-message-length {
margin: -10px 0 10px 20px;
color: scale-color($primary, $lightness: 70%);
color: dark-light-choose(scale-color($primary, $lightness: 30%), scale-color($secondary, $lightness: 70%));

Copilot AI Jan 30, 2026

Copy link

Choose a reason for hiding this comment

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

The lightness value for the light theme was changed from 70% to 30%, which inverts the color intensity. This appears to be an unintended change as other similar updates in the PR maintain the original lightness value for the light theme. Consider reverting to scale-color($primary, $lightness: 70%) for consistency.

Suggested change
color: dark-light-choose(scale-color($primary, $lightness: 30%), scale-color($secondary, $lightness: 70%));
color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 70%));

Copilot uses AI. Check for mistakes.
a {
font-weight: bold;
color: scale-color($primary, $lightness: 30%);
color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 30%));

Copilot AI Jan 30, 2026

Copy link

Choose a reason for hiding this comment

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

The lightness value for the light theme was changed from 30% to 70%, which inverts the color intensity compared to the original. This may result in reduced contrast. Verify this change was intentional, as other updates preserve the original lightness values for the light theme.

Suggested change
color: dark-light-choose(scale-color($primary, $lightness: 70%), scale-color($secondary, $lightness: 30%));
color: dark-light-choose(scale-color($primary, $lightness: 30%), scale-color($secondary, $lightness: 70%));

Copilot uses AI. Check for mistakes.
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.

3 participants