Skip to content

Jbaker/commit dist - #296

Closed
jason-capsule42 wants to merge 15 commits into
masterfrom
jbaker/commitDist
Closed

Jbaker/commit dist#296
jason-capsule42 wants to merge 15 commits into
masterfrom
jbaker/commitDist

Conversation

@jason-capsule42

@jason-capsule42 jason-capsule42 commented Aug 17, 2026

Copy link
Copy Markdown
Member

Alaska Airlines Pull Request

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Resolves: # (issue, if applicable)

Summary:

Please summarize the scope of the changes you have submitted, what the intent of the work is and anything that describes the before/after state of the project.

Type of change:

Please delete options that are not relevant.

  • New capability
  • Revision of an existing capability
  • Infrastructure change (automation, etc.)
  • Other (please elaborate)

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

Summary by Sourcery

Migrate WebCore stylesheets to Sass modules while adding multi-theme typography bundles and updating the supporting build, documentation, and test infrastructure.

New Features:

  • Add generated multi-theme typography CSS bundles that support runtime theme selection through theme attributes.
  • Provide Sass module-based configuration and consumption across core styles, utilities, grids, typography, fonts, and theme definitions.

Bug Fixes:

  • Ensure typography variable generation scopes default and non-default themes without allowing unknown themes to overwrite the default theme.
  • Update responsive utility output and token fallbacks for consistent module-based compilation.

Enhancements:

  • Modernize the Sass codebase from legacy imports and global functions to the module system and namespaced dependencies.
  • Refresh generated Sass documentation and examples for the module-based API.
  • Update design-token integration and theme configuration for Alaska and Hawaiian styles.

Build:

  • Update package and build dependencies, broaden supported Node versions, and add automated theme-code generation to build and packaging workflows.

Documentation:

  • Document Sass module configuration for scoping, prefixing, and important utility output, and refresh documentation links.

Tests:

  • Update Sass smoke tests and generator tests to exercise module-based loading and configuration.

Chores:

  • Regenerate the documentation output for version 11.1.3.

jason-capsule42 and others added 15 commits August 14, 2026 07:56
AB#1612078

Add data-attribute theme scoping for WCSS type custom properties, mirroring AuroDesignTokens' `[data-aag-theme="aag-theme-<code>"]` convention (additive; `:root` output retained, so existing typography rendering is unchanged).

- Generate `$wcss-theme-codes` at build time from design-tokens' THEME_DEFINITIONS via scripts/theme-codes.build.mjs (git-ignored partial), keeping codes drift-free.
- Add `wcss-type-scope-selector()` and `generate-multi-theme-type-css-vars` so each bundle emits its namesake theme under `:root` + attributes and every other theme under attributes only, enabling runtime theme switching within one stylesheet.
- Emit per-theme bundles to dist/bundled/type/themes/*.css and make each *.global.css multi-theme; add sass-true spec tests/typeThemeScoping.spec.scss.
- Remove the Auro 2 theme entirely via a shared scripts/excluded-themes.mjs filter and deletion of its source, and override Auro 1's emitted code to `atm`.

See post-mortem docs/post-mortem/1612078.md (lines 27–66) for the root cause and the fix.

Co-authored-by AI: Claude Opus 4.8
Replace the legacy Sass @import system across all src/ partials, bundled
theme/type entrypoints, and tests with the Sass module system (@use / @forward).
Dart Sass has deprecated @import and will remove it in Dart Sass 3.0.0; this
moves WCSS — and downstream consumers — off the deprecation path.

The shipped src/ (and compiled dist/) partials are the package's public API,
so this changes how WCSS is consumed:

- Load WCSS partials with `@use` instead of `@import`. Members are namespaced
  by default; use `as *` for the closest match to the old global behavior.
- Scope/prefix is now configured by loading `libSupport/manageScope` with
  `@use ... with ($scope: true, $prefix: true)` rather than setting globals
  before the import. The configured `@use` must come first in the compilation.
- `!important` output is configured via `@use utilityVariables/important with
  ($important: true)` instead of a global `$important`.
- Design tokens are now an explicit dependency: partials `@use` values from
  `@aurodesignsystem/design-tokens` directly instead of detecting globals via
  `meta.variable-exists()`. The design-tokens peer must be installed; injecting
  token globals ahead of the WCSS import no longer overrides values.
- Tests use the module API (`@use 'true' as *;`, `@use '<partial>' as * with (...)`).

Also fixes the Atmos theme essentials/fonts partials, which self-referenced
under the module system and triggered "module is already being loaded"; the
orphaned fonts/themes/_auro-1.scss is folded into fonts/themes/_atmos.scss.

Adds MIGRATION.md documenting the full v11 → v12 upgrade path.

BREAKING CHANGE: WCSS partials must now be loaded with the Sass module system
(@use/@forward) instead of @import. Scope/prefix and !important are configured
via `@use ... with (...)` on manageScope / important rather than global
variables, and design-token defaults are resolved from
@aurodesignsystem/design-tokens directly. See MIGRATION.md for the full guide.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ite AB#1388992

Replace the five retired-Orion documentation links in FEATURES.md (the
source of the WebCoreStyleSheets features page) so they no longer 404.
Four links keep their SassDoc anchors and only move host from
alaskaairlines.github.io/OrionWebCoreStyleSheets to
alaskaairlines.github.io/WebCoreStyleSheets; all five are upgraded to
https. The inset link is remapped to #utility-inset, since that utility
was demoted from a SassDoc mixin to generated classes and its old anchor
no longer exists. Every destination anchor was verified against the
built docs/index.html. Also adds the post-mortem for this ticket.

See post-mortem docs/post-mortem/1388992.md (lines 15-34) for the root cause and the fix rationale.

Co-authored-by AI: Claude Opus 4.8
The PR release job published prerelease versions (e.g. 0.0.0-pr294.0) with a bare `npm publish`. Newer npm refuses to publish a prerelease without an explicit dist-tag, failing the job with "You must specify a tag using --tag when publishing a prerelease version."

Add `--tag pr<PR number>` to the publish step so each PR release gets its own PR-scoped dist-tag, fixing the failure while ensuring PR releases never move the shared `latest` tag.

Co-authored-by AI: Claude Opus 4.8
…#1559488

Change the `engines.node` constraint in package.json (and the mirrored value in package-lock.json) from "^20 || ^22" to ">=20". The previous range excluded Node 24 even though CI already builds and releases against the 22/24 matrix, so the declared engine now matches both the CI matrix and the other Auro component repos.

Co-authored-by AI: Claude Opus 4.8
…anner AB#1502836

chalk was declared a runtime dependency solely so the shipped postinstall
banner (packageScripts/postinstall.mjs) could color its output. Because
postinstall runs on the consumer's machine and a dependency's
devDependencies are never installed there, simply moving chalk to
devDependencies would break consumer installs with "Cannot find module
'chalk'". Instead, replace chalk's two hex colors with raw ANSI truecolor
escape codes (#f26135 orange, #ffd200 bold yellow) so the banner is
unchanged, then remove chalk from the manifest entirely. The remaining
transitive chalk in the lockfile belongs to dev tooling and is now flagged
dev-only, so it no longer ships to consumers.

Co-authored-by AI: Claude Opus 4.8
…() calls #294

Revert the five first-class `if(sass(...): ...; else: ...)` calls in
_type-generator.scss to the classic `if($cond, $a, $b)` ternary. The
first-class form requires Dart Sass >=1.90, but peerDependencies.sass allows
^1.42.1; the ternary compiles across the full declared range and emits
identical output (verified on 1.42.1, 1.77.0, and 1.102.0).

Also:
- Remove the dead `auro-1: atm` entry from THEME_CODE_OVERRIDES; it never
  fired against design-tokens 9.3.3 and would collide with atmos's native
  `atm` code if auro-1 ever returned. Add a collision-warning comment.
- Drop an unused `@use` of the alaska type index in
  _type-classes-alaska-generator.scss.
- Switch the four src/config/<theme>/type/index.scss files from `@use` to
  `@forward` for accent/body/display/heading, so the parent `@forward "type"`
  actually re-exports the type config API (with `@use` it re-exported nothing).
  Also drop the now-unused top-level `@use ... SCSSVariables--<theme> as v`
  from each index; the leaf partials @use their own design-tokens.
- Guard both directions of the manifest<->code mapping in
  typeThemeScoping.spec.scss: add a reverse check that every theme in
  $wcss-theme-codes also appears in $wcss-all-theme-configs, so a coded theme
  cannot be silently omitted from the multi-theme bundles. Rename the atmos
  scope test to reflect that `atm` is atmos's native design-tokens code now
  that the THEME_CODE_OVERRIDES entry is gone.
- Correct stale "Auro 1" comments to "Atmos" in the atmos config indexes.
- Document in MIGRATION.md the `$paragraph` opt-in via `@use ... with()` and
  the removed per-theme bundled type paths.

Co-authored-by AI: Claude Opus 4.8
…tility classes #294

Resolve code-review findings on the Sass module-system migration (PR #294).

- responsive: fix the `lg` breakpoint guard/token in _responsive.scss
  (`ds-breakpoint-lg` → `ds-grid-breakpoint-lg`). `.util_is-lgOnly` and
  `.util_is-lgOnly--inline` now emit their `@media (min-width: 1024px)` rules
  instead of nothing.
- fontStyles: fix the invalid custom property on `.util_fontWeightDefault`
  (`var(--$ds-text-body-default-weight)` → `var(--ds-text-body-default-weight,
  $ds-text-body-default-weight)`).
- Remove the now-constant `meta.variable-exists()` guards from _responsive.scss
  and _fontStyles.scss (behavior-preserving — the token SCSS is `@use`d directly
  post-migration) and drop the unused `sass:meta` import.
- Rename the non-descriptive `auro-classic2` aliases to descriptive names with a
  collision-explaining comment (bundled legacy globals and demo styles).
- Document `EXCLUDED_THEMES = ['auro-2']` as a forward-proofing no-op.
- MIGRATION.md: note the `generate-theme-type-css-vars` signature change and the
  `auro-1` → Atmos compat shim; regenerate SassDoc (docs/index.html).

Verified: all shipped `dist/bundled` outputs are byte-identical to the pre-change
build; the only compiled deltas are the two intended fixes above. jest 52/52,
scss/css lint clean.

Co-authored-by AI: Claude Opus 4.8
Correct two inaccurate pieces of guidance in the type-theme migration docs:

- MIGRATION.md pointed direct `@use` consumers of the auro-1 compat shim at
  `src/type/themes/atmos/`, which does not exist and would fail with a Sass
  "Can't find stylesheet" error. Repoint to the bundled multi-theme file
  `src/bundled/type/themes/atmos` (emits Atmos as the `:root` default) and
  note that no single-theme atmos partial exists, leaving auro-1 as the only
  direct path for now.
- The _all-theme-configs.scss maintenance comment claimed a newly added theme
  is "silently" omitted with no build-time error. Correct it to describe the
  real two-file manual step: a missing bundled `<dir>.scss` fails the build,
  and a missing manifest entry is caught by typeThemeScoping.spec.scss.

Co-authored-by AI: Claude Opus 4.8
Remove @use statements that were no longer referenced after the module
migration: the "sass:meta" import in _normalize.scss and the redundant
SCSSVariables (aliased as tokens) import in _anchor-roleButton.scss.
No behavioral change — these modules were imported but unused.
…precated if() #294

Restore the Hawaiian accent typography behavior that regressed under the AB#1612078 multi-theme migration. The single, theme-agnostic .accent-* classes now always reference var(--wcss-accent-*-letter-spacing), so a theme can no longer opt out by omitting the class declaration (the old $accent-uses-letter-spacing: false path). Hawaiian's accent config lacked a letter-spacing key, so the custom property emitted empty and the shared class applied an invalid/inherited value. Set Hawaiian's accent letter-spacing to an explicit normal, neutralizing the shared declaration while other themes keep their 0.05em tracking.

Also drop the classic if() ternaries in _type-generator.scss in favor of @if/@else. The peerDep floor (sass ^1.42.1) predates first-class if(), while classic if() is on the Sass deprecation-removal path; this clears the [if-function] deprecation warnings emitted on every build.

Add a spec guarding that Hawaiian accent letter-spacing resolves to normal for every accent size.

Co-authored-by AI: Claude Opus 4.8
Resolve documentation and code-quality findings from the PR #294 review;
no behavior change to compiled output.

- docs(MIGRATION.md): correct design-tokens from "peer" to a direct
  dependency installed automatically; document the per-theme \$paragraph
  opt-in via essentials/base; fix the v11 type-generator example to be
  unnamespaced (it loaded via @import).
- build: ship MIGRATION.md in the npm tarball (.npmignore override) and
  run build:theme-codes in the prepare script so fresh clones compile.
- refactor: remove the dead top-level SCSSVariables @use from both bundled
  legacy globals (each dependency @uses it directly); rename the Atmos
  config map \$alaska-base-config to \$atmos-base-config for accuracy.
- test: assert the alaska-classic type scope selector resolves to asc.

Co-authored-by AI: Claude Opus 4.8
#294

Address code-review nits on the Sass module migration / theme-scoping work.

- Add a sass-true output/expect assertion for generate-multi-theme-type-css-vars:
  compiles a two-theme stub (alaska default + hawaiian) and verifies the default
  theme emits under :root plus its attribute selectors while the non-default theme
  is scoped to attribute selectors only. Because both sides run the same partial
  generators, the type-var internals cancel out and only the selector composition
  is under test — making the previously @error-only invariant continuously verified.
- Fix the SassDoc "altered output values" example in _layoutPropertiesGenerator.scss
  to be module-system correct: load the design-tokens module as tokens and pass
  overrides through @use ... with (...) instead of the pre-module "set $var then
  @use" pattern, so the example compiles if copied verbatim.
- Add a cross-reference comment on Hawaiian's $accent-uses-letter-spacing: false
  explaining why it must stay false (single-theme bundle preserves the no-tracking
  output) and pointing to the accent config's letter-spacing: normal rationale.

Co-authored-by AI: Claude Opus 4.8
Stop ignoring the build outputs so they are committed with source.

- Remove `dist` and `src/type/mixins/_theme-codes.scss` (plus its
  generated-by comment) from .gitignore.
- Add the compiled distributable bundle under dist/: the auroElement
  files, bundled legacy/theme/type global CSS (expanded + minified),
  and the demo wrapper/element demo styles.
- Add the generated Sass partial src/type/mixins/_theme-codes.scss.

Note: both dist/ and _theme-codes.scss are regenerated by the build
(`sweep`/`build` wipes and rebuilds dist/, `prepare` regenerates the
partial), so they may show churn after future builds.

Co-authored-by AI: Claude Opus 4.8
@jason-capsule42
jason-capsule42 requested a review from a team as a code owner August 17, 2026 20:58
@jason-capsule42 jason-capsule42 self-assigned this Aug 17, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @jason-capsule42, your pull request is larger than the review limit of 150000 diff characters

@sourcery-ai

sourcery-ai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Reviewer's Guide

Updates WebCoreStyleSheets to v11.1.3 with Sass module (@use/@forward) migration, integration with the latest @aurodesignsystem/design-tokens APIs, and new multi-theme typography bundling; adjusts utilities, layouts, and docs output to align with the module-based build and theme switching support.

File-Level Changes

Change Details Files
Migrate core SCSS sources from @import to the Sass module system (@use/@forward) and wire them to the new design tokens packages.
  • Replace many @import statements with @use/@forward across core, essentials, headings, grids, normalize, fonts, utility mixins, and utility classes.
  • Introduce explicit module imports for design-tokens (SCSSVariables, SCSSVariableMap) instead of relying on global availability.
  • Update references to legacy globals ($scope, $prefix, $important, token maps) to use module namespaces like manageScope, important, tokens, SCSSVariables.
src/_normalize.scss
src/_headings.scss
src/_grids.scss
src/essentials/_base.scss
src/essentials/legacy/_auro-classic.scss
src/elementDemoStyles/elementDemoStyles.scss
src/utilityClasses/_responsive.scss
src/utilityMixins/_spacingUtility.scss
src/utilityMixins/_layoutPropertiesGenerator.scss
src/utilityClasses/_fontStyles.scss
src/utilityClasses/_displayProperties.scss
src/utilityClasses/_layoutProperties.scss
src/utilityClasses/_listProperties.scss
src/utilityClasses/_inset.scss
src/type/mixins/_fluid-type.scss
src/type/partials/_body.scss
src/fonts/themes/_alaska.scss
src/fonts/themes/_alaska-classic.scss
src/fonts/themes/_hawaiian.scss
src/config/alaska/base/essentials.scss
src/config/hawaiian/base/essentials.scss
src/type/themes/hawaiian/index.scss
src/type/mixins/_type-generator.scss
src/config/alaska-classic/type/index.scss
tests/styleTest.scss
tests/propGenerator.spec.scss
Align typography system and multi-theme support with design-tokens v9, including new theme-aware CSS variable generation and theme codes.
  • Add theme-codes build step and multi-theme type CSS generation in the type.classes build script.
  • Refactor type generator mixins to accept theme-name and emit :root plus data-aag-theme scoped custom properties.
  • Add Alaska and Hawaiian theme-specific type configuration wiring using module imports rather than implicit globals.
  • Update fluid type and body partials to use map.* helpers and centralized cssNamespace for custom property naming.
scripts/type.classes.css.build.mjs
src/type/mixins/_type-generator.scss
src/type/mixins/_fluid-type.scss
src/type/partials/_body.scss
src/type/themes/hawaiian/index.scss
src/config/alaska/type/index.scss
src/config/hawaiian/type/body.scss
src/config/hawaiian/type/display.scss
src/config/hawaiian/type/heading.scss
src/config/hawaiian/type/accent.scss
src/config/alaska/base/essentials.scss
src/config/hawaiian/base/essentials.scss
Update responsive, spacing, list, inset, and layout utility helpers to work with the module-based tokens and important flag.
  • Refactor spacingUtility to consume tokens via module namespace and use new helper functions for list, map, and contains operations.
  • Adjust responsive visibility utilities to use breakpoints module and important module for !important management, and remove variable-exists guards relying on legacy globals.
  • Update inset and layout utilities to use manageScope and important modules, and to reference token values via module imports where needed.
  • Ensure list utilities use token-based sizing and manageScope for scoped/prefixed selector generation.
src/utilityMixins/_spacingUtility.scss
src/utilityClasses/_responsive.scss
src/utilityClasses/_inset.scss
src/utilityClasses/_layoutProperties.scss
src/utilityMixins/_layoutPropertiesGenerator.scss
src/utilityClasses/_listProperties.scss
src/utilityClasses/_displayProperties.scss
src/utilityClasses/_fontStyles.scss
Refresh build tooling, package metadata, and documentation to support the new workflow and version.
  • Bump library version in docs output from 11.1.2 to 11.1.3 and update SassDoc examples to use @use syntax.
  • Update package.json dependencies (design-tokens v9, newer semantic-release/npm, sass, live-server, nodemon, etc.) and scripts (build:theme-codes, prepack, prepare, sassdoc build script).
  • Switch tests/styleTest and propGenerator specs to use @use-based imports and configure mixins via with ().
  • Adjust FEATURES.md links and code snippets to reference the new @use-based configuration patterns for scope, prefix, and important.
docs/index.html
package.json
FEATURES.md
tests/styleTest.scss
tests/propGenerator.spec.scss
scripts/theme.global.css.build.mjs
scripts/theme-codes.build.mjs
scripts/sassdoc.build.mjs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

Copy link
Copy Markdown

🚀 PR Release Published! v0.0.0-pr296.0

To install:

npm install @aurodesignsystem-dev/webcorestylesheets@0.0.0-pr296.0

Install via alias:

npm install @aurodesignsystem@npm:@aurodesignsystem-dev/webcorestylesheets@0.0.0-pr296.0

View on npmjs.com

@jason-capsule42
jason-capsule42 deleted the jbaker/commitDist branch August 17, 2026 21:49
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