Skip to content

Commit 5acdf2a

Browse files
lucianoratameromaribedrankkellydesignbluewave41slightlyoffbeat
authored
WT-1000: Pattern lib refactor (#1346)
* Add cards list block as a possibility for free form pages * Refactor button component to not render <a> when there's no link * Fix dialog css when used inside of a .fl-buttons tag * Add new css utilities for conditionally displaying content * Add set as default button block with dummy data * Add js logic to manage setting firefox as default browser * Add set as default snippet * Add cms tag and apply it to the set as default block's template * Add tests * Refactor set as default snippet and block * Remove unnecessary template tag * Update migration * Add default browser conditions to conditional display * Fix platform conditions on default browser snippet * Add missing default browser conditions to block * modal revisions, fixing a bad migration * fixing tests * fixing tests again * Add isUITourEnabled helper and apply it to the isDefaultBrowser check * Fix set default messages that shouldn't show on Firefox * Add missing empty option to default browser conditional choices * Fix set as default CSS selector * Add Set as Default snippet to DB export * Only add set as default button when UI Tour is allowed * Add merge migration * Only start check timer when set as default button is clicked * Make multiple instances of set as default buttons possible * Use div instead of p for notification headings, since they use rich text * Align notification text to the start on set-as-default modal * Fix tests * Separate set as default and ui tour helpers into their own files * Refactor set as default into a component class * Update migrations * Create data migration to add Editors permissions for Set as Default Snippet * Remove useless css condition * remove notification, use `is-not-default` conditional around button * remove success message from modal * Update test_set_as_default_snippet.py * Add "copy link to clipboard" button to the download section of the snippet * button alignment * Use download firefox button include on set as default snippet * Add static bundles entries for the page-specific css files * Remove pages samples from the pattern library * Add page-specific css bundles to the templates * Wrap page-specific css with @layer page * Remove page-specific css imports from the main flare26 css file * Fix media queries on page-specific css * Make flare import anywhere loader recursive * Move component CSS files to their own folder * Reorganize pattern library files Still need to find out which components in the flare-26 folder aren't related to flare 26, so some of them might be removed in a future commit. * Separate flare 25 from 26 in the pattern library's sidebar * Point base path for the visual regression tests to the flare 26 folder * Fix visual regression tests * Remove redundant pattern library samples for flare26 * Set flare26 as the default case in the pattern library base template * Add visual regression tests for dialog and tag components * Add visual regression tests for illustration card variants * Add visual regression tests for heading variants * Treat flare26 as the default case in pattern library yamls * Add visual regression tests for missing components * Remove redundant body text pattern lib sample * Remove redundant card pattern lib samples * Add missing snapshots * Fix sticker card border and card body color on dark mode * Make base pattern library samples not force light/dark modes * Refactor visual regression tests to test dark mode * Fix spacing on icon-list component * Remove 2026 mentions on flare26 pattern library samples and tests * Add container width prop to pattern library cards list samples * Update snapshots * Update Card Gallery pattern library copy * Redirect /mobile/get-app to /mobile (#1350) * Enable stub attribution mode on freeform pages (#1352) Change FreeFormPage2026 to base its promote_panels on UTMParamsMixin.promote_panels instead of AbstractSpringfieldCMSPage.promote_panels. This ensures the UTM parameter promote panels are included for this page type while still appending the enable_marketing_attribution FieldPanel. * Add analytics attributes to all rich text links (#1332) * Add analytics attributes to all rich text links * Fix migration * Fix richtext template tag tests * Make sure Rich Text Block uses |richtext by default * Fix rich text block position attr when context variable isn't set * Check URL on external link handler before building the resulting HTML * Rename migration * Add document link to base rich text features * Fix attribute name on comment Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Add comment about apps ordering * Add unit tests for UID link methods * Add analytics attributes to Wagtail Document links * Add license * Rename migration * Fix |richtext test for FxA link --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update snapshots * Remove basic step cards pattern lib sample * Fix icon text list's icon bg and color * Remove outline from two column outline cards when an image is stuck --------- Co-authored-by: Mariana Bedran Lesche <maribedran@gmail.com> Co-authored-by: Kasey Kelly <kasey@servee.com> Co-authored-by: Matthew Semeniuk <9813994+bluewave41@users.noreply.github.com> Co-authored-by: Dan Brown <dbrown@mozilla.com> Co-authored-by: Mariana Bedran Lesche <mariana@lincolnloop.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 82f55b2 commit 5acdf2a

362 files changed

Lines changed: 1877 additions & 1240 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

media/css/cms/components/flare26-card.css

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ Sticker Card
229229
/* backdrop-filter: blur(7.5px); */
230230
background: var(--fl-theme-surface-card-gradient);
231231
block-size: auto;
232+
border: 1px solid var(--sticker-card-border-color);
232233
border-radius: var(--token-border-radius-md);
233234
box-shadow: var(--fl-theme-shadow-card);
234235
color: var(--token-color-black-4);
@@ -243,12 +244,6 @@ Sticker Card
243244
transition: transform var(--token-transition-base);
244245
}
245246

246-
@media (prefers-color-scheme: light) {
247-
.fl-split-page-lower .fl-sticker-card {
248-
border: 1px solid var(--card-border-color);
249-
}
250-
}
251-
252247
/* Same opacity-shadow technique as .fl-card::after — avoids per-frame repaints
253248
that transitioning box-shadow directly would cause. */
254249
.fl-sticker-card::after {

media/css/cms/components/flare26-icon-list.css

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66

77
.fl-icon-text-list {
8-
--fl-theme-color-icon-wrap: var(--token-color-soft-purple);
9-
--fl-theme-color-icon: var(--fl-theme-color-text);
108
columns: 24ch 2;
119
gap: var(--token-spacing-xl);
1210
list-style: none;
@@ -20,14 +18,10 @@
2018
display: flex;
2119
gap: var(--token-layout-3xs);
2220
margin-block-end: 0;
21+
padding-block: var(--token-spacing-sm);
2322
}
2423

2524
.fl-icon-text-list .fl-icon-wrap {
26-
background: transparent;
27-
color: var(--two-column-accent-color);
28-
}
29-
30-
.fl-split-page-upper .fl-icon-text-list,
31-
.fl-force-dark-theme .fl-icon-text-list {
32-
--fl-theme-color-icon-wrap: var(--token-color-medium-purple);
25+
background: var(--icon-text-list-icon-bg);
26+
color: var(--fl-theme-color-text);
3327
}

media/css/cms/components/flare26-two-column-cards.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
position: relative;
3232
}
3333

34+
.fl-two-column-card .fl-icon-text-list li {
35+
padding-block: 0;
36+
}
37+
3438
.fl-two-column-card .media img {
3539
inline-size: 100%;
3640
margin-block-end: 0;
@@ -40,6 +44,11 @@
4044
margin: 0;
4145
}
4246

47+
.fl-two-column-card .fl-icon-text-list .fl-icon-wrap {
48+
background: transparent;
49+
color: var(--fl-theme-color-text);
50+
}
51+
4352
.fl-two-column-cards-light-dark
4453
.fl-two-column-card-wrapper:first-child
4554
.fl-two-column-card {
@@ -97,6 +106,10 @@
97106
z-index: 1;
98107
}
99108

109+
.fl-two-column-card[class*='image-is-stuck'] {
110+
border-width: 0;
111+
}
112+
100113
.image-is-stuck-bottom-right .media,
101114
.image-is-stuck-bottom-left .media,
102115
.image-is-stuck-top-left .media,

media/css/cms/flare26-template.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ body.fl-modal-open {
3131
padding-block: 0 var(--fl-theme-main-border-radius);
3232
}
3333

34+
.fl-body {
35+
color: var(--fl-theme-color-text);
36+
}
37+
3438
.fl-split-page-upper,
3539
.fl-split-page-lower {
3640
margin: 0;

media/css/cms/flare26-theme.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Contextual CSS custom properties that change based on context (e.g. layout direc
108108
/* Card themes */
109109
--card-bg-color: var(--token-color-white);
110110
--card-border-color: var(--token-color-soft-purple);
111+
--sticker-card-border-color: var(--token-color-soft-purple);
111112
--theme-purple-card-bg-color: var(--token-color-soft-purple);
112113
--theme-purple-card-bullet-color: var(--token-color-purple);
113114
--theme-dark-purple-card-bg-color: var(--token-color-purple);
@@ -229,6 +230,9 @@ Contextual CSS custom properties that change based on context (e.g. layout direc
229230
),
230231
radial-gradient(165.25% 100% at 50% 0%, #d7c4f6 0%, #fdf4f3 86.06%);
231232

233+
/* Icon text list */
234+
--icon-text-list-icon-bg: var(--token-color-soft-purple);
235+
232236
/* Numbered list */
233237
--theme-numbered-list-background: var(--token-color-soft-purple-40);
234238
--theme-numbered-list-border-color: var(--token-color-soft-purple-4);
@@ -263,6 +267,7 @@ Contextual CSS custom properties that change based on context (e.g. layout direc
263267
--fl-menu-category-link-hover-bg-color: var(--token-color-link-purple);
264268

265269
/* Cards */
270+
--sticker-card-border-color: transparent;
266271
--fl-step-card-bg: var(--token-color-medium-purple);
267272
--fl-step-card-index-bg: var(--token-color-dark-purple);
268273
--fl-theme-illustration-icon-bg: var(--token-color-medium-purple);
@@ -393,6 +398,9 @@ Contextual CSS custom properties that change based on context (e.g. layout direc
393398
rgb(34, 4, 66) 80%
394399
);
395400

401+
/* Icon text list */
402+
--icon-text-list-icon-bg: var(--token-color-medium-purple);
403+
396404
/* Numbered list */
397405
--theme-numbered-list-background: transparent;
398406
--theme-numbered-list-border-color: var(--token-color-light-purple);
@@ -428,6 +436,7 @@ Contextual CSS custom properties that change based on context (e.g. layout direc
428436
--fl-menu-category-link-hover-bg-color: var(--token-color-soft-purple);
429437

430438
/* Cards */
439+
--sticker-card-border-color: var(--token-color-soft-purple);
431440
--fl-step-card-bg: var(--token-color-cream);
432441
--fl-step-card-index-bg: var(--token-color-white);
433442
--fl-theme-illustration-icon-bg: var(--token-color-soft-purple);
@@ -519,6 +528,9 @@ Contextual CSS custom properties that change based on context (e.g. layout direc
519528
--smart-window-play-icon-fill-color-hover: var(--token-color-black-4);
520529
--smart-window-play-icon-fill-color-active: #42414d;
521530

531+
/* Icon text list */
532+
--icon-text-list-icon-bg: var(--token-color-soft-purple);
533+
522534
/* Numbered list */
523535
--theme-numbered-list-background: var(--token-color-soft-purple-40);
524536
--theme-numbered-list-border-color: var(--token-color-soft-purple-4);
@@ -553,6 +565,7 @@ Contextual CSS custom properties that change based on context (e.g. layout direc
553565
--fl-menu-separator-color: var(--token-color-light-purple);
554566

555567
/* Cards */
568+
--sticker-card-border-color: transparent;
556569
--fl-step-card-bg: var(--token-color-medium-purple);
557570
--fl-step-card-index-bg: var(--token-color-dark-purple);
558571
--fl-theme-illustration-icon-bg: var(--token-color-medium-purple);
@@ -691,6 +704,9 @@ Contextual CSS custom properties that change based on context (e.g. layout direc
691704
rgb(34, 4, 66) 80%
692705
);
693706

707+
/* Icon text list */
708+
--icon-text-list-icon-bg: var(--token-color-medium-purple);
709+
694710
/* Numbered list */
695711
--theme-numbered-list-background: transparent;
696712
--theme-numbered-list-border-color: var(--token-color-light-purple);

media/css/cms/flare26-utilities.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ This is imported into both the legacy and modern stylesheets so the
1414
style rules should have any fallbacks needed for IE8+ and Safari 12.1+
1515
===================================================================== */
1616

17+
.fl-theme-background {
18+
background-color: var(--fl-theme-background);
19+
}
20+
1721
.max-width-wide-banner {
1822
margin: 0 auto;
1923
max-inline-size: var(--token-width-desktop-wide-banner);

springfield/cms/templates/cms/base-pattern.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
file, You can obtain one at https://mozilla.org/MPL/2.0/.
55
#}
66

7-
{% extends "cms/base-flare26.html" if "2026" in pattern_name else "cms/base-flare.html" %}
7+
{% extends "cms/base-flare.html" if "2025" in pattern_name else "cms/base-flare26.html" %}
88

99
{# Avoid referencing `page` which isn't provided by the pattern library #}
1010
{% block page_title %}{{ pattern_name }} | Pattern preview{% endblock %}

springfield/cms/templates/components/dialog.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
file, You can obtain one at https://mozilla.org/MPL/2.0/.
55
#}
66

7-
<dialog id="{{ id }}" class="fl-dialog">
7+
<dialog id="{{ id }}" class="fl-dialog"{% if testid %} data-testid="{{ testid }}"{% endif %}>
88

99
<button class="fl-dialog-close-button" aria-label="Close">
1010
<include:icon icon_name="close" />

springfield/cms/templates/components/tag.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
file, You can obtain one at https://mozilla.org/MPL/2.0/.
55
#}
66

7-
<span class="fl-tag fl-tag-{{ color }} fl-tag-{{ corners }}">
7+
<span class="fl-tag{% if color %} fl-tag-{{ color }}{% endif %}{% if corners %} fl-tag-{{ corners }}{% endif %}">
88
{% if before_icon %}
99
<include:icon
1010
icon_name="{{ before_icon }}"

springfield/cms/templates/pattern-library/components/cards-list/cards-list_outlined2026.html

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)