Jbaker/commit dist - #296
Closed
jason-capsule42 wants to merge 15 commits into
Closed
Conversation
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
There was a problem hiding this comment.
Sorry @jason-capsule42, your pull request is larger than the review limit of 150000 diff characters
Reviewer's GuideUpdates 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
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
🚀 PR Release Published! To install: npm install @aurodesignsystem-dev/webcorestylesheets@0.0.0-pr296.0Install via alias: npm install @aurodesignsystem@npm:@aurodesignsystem-dev/webcorestylesheets@0.0.0-pr296.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Checklist:
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:
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests:
Chores: