[MWPW-198875] Preflight modal redesign — light theme on c2 tokens#6188
[MWPW-198875] Preflight modal redesign — light theme on c2 tokens#6188mokimo wants to merge 14 commits into
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
|
f084d69 to
635649c
Compare
SilviuLCF
left a comment
There was a problem hiding this comment.
QA verified , https://jira.corp.adobe.com/browse/MWPW-198875
overmyheadandbody
left a comment
There was a problem hiding this comment.
Thanks for the proposal and commit, Okan! Since this isn't customer-facing, I tried to be short with the feedback 😅
A few additional notes:
- can the redesigned asset boxes be applied in the Accessibility panel for the images with/without
alttext? - for the red bubbles that appear next the the section headings on the left rail, could a progress animation be displayed until the logic decides whether there are errors?
- a nice-to-have would be to better couple the typography rules here with the ones we're actually using in C2. Tokens will change; if we have some typography rules based on tokens and some on explicit values, we risk decoupling very quickly
- on mobile in the a11y tab, expanding violations leads to two scrollbars, could that be streamlined a bit?
- also on mobile in the a11y tab, the image columns are unequal, they should ideally have the same width
Great job overall!
| function loadAssets() { | ||
| const { miloLibs, codeRoot } = getConfig(); | ||
| const base = miloLibs || codeRoot; | ||
| C2_TOKENS.forEach((file) => loadStyle(`${base}/c2/styles/deps/${file}`)); |
There was a problem hiding this comment.
One thing I'd advise checking: remove the regular styles from the page, the C1 styles loaded from libs/styles/styles.css. Hopefully the Preflight looks mostly the same: The intention is to avoid style coupling between C1 and C2, which will be difficult to maintain in the longer run.
| --preflight-surface: var(--s2a-color-background-default); | ||
| --preflight-surface-subtle: var(--s2a-color-background-subtle); | ||
| --preflight-text: var(--s2a-color-content-default); | ||
| --preflight-text-subtle: var(--s2a-color-content-subtle); | ||
| --preflight-border: var(--s2a-color-border-subtle); | ||
| --preflight-hover: var(--s2a-color-transparent-black-08); | ||
| --preflight-cta-bg: var(--s2a-color-blue-900); | ||
| --preflight-cta-bg-hover: var(--s2a-color-blue-1000); | ||
| --preflight-cta-text: var(--s2a-color-gray-25); | ||
| --preflight-success: var(--s2a-color-green-900); | ||
| --preflight-warning: var(--s2a-color-orange-700); | ||
| --preflight-error: var(--s2a-color-red-900); | ||
| --preflight-focus: var(--s2a-color-focus-ring-default); |
There was a problem hiding this comment.
It feels a bit weird to have colors attached to variables that don't suggest color. --preflight-text, for example, could be typography (font-size, line-height, letter-spacing, etc.), color, or anything else related to the text. It's advisable to name the variables based on their intent
| position: fixed; | ||
| top: var(--s2a-spacing-16); | ||
| left: var(--s2a-spacing-16); | ||
| z-index: 10000; |
There was a problem hiding this comment.
Maybe a lower value would suffice?
- Use Milo standard breakpoints (900/1200) for the modal layout and fix the mobile top-nav so it scrolls horizontally instead of clipping. - General badge now also counts localization (faulty link) issues, not just structure checks, so it reflects everything shown in the panel. - Performance: replace the "Highlight the found LCP section" link with a "No LCP element detected" note when the page has no LCP. - Assets: clicking an asset card closes preflight and scrolls to (and briefly highlights) that element on the page; thumbnails zoom slightly on hover. - Memoize the localization check so the badge and General panel don't each re-fetch every link's status. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Mobile/tablet top nav now wraps so every tab is reachable without horizontal scrolling (scrolling a top nav isn't discoverable with a mouse). - After clicking an asset (which closes preflight and scrolls to the element), show a floating popover with "Back to Preflight" (reopens on the same tab) and "Dismiss", to make moving between elements and the UI seamless. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dal open - Position the "Back to Preflight" return popover at the asset's top-left (clamped to the viewport) instead of a fixed bottom bar. - Don't show the "content quality checks are failing" notification while the preflight modal is already open — the modal already surfaces the results. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Use a fixed top-left position for the "Back to Preflight" popover instead of anchoring it to the asset, so it stays put while scrolling the page. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ClipboardItem is a built-in browser global; the /* global */ comment causes a no-redeclare ESLint error. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…primitives - Add tokens.primitives.light.css to C2_TOKENS for complete token chain - Rename --preflight-text/--preflight-text-subtle → --preflight-fg/--preflight-fg-subtle (names now indicate color role, not CSS property type) - Convert all directional properties to logical equivalents: border-right → border-inline-end, left → inset-inline-start, text-align: left/right → start/end - Convert responsive section from desktop-first (max-width) to mobile-first (min-width): base styles now reflect the mobile layout, @min-width:900px restores the sidebar rail, @min-width:1200px enables two-up cards - Lower return-popover z-index from 10000 → 9999 - Remove hardcoded fallback values from --s2a-* token vars in the return popover (tokens are loaded at :root) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sage - Remove margin-inline: 0 override on .accessibility-columns at 900px+; cards were cancelling the 32px margin from .preflight-columns, rendering flush to the content edge on tablet/desktop - Align .access-columns base inline margin to 16px (was 32px) so the alt-text section matches the cards above it at mobile; restore 32px at 900px - Move viewport-too-small guard in Assets from per-group to panel level so the "resize to 1200px" message appears once instead of repeating per group Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1da0c47 to
e3da23a
Compare
… token naming - Replace --body-font-family with --preflight-font backed by C2 primitive --s2a-font-family-adobe-clean to remove C1 styles.css coupling - Rename --preflight-cta-text → --preflight-cta-fg (color vars should reflect their intent, not the element they style) - Convert all physical direction properties to logical equivalents: padding-left/right → padding-inline-*, margin-left/right → margin-inline-*, border-left → border-inline-start, left/right positioning → inset-inline-start/end, text-align: left/right → start/end, padding shorthand in return popover → padding-block + padding-inline-* - Reduce z-index on return popover from 9999 → 1000 (above gnav at 12, well below modal curtain at 99999) - Remove unnecessary hardcoded fallbacks from var() calls in return button styles and preflight-mas-unpublished; tokens are guaranteed loaded - Simplify responsive breakpoint comments to avoid encoding specific px values that may change with C2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
Ground-up restyle of the Milo Preflight modal to a premium, Adobe Spectrum-2-style light theme built on c2 (
--s2a-*) design tokens. Functionality is unchanged — only the visual/UX layer.Highlights
Testing
npm run test— 47 preflight tests pass; eslint clean; stylelint clean (aside from pre-existing repo-wide env-noise rules)?milolibs=preflight-redesign-light-theme.Resolves: MWPW-198875
🤖 Generated with Claude Code
Before / After

Before: https://main--milo--adobecom.aem.live/
After: https://preflight-redesign-light-theme--milo--adobecom.aem.live/