Skip to content

[MWPW-191561] - Enable gradient border color options in Studio editor#789

Open
antonio-rmrz wants to merge 9 commits intomainfrom
MWPW-191561
Open

[MWPW-191561] - Enable gradient border color options in Studio editor#789
antonio-rmrz wants to merge 9 commits intomainfrom
MWPW-191561

Conversation

@antonio-rmrz
Copy link
Copy Markdown
Contributor

@antonio-rmrz antonio-rmrz commented Apr 23, 2026

Closes https://jira.corp.adobe.com/browse/MWPW-191561

Summary

  • Add gradient-purple-blue and gradient-firefly-spectrum to the Fries variant's borderColor.specialValues in FRIES_AEM_FRAGMENT_MAPPING
  • Add CSS rules using ::before pseudo-element technique so gradient appears only at card edges without affecting interior background or content area
  • Matches gradient border behavior already available on Express and other templates in M@S Studio

Test URLs:

Pinata PR

auto and others added 3 commits April 23, 2026 13:00
Add gradient-purple-blue and gradient-firefly-spectrum to the Fries
card variant's borderColor specialValues and CSS, using the ::before
pseudo-element technique so the gradient is visible only at card edges.
- Extract gradient values into module constants as single source of
  truth (specialValues entries and CSS custom properties now share
  one definition each via unsafeCSS interpolation).
- Drop fixed waitForTimeout(2000) in gradient border test; the
  following step already uses auto-retrying toHaveAttribute assertions.
@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Apr 23, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-sync branch
Commits

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.49%. Comparing base (5d49c47) to head (31510d6).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #789      +/-   ##
==========================================
+ Coverage   87.45%   87.49%   +0.03%     
==========================================
  Files         214      214              
  Lines       63827    63871      +44     
==========================================
+ Hits        55821    55882      +61     
+ Misses       8006     7989      -17     
Files with missing lines Coverage Δ
studio/src/editors/merch-card-editor.js 85.14% <100.00%> (+<0.01%) ⬆️
web-components/src/variants/fries.js 98.84% <100.00%> (+0.38%) ⬆️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d49c47...31510d6. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@antonio-rmrz antonio-rmrz changed the title [MWPW-191561] - enable gradient border color options in Studio editor [MWPW-191561] - Enable gradient border color options in Studio editor Apr 23, 2026
The picker merged specialValues into colorArray unconditionally, then
prepended them again when !showAllSpectrum, so fries gradient options
rendered as two sp-menu-item elements with the same value. Playwright's
strict-mode locator then matched both and the nala gradient-border tests
failed.

Gate the colorArray merge on showAllSpectrum so the two insertion paths
are mutually exclusive.
Copy link
Copy Markdown
Collaborator

@Roycethan Roycethan left a comment

Choose a reason for hiding this comment

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

…hored

The previous ::before approach required `position: relative; z-index: 1`
on `.content` to layer above the inner fill pseudo. Because the badge
slot sits inside `.content`, that turned `.content` into the containing
block for the absolutely-positioned `[slot="badge"]`, pushing it 24px
into the padding area instead of anchoring to the host's padding box.

Switch to the layered-background pattern used by ah-promoted-plans:
paint the inner fill clipped to padding-box and the gradient clipped
to border-box, with a 1px transparent border acting as the gradient
slot. No pseudo-element, no z-index manipulation, no containing-block
side effects — the badge stays where the variant CSS puts it.
# Conflicts:
#	web-components/dist/mas.js
Match the ah-promoted-plans pattern: keep the gradient strings as JS
constants for the AEM fragment mapping, but reference the literal
values directly in CSS rules instead of defining --gradient-* vars
via unsafeCSS interpolation. No behavior change; removes a review
red flag.
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.

2 participants