diff --git a/design/system/foundations.html b/design/system/foundations.html index 44af5291..4f68b0eb 100644 --- a/design/system/foundations.html +++ b/design/system/foundations.html @@ -11,6 +11,7 @@ + @@ -196,6 +197,14 @@

For a form of settings: the label and the help at the start, the control at

The same field in a narrow place

+
+
+ + +

Shown in search results and when the site is shared.

+
+
+

Beside a control taller than a line, the help follows its label, not the foot of the control

A group of controls

@@ -232,7 +241,7 @@

Dark, compact, right to left

ARIA and keys LevelStatic Parameters -Classesfl-field; --horizontal; parts fl-field__label, __required, __meta (with --over), __error, __help +Classesfl-field; --horizontal, whose control spans the rows of the label and the help; parts fl-field__label, __required, __meta (with --over), __error, __help Tokens @@ -278,6 +287,12 @@

States

+

A short value

+
+ items +
+

fl-input--short: for a number of items or a time, the box keeps 12 rem and does not fill the row of its field.

+

Dark, compact, right to left

@@ -294,7 +309,7 @@

Dark, compact, right to left

ARIA and keys LevelStatic. Posts as a form field in static rendering. Parameters -Classesfl-input; --s, --l, --mono; parts fl-input__control, __icon, __affix, __action +Classesfl-input; --s, --l, --mono, --short; parts fl-input__control, __icon, __affix, __action Tokens diff --git a/design/system/layout-navigation.html b/design/system/layout-navigation.html index 13bb00ed..bc8595e2 100644 --- a/design/system/layout-navigation.html +++ b/design/system/layout-navigation.html @@ -878,6 +878,21 @@

Tabs that are pages

When each tab has an address of its own, the tabs are links in a <nav> and the current one carries aria-current="page". This form needs no script.

+

Actions at the end

+
+
+ +
+ +
+
+
+

Actions that belong to the row, such as Save view, stand beside the list on its line, not in it: a list of tabs holds tabs alone. Where the list is too long it scrolls, and the actions stay.

+

In a card

@@ -919,8 +934,8 @@

Dark, compact, right to left

Element<div class="fl-tabs"> around a <div role="tablist"> of <button role="tab"> and one <div role="tabpanel"> for each tab, as drawn here. FlTabs sends a <nav> of jump links (<a href="…#panel">) and a <div> for each panel, all in the page, and the script of the library gives them the roles. As pages: <nav class="fl-tabs"> around the list of <a>, without the roles. ARIA and keys LevelNative. The form with links works in static rendering. The form with panels gets its arrow keys and its change of panel from the script of the library, in static rendering as in the interactive modes (decision record 0003). With no script it stays a list of links to panels that are all in the page. -Parameters -Classesfl-tabs; --contained; parts fl-tabs__list, __tab (with __count, __dot and its tones --success, --warning, --danger), __panel. The tab is a part of the tabs, not a block of its own. +Parameters +Classesfl-tabs (with __actions after the list); --contained; parts fl-tabs__list, __tab (with __count, __dot and its tones --success, --warning, --danger), __panel. The tab is a part of the tabs, not a block of its own. Tokens diff --git a/design/system/screens/content-list.html b/design/system/screens/content-list.html index cd4fd91e..d605ebbf 100644 --- a/design/system/screens/content-list.html +++ b/design/system/screens/content-list.html @@ -224,7 +224,9 @@ My drafts7 Scheduled3 Needs translation18 - +
+
+
@@ -329,7 +331,7 @@ Designing a content model that lastsdesigning-a-content-model -ENPublishedFR PublishedDE No translation +ENPublishedFR PublishedDE No translation Ada Lindqvist Guide 2 h ago @@ -338,7 +340,7 @@ Release notes 1.0release-notes-1-0 Publishes 1 Dec, 09:00 -ENDraftFR DraftDE No translation +ENDraftFR DraftDE No translation Jonas Weber News 3 h ago @@ -347,7 +349,7 @@ How we localize at scale MCP, written by Content Agent over MCPhow-we-localize-at-scale -ENDraftFR No translationDE No translation +ENDraftFR No translationDE No translation Content Agent Engineering 5 h ago @@ -365,7 +367,7 @@ A field guide to structured rich textfield-guide-rich-text -ENDraftFR No translationDE No translation +ENDraftFR No translationDE No translation Priya Nair Guide Yesterday @@ -401,7 +403,7 @@ Editor's handbook: the publishing workfloweditors-handbook-publishing -ENUnpublishedFR UnpublishedDE No translation +ENUnpublishedFR UnpublishedDE No translation Elena Marsh Guide 18 Nov @@ -432,7 +434,7 @@ Modified Draft Unpublished - No translation + No translation + @if (Actions is not null) + { + @* Beside the list, not in it: a list of tabs holds tabs alone. *@ +
@Actions
+ } @ChildContent diff --git a/src/FluentCMS.Components/Layout/FlTabs.razor.cs b/src/FluentCMS.Components/Layout/FlTabs.razor.cs index c68b7406..dc6f01b6 100644 --- a/src/FluentCMS.Components/Layout/FlTabs.razor.cs +++ b/src/FluentCMS.Components/Layout/FlTabs.razor.cs @@ -19,6 +19,7 @@ public sealed partial class FlTabs [Parameter] public EventCallback ValueChanged { get; set; } [Parameter] public bool Contained { get; set; } [Parameter] public RenderFragment? ChildContent { get; set; } + [Parameter] public RenderFragment? Actions { get; set; } [Parameter(CaptureUnmatchedValues = true)] public IReadOnlyDictionary? AdditionalAttributes { get; set; } [Inject] private IServiceProvider Services { get; set; } = default!; diff --git a/src/FluentCMS.Components/PublicAPI.Unshipped.txt b/src/FluentCMS.Components/PublicAPI.Unshipped.txt index 267d7730..c984816f 100644 --- a/src/FluentCMS.Components/PublicAPI.Unshipped.txt +++ b/src/FluentCMS.Components/PublicAPI.Unshipped.txt @@ -871,6 +871,8 @@ FluentCMS.Components.FlTable.SortChanged.set -> void FluentCMS.Components.FlTable.SortHref.get -> System.Func!, string!>? FluentCMS.Components.FlTable.SortHref.set -> void FluentCMS.Components.FlTabs +FluentCMS.Components.FlTabs.Actions.get -> Microsoft.AspNetCore.Components.RenderFragment? +FluentCMS.Components.FlTabs.Actions.set -> void FluentCMS.Components.FlTabs.AdditionalAttributes.get -> System.Collections.Generic.IReadOnlyDictionary? FluentCMS.Components.FlTabs.AdditionalAttributes.set -> void FluentCMS.Components.FlTabs.ChildContent.get -> Microsoft.AspNetCore.Components.RenderFragment? diff --git a/src/FluentCMS.Components/Styles/components/field.css b/src/FluentCMS.Components/Styles/components/field.css index 7569760b..05c2ff02 100644 --- a/src/FluentCMS.Components/Styles/components/field.css +++ b/src/FluentCMS.Components/Styles/components/field.css @@ -76,6 +76,10 @@ &.fl-field--horizontal { container-type: inline-size; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); + /* Beside a control that is taller than a line, the help follows its + label: the control spans the first two rows, and the second takes the + height that is left. */ + grid-template-rows: auto 1fr; column-gap: var(--fl-gap-l); & > .fl-field__label, @@ -101,11 +105,27 @@ grid-row: 1; } + /* The first control, where it is not a box of one line: a text + area, a group of radios or switches, a drop zone. */ + & > :nth-child(1 of :not(.fl-field__label, .fl-field__help, .fl-field__error, .fl-field__meta)):not(.fl-input, .fl-select, .fl-segmented, .fl-switch, .fl-checkbox) { + grid-row: 1 / span 2; + } + + /* A drop zone has its first baseline inside its area, which would + bring the label down to it. */ + & > .fl-file-drop-zone { + align-self: start; + } + & > .fl-field__help { grid-column: 1; grid-row: 2 / span 2; } + &:has(> :nth-child(1 of :not(.fl-field__label, .fl-field__help, .fl-field__error, .fl-field__meta)):not(.fl-input, .fl-select, .fl-segmented, .fl-switch, .fl-checkbox)) > .fl-field__help { + grid-row: 2; + } + & > .fl-field__meta { grid-column: 2; } diff --git a/src/FluentCMS.Components/Styles/components/input.css b/src/FluentCMS.Components/Styles/components/input.css index 522b6cd1..d68d67b2 100644 --- a/src/FluentCMS.Components/Styles/components/input.css +++ b/src/FluentCMS.Components/Styles/components/input.css @@ -155,6 +155,12 @@ --fl-input-padding: var(--fl-control-padding-l); } + /* For a short value, such as a number of items or a time: the box does not + fill the row of its field. */ + &.fl-input--short { + max-inline-size: var(--fl-size-2xs); + } + /* For a value that is code: a path, a key, an identifier. */ &.fl-input--mono { font-family: var(--fl-font-family-mono); diff --git a/src/FluentCMS.Components/Styles/components/tabs.css b/src/FluentCMS.Components/Styles/components/tabs.css index a7455b98..0429fb28 100644 --- a/src/FluentCMS.Components/Styles/components/tabs.css +++ b/src/FluentCMS.Components/Styles/components/tabs.css @@ -147,6 +147,34 @@ } } + /* Actions at the end of the row of tabs, such as Save view. They are not tabs, so they stand beside the list, on + its line. Where the list would be narrower than a few tabs, they go under it, at the end. The panels take the + whole width. */ + &:has(> .fl-tabs__actions) { + display: flex; + flex-wrap: wrap; + + & > .fl-tabs__list { + flex: 1 1 var(--fl-size-2xs); + } + + & > :not(.fl-tabs__list, .fl-tabs__actions) { + flex: 1 0 100%; + } + } + + & > .fl-tabs__actions { + display: flex; + flex: none; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + gap: var(--fl-space-1); + margin-inline-start: auto; + padding-inline: var(--fl-space-2) var(--fl-tabs-inset); + background: linear-gradient(var(--fl-color-border) 0 0) 0 100% / 100% var(--fl-border-width) no-repeat; + } + & > .fl-tabs__panel { padding-block-start: var(--fl-tabs-gap); border-radius: var(--fl-radius-s); @@ -190,7 +218,7 @@ } @media (forced-colors: active) { - & > .fl-tabs__list { + & > :is(.fl-tabs__list, .fl-tabs__actions) { border-block-end: var(--fl-border-width) solid CanvasText; background: none; } diff --git a/tests/FluentCMS.Components.Browser/Foundations/ComponentPartsTests.cs b/tests/FluentCMS.Components.Browser/Foundations/ComponentPartsTests.cs index fa025ee5..37fbbfc4 100644 --- a/tests/FluentCMS.Components.Browser/Foundations/ComponentPartsTests.cs +++ b/tests/FluentCMS.Components.Browser/Foundations/ComponentPartsTests.cs @@ -60,6 +60,46 @@ public async Task AnAncestorThatIsNotAPageIsTextAndTheTabOrderPassesIt(RenderMod await Expect(trail.GetByRole(AriaRole.Link, new() { Name = "Articles" })).ToBeFocusedAsync(); } + [Theory] + [ModeData(Check = PageCheck.Look, Page = "tabs")] + public async Task ActionsOfTheTabsStandOnTheLineOfTheListAndOutsideIt(RenderMode mode) + { + await using GalleryPage sample = await gallery.OpenAsync(mode, "tabs", new() { Direction = "rtl" }); + IPage page = sample.Page; + ILocator tabs = page.Locator("#tabs-actions"); + await Expect(tabs.Locator(".fl-tabs__list #tabs-save-view")).ToHaveCountAsync(0); + Assert.True(await tabs.EvaluateAsync(""" + el => { const list = el.querySelector(':scope > .fl-tabs__list').getBoundingClientRect(), + actions = el.querySelector(':scope > .fl-tabs__actions').getBoundingClientRect(), box = el.getBoundingClientRect(); + return Math.abs(list.bottom - actions.bottom) < 0.5 && actions.right <= list.left + 0.5 && Math.abs(actions.left - box.left) < 0.5; } + """), "The actions are not at the end of the line of the tabs in right to left."); + } + + [Theory] + [ModeData(Check = PageCheck.Look, Page = "settings")] + public async Task AShortValueKeepsItsWidthAndTheHelpOfATallControlFollowsItsLabel(RenderMode mode) + { + await using GalleryPage sample = await gallery.OpenAsync(mode, "settings", new() { Width = 1440 }); + IPage page = sample.Page; + Assert.Equal(192, await page.Locator("#set-page-size").EvaluateAsync("el => el.closest('.fl-input').getBoundingClientRect().width"), 0.5); + Assert.True(await page.Locator("#set-description").EvaluateAsync(""" + el => { const field = el.closest('.fl-field'), label = field.querySelector('.fl-field__label').getBoundingClientRect(), + help = field.querySelector('.fl-field__help').getBoundingClientRect(), control = el.getBoundingClientRect(); + return help.top < control.bottom && help.top - label.bottom < 16; } + """), "The help is not under its label beside the tall control."); + } + + // A box of one line keeps the help in the rows of the error: the error stays right under its control. + [Theory] + [ModeData(Check = PageCheck.Look, Page = "field")] + public async Task TheErrorOfAShortControlInAHorizontalFieldStaysUnderIt(RenderMode mode) + { + await using GalleryPage sample = await gallery.OpenAsync(mode, "field", new() { Width = 1440 }); + double gap = await sample.Page.GetByLabel("Support address").EvaluateAsync( + "el => { const field = el.closest('.fl-field'); return field.querySelector('.fl-field__error').getBoundingClientRect().top - el.closest('.fl-input').getBoundingClientRect().bottom; }"); + Assert.InRange(gap, 0, 12); + } + [Theory] [ModeData] public async Task ShowingTheLevelsLeftOutPutsFocusOnTheFirstEvenWhenItIsText(RenderMode mode) diff --git a/tests/FluentCMS.Components.Browser/Screens/ContentListTests.cs b/tests/FluentCMS.Components.Browser/Screens/ContentListTests.cs index ded433a4..e9120c05 100644 --- a/tests/FluentCMS.Components.Browser/Screens/ContentListTests.cs +++ b/tests/FluentCMS.Components.Browser/Screens/ContentListTests.cs @@ -33,7 +33,7 @@ await Expect(page.Locator("#list-views .fl-tabs__count")).ToHaveTextAsync( await Expect(page.Rows().First.Locator("th")).ToContainTextAsync(Spring); await Expect(page.Row(Spring).Locator("[data-locale=en]")).ToHaveTextAsync("ENModified"); await Expect(page.Row(ReleaseNotes)).ToContainTextAsync("Publishes 1 Dec, 09:00"); - await Expect(page.Row(ContentModel).Locator("td:nth-child(3) .gallery-screen-badge-missing")).ToHaveTextAsync("DE No translation"); + await Expect(page.Row(ContentModel).Locator("td:nth-child(3) .fl-badge--info")).ToHaveTextAsync("DE No translation"); await Expect(page.Range()).ToHaveTextAsync("1 to 10 of 128"); await Expect(page.Locator("#list-table th[aria-sort]")).ToHaveTextAsync(new System.Text.RegularExpressions.Regex("^Updated")); await Expect(page.Locator("#list-table th[aria-sort]")).ToHaveAttributeAsync("aria-sort", "descending"); diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.dark-compact-rtl.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.dark-compact-rtl.png index 880a3449..816b219f 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.dark-compact-rtl.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.dark-compact-rtl.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.forced-320.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.forced-320.png index bbf722fb..c811b962 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.forced-320.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.forced-320.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.light.png index 8998ef47..5f532221 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.server.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.static.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.static.light.png index 39c5f5aa..2cd9076b 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.static.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/content.static.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/window.server.dark-compact-rtl.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/window.server.dark-compact-rtl.png index 240a26cc..3728b24c 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/window.server.dark-compact-rtl.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list-entry/window.server.dark-compact-rtl.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.dark-compact-rtl.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.dark-compact-rtl.png index 349eff6a..d364c205 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.dark-compact-rtl.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.dark-compact-rtl.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.forced-320.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.forced-320.png index b4952f12..8ed81c38 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.forced-320.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.forced-320.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.light.png index 08c2d352..1c37b5f2 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.server.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.static.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.static.light.png index b2a4a2b4..ce874c22 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.static.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/content.static.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.server.dark-compact-rtl.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.server.dark-compact-rtl.png index 0b53e7df..93aa7fa0 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.server.dark-compact-rtl.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.server.dark-compact-rtl.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.server.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.server.light.png index 4bb59020..0380c587 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.server.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.server.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.static.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.static.light.png index 9bca42ed..06ebcfa8 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.static.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/content-list/window.static.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/number-input/sizes-2.static.dark-compact-rtl.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/number-input/sizes-2.static.dark-compact-rtl.png new file mode 100644 index 00000000..f0fa3867 Binary files /dev/null and b/tests/FluentCMS.Components.Browser/Visual/Baselines/number-input/sizes-2.static.dark-compact-rtl.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/number-input/sizes-2.static.forced-320.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/number-input/sizes-2.static.forced-320.png new file mode 100644 index 00000000..96852ae5 Binary files /dev/null and b/tests/FluentCMS.Components.Browser/Visual/Baselines/number-input/sizes-2.static.forced-320.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/number-input/sizes-2.static.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/number-input/sizes-2.static.light.png new file mode 100644 index 00000000..5c1ad084 Binary files /dev/null and b/tests/FluentCMS.Components.Browser/Visual/Baselines/number-input/sizes-2.static.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.server.dark-compact-rtl.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.server.dark-compact-rtl.png index 83d39c99..0fd91cf3 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.server.dark-compact-rtl.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.server.dark-compact-rtl.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.server.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.server.light.png index 93752c96..928ea0de 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.server.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.server.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.static.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.static.light.png index 22debb7d..0618b343 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.static.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/content.static.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.server.dark-compact-rtl.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.server.dark-compact-rtl.png index 92d996e4..7d61148a 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.server.dark-compact-rtl.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.server.dark-compact-rtl.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.server.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.server.light.png index 21fbefb8..9f945568 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.server.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.server.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.static.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.static.light.png index da2c8951..f7d42899 100644 Binary files a/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.static.light.png and b/tests/FluentCMS.Components.Browser/Visual/Baselines/settings/window.static.light.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/tabs/actions-1.static.dark-compact-rtl.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/tabs/actions-1.static.dark-compact-rtl.png new file mode 100644 index 00000000..c11e9cb4 Binary files /dev/null and b/tests/FluentCMS.Components.Browser/Visual/Baselines/tabs/actions-1.static.dark-compact-rtl.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/tabs/actions-1.static.forced-320.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/tabs/actions-1.static.forced-320.png new file mode 100644 index 00000000..6a891bea Binary files /dev/null and b/tests/FluentCMS.Components.Browser/Visual/Baselines/tabs/actions-1.static.forced-320.png differ diff --git a/tests/FluentCMS.Components.Browser/Visual/Baselines/tabs/actions-1.static.light.png b/tests/FluentCMS.Components.Browser/Visual/Baselines/tabs/actions-1.static.light.png new file mode 100644 index 00000000..8b8e12a5 Binary files /dev/null and b/tests/FluentCMS.Components.Browser/Visual/Baselines/tabs/actions-1.static.light.png differ diff --git a/tests/FluentCMS.Components.Tests/Layout/FlTabsTests.cs b/tests/FluentCMS.Components.Tests/Layout/FlTabsTests.cs index 8f99598b..d68f0877 100644 --- a/tests/FluentCMS.Components.Tests/Layout/FlTabsTests.cs +++ b/tests/FluentCMS.Components.Tests/Layout/FlTabsTests.cs @@ -66,6 +66,21 @@ private IRenderedComponent RenderTabs(IEnumerable tabs, Action _context.Services.GetRequiredService(); + [Fact] + public void ActionsStandBesideTheListAndBeforeThePanels() + { + var cut = RenderTabs(Project, p => p.Add(t => t.Actions, builder => builder.AddMarkupContent(0, ""))); + + var children = cut.Find("div.fl-tabs").Children; + Assert.Equal("fl-tabs__list", children[0].ClassName); + Assert.Equal("fl-tabs__actions", children[1].ClassName); + Assert.Contains("fl-tabs__panel", children[2].ClassName); + Assert.Empty(cut.FindAll(".fl-tabs__list button")); + Assert.Equal("Save view", cut.Find("div.fl-tabs__actions > button").TextContent); + + Assert.Empty(RenderTabs(Project).FindAll(".fl-tabs__actions")); + } + [Fact] public void PanelTabsAreJumpLinksToPanelsThatAreAllInThePage() {