Skip to content

[WC-3627] remove data widgets dependencies from atlas sass variables - #2474

Merged
gjulivan merged 1 commit into
mainfrom
data-widget/atlas-sass-detach
Nov 5, 2026
Merged

gjulivan merged 1 commit into
mainfrom
data-widget/atlas-sass-detach

Conversation

@gjulivan

@gjulivan gjulivan commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Pull request type

Bug fix (non-breaking change which fixes an issue)


Description

Makes the Data Widgets styling independent of Atlas Sass variables. Every Sass variable the data widgets use is now declared in the module's variables.scss with !default. When Atlas is present and declares the same variable, the Atlas value wins. Without Atlas, the module's own value is used.

Changes:

  • variables.scss: added $color-primary-light, $gray-lighter, $font-color-default, $screen-md and $screen-lg. Replaced $caption-color with $font-color-default. Replaced the computed $color-default-lighter (mix()) and $shadow-color (rgba($gray-primary, …)) with fixed values, so the module compiles without Atlas color functions.
  • Dropdown filter and Gallery: Sass fallbacks inside custom property declarations are now interpolated (#{$var}). Without interpolation, the fallback was written to the CSS as the literal text $var.
  • Pagination bar: the text color is now var(--font-color-default, $font-color-default) instead of $caption-color, which compiled to a fixed #0a1325 in every theme. The pager now follows the theme's text color, which fixes unreadable pager text in dark themes.
  • Three-state checkbox: the fallback for a disabled, checked checkbox is now color-mix(in srgb, $brand-primary 40%, transparent). It looks the same as the previous rgba($brand-primary, 0.4) and still follows a custom brand primary color, but it also compiles when $brand-primary is a CSS variable. With Atlas, --brand-primary-200 still applies.
  • Changelog entry for the pagination color change, including how to keep a custom pager color, since $caption-color no longer applies.

Visible changes:

  • Pager text uses the theme's default font color, #4a4a4c in the default Atlas theme instead of #0a1325. This is the cause of the failing screenshot tests for the datagrid date, number and text filters and for Gallery. Those baselines need to be updated.
  • Without Atlas only, the default shadow color is slightly lighter (rgba(231, 231, 233, 0.66) instead of rgba(206, 208, 211, 0.66)). Apps with Atlas are not affected.

What should be covered while testing?

  • Data Grid 2 and Gallery pagination in the default and dark Atlas themes: pager text is readable and uses the theme's text color.
  • A disabled, checked three-state checkbox, with Atlas and with a custom brand primary color.
  • Dropdown filter (menu, highlighted and selected items, placeholder) and Gallery grid spacing design properties render the same as before.
  • The module's styles compile in a project without Atlas.

🤖 Generated with Claude Code

@gjulivan
gjulivan requested a review from a team as a code owner October 14, 2026 07:58
@gjulivan gjulivan changed the title fix: remove data widgets dependencies from atlas sass variables [WC-3627] remove data widgets dependencies from atlas sass variables Oct 14, 2026
@github-actions

This comment has been minimized.

yordan-st
yordan-st previously approved these changes Oct 16, 2026
samuelreichert
samuelreichert previously approved these changes Oct 16, 2026
@gjulivan
gjulivan force-pushed the data-widget/atlas-sass-detach branch from b1e4b2e to 0e794e9 Compare November 3, 2026 13:56
@github-actions

This comment has been minimized.

@gjulivan
gjulivan dismissed stale reviews from samuelreichert and yordan-st via aa40cee November 3, 2026 13:58
@gjulivan
gjulivan force-pushed the data-widget/atlas-sass-detach branch 2 times, most recently from aa40cee to dddaeb4 Compare November 3, 2026 14:00
@github-actions

This comment has been minimized.

@gjulivan
gjulivan force-pushed the data-widget/atlas-sass-detach branch from dddaeb4 to 79294f0 Compare November 3, 2026 14:03
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

AI Code Review

✅ Approved — no issues found


What was reviewed

File Change
packages/modules/data-widgets/CHANGELOG.md New Fixed entry under Unreleased
.../themesource/datawidgets/web/variables.scss Added the Atlas-compatible variables the module was missing ($font-color-default, $gray-lighter, $color-primary-light, $screen-md, $screen-lg). Replaced mix() and rgba($var) with literal values. Renamed $caption-color to $font-color-default
.../_datagrid-dropdown-filter.scss, _gallery.scss, _gallery-design-properties.scss Wrapped Sass variables in #{} inside CSS custom property values
.../_pagination-bar.scss Pagination text color is now var(--font-color-default, $font-color-default)
.../_three-state-checkbox.scss rgba($brand-primary, 0.4) replaced with color-mix(in srgb, …)

Skipped (out of scope): none

CI: pending: sigridci · unrelated failures: security/snyk (external scanner, no SCSS or code issues reported)


Questions

  • $caption-color is removed and the pagination color now follows --font-color-default, as the changelog says. Do you want to keep a deprecated $caption-color alias for one release? Themes that override that variable would otherwise lose the customization without any warning.

Positives

  • The #{} interpolation is now applied everywhere a Sass variable sits inside a custom property value. A grep of the module's themesource found no remaining unescaped cases.
  • The changelog entry tells app developers how to restore a custom pagination color.
  • Every new variable is used somewhere in the module, and each has !default, so themes can still override them.

@gjulivan
gjulivan merged commit 6909e4d into main Nov 5, 2026
13 of 14 checks passed
@gjulivan
gjulivan deleted the data-widget/atlas-sass-detach branch November 5, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants