("() => `it reads ${document.documentElement.lang}/${document.documentElement.dir}, and its culture marker names ${document.head.querySelector('meta[name=\"forma-culture\"]')?.getAttribute('data-ui-culture') ?? 'nothing, since the page carries none'}`").ConfigureAwait(false);
+ }
+ catch (PlaywrightException exception)
+ {
+ return $"it couldn't be read: {exception.Message}";
+ }
}
/// Waits until the Server's culture panel on the page is interactive.
From 70c3da20aac386bc2a16e2981d50cdd59afe1a96 Mon Sep 17 00:00:00 2001
From: Eyal Alon <3756641+soyeyalon@users.noreply.github.com>
Date: Fri, 20 Nov 2026 11:09:47 +0200
Subject: [PATCH 5/8] test(feedback): wait for the popover to show before
reading its placement
---
.../e2e/Forma.Blazor.Browser.Tests/Components/FeedbackTests.cs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/e2e/Forma.Blazor.Browser.Tests/Components/FeedbackTests.cs b/tests/e2e/Forma.Blazor.Browser.Tests/Components/FeedbackTests.cs
index c6d58cc76..7ccd87989 100644
--- a/tests/e2e/Forma.Blazor.Browser.Tests/Components/FeedbackTests.cs
+++ b/tests/e2e/Forma.Blazor.Browser.Tests/Components/FeedbackTests.cs
@@ -157,9 +157,10 @@ public async Task Should_open_below_its_anchor_at_the_anchor_s_start(string runt
var details = page.Locator("#details");
var trigger = page.Locator("#details-trigger");
- // Act
+ // Act — the layer is stamped as the popover registers, ahead of the call that shows and places it
await trigger.ClickAsync();
await WaitForLayerAsync(details);
+ await Assertions.Expect(details).ToBeVisibleAsync();
// Assert — four pixels below the anchor, its start edge held four pixels within the viewport
var anchor = (await page.Locator("span", new() { Has = trigger }).BoundingBoxAsync())!;
From eca108545fbc958b78cb94309159510ffabce911 Mon Sep 17 00:00:00 2001
From: Eyal Alon <3756641+soyeyalon@users.noreply.github.com>
Date: Fri, 20 Nov 2026 15:19:59 +0200
Subject: [PATCH 6/8] test(transfer): paste each document of megabytes as
paragraphs
Chromium lays out a paragraph that takes its direction from its own text in time growing with the square of the paragraph's length, so one paragraph of two megabytes held the page for up to half a minute; in paragraphs it takes no longer than WebKit does, and the export check waits as long as any other.
---
.../Components/TransferTests.cs | 32 ++++++++++---------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/tests/e2e/Forma.Blazor.Browser.Tests/Components/TransferTests.cs b/tests/e2e/Forma.Blazor.Browser.Tests/Components/TransferTests.cs
index 35bf8bab6..fffa9914d 100644
--- a/tests/e2e/Forma.Blazor.Browser.Tests/Components/TransferTests.cs
+++ b/tests/e2e/Forma.Blazor.Browser.Tests/Components/TransferTests.cs
@@ -14,15 +14,20 @@ public sealed class TransferTests
// for a script's.
private static readonly LocatorAssertionsToHaveTextOptions Saved = new() { Timeout = 30_000 };
- // A paste of megabytes is taken, and its preview drawn, on WebAssembly's one thread, which a loaded runner took longer than
- // half a minute to do, so the check waits for each as long as for WebAssembly to start.
- private static readonly LocatorAssertionsToHaveTextOptions Taken = new() { Timeout = 60_000 };
- private static readonly LocatorClickOptions Drawn = new() { Timeout = 60_000 };
+ // A document of two megabytes in words and paragraphs, as a reader's document runs, since WebKit takes half a minute to lay out
+ // as much on one unbroken line, and Chromium lays out a paragraph that takes its direction from its own text, as the composer's
+ // do, in time growing with the square of the paragraph's length.
+ private const int ParagraphWords = 100;
+ private const int Paragraphs = 2_000;
// A value as the check page writes it: its length and the start of its SHA-256.
private static string Describe(string value)
=> $"{value.Length}:{Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(value)))[..16]}";
+ // The document of two megabytes, every word of it the one given.
+ private static string CreateDocument(string word)
+ => string.Concat(Enumerable.Repeat($"{string.Join(' ', Enumerable.Repeat(word, ParagraphWords))}
", Paragraphs));
+
public sealed class Forms(BrowserHost host)
{
[Theory]
@@ -72,15 +77,14 @@ public async Task Should_save_a_document_of_megabytes_pasted_into_the_rich_text_
await using var _ = context;
var canvas = page.Locator("#forma-body .forma-composer-rich-text-canvas");
await WaitForInputScopeAsync(page, "#forma-body .forma-composer-rich-text-canvas");
- // Two megabytes as words, as a reader's text runs, since WebKit takes half a minute to lay out as much on one unbroken line.
- const int Words = 200_000;
- await canvas.EvaluateAsync("(canvas, words) => { canvas.focus(); canvas.innerHTML = '' + Array(words).fill('xxxxxxxxx').join(' ') + '
'; canvas.dispatchEvent(new Event('input', { bubbles: true })); }", Words);
+ var document = CreateDocument("xxxxxxxxx");
+ await canvas.EvaluateAsync("(canvas, html) => { canvas.focus(); canvas.innerHTML = html; canvas.dispatchEvent(new Event('input', { bubbles: true })); }", document);
// Act
await page.Locator("#forma-save").ClickAsync();
// Assert
- await Assertions.Expect(page.Locator("#forma-body-saved")).ToHaveTextAsync(Describe($"{string.Join(' ', Enumerable.Repeat("xxxxxxxxx", Words))}
"), Saved);
+ await Assertions.Expect(page.Locator("#forma-body-saved")).ToHaveTextAsync(Describe(document), Saved);
}
[Theory]
@@ -232,12 +236,10 @@ public async Task Should_export_a_document_of_megabytes_from_its_preview(string
await using var _ = context;
var canvas = page.Locator("#forma-body .forma-composer-rich-text-canvas");
await WaitForInputScopeAsync(page, "#forma-body .forma-composer-rich-text-canvas");
- // Two megabytes as words, as a reader's text runs, since WebKit takes half a minute to lay out as much on one unbroken line.
- const int Words = 200_000;
- await canvas.EvaluateAsync("(canvas, words) => { canvas.focus(); canvas.innerHTML = '' + Array(words).fill('zzzzzzzzz').join(' ') + '
'; canvas.dispatchEvent(new Event('input', { bubbles: true })); }", Words);
- var document = $"{string.Join(' ', Enumerable.Repeat("zzzzzzzzz", Words))}
";
- await Assertions.Expect(page.Locator("#forma-body-length")).ToHaveTextAsync(document.Length.ToString(CultureInfo.InvariantCulture), Taken);
- await page.Locator("#forma-body").GetByRole(AriaRole.Tab, new() { Name = "Preview", Exact = true }).ClickAsync(Drawn);
+ var document = CreateDocument("zzzzzzzzz");
+ await canvas.EvaluateAsync("(canvas, html) => { canvas.focus(); canvas.innerHTML = html; canvas.dispatchEvent(new Event('input', { bubbles: true })); }", document);
+ await Assertions.Expect(page.Locator("#forma-body-length")).ToHaveTextAsync(document.Length.ToString(CultureInfo.InvariantCulture));
+ await page.Locator("#forma-body").GetByRole(AriaRole.Tab, new() { Name = "Preview", Exact = true }).ClickAsync();
var export = page.Locator("#forma-body .forma-composer-toolbar").GetByRole(AriaRole.Button, new() { Name = "Export HTML", Exact = true });
// Act
@@ -245,7 +247,7 @@ public async Task Should_export_a_document_of_megabytes_from_its_preview(string
// Assert — the page the browser composed, the document whole within it
var exported = await page.EvaluateAsync("address => fetch(address).then(response => response.text()).then(text => text.split('zzzzzzzzz').length - 1)", download.Url);
- Assert.Equal(Words, exported);
+ Assert.Equal(Paragraphs * ParagraphWords, exported);
}
// The name as an item of the list holds it.
From a65ae71f83baf97f943c4eea8f47ee086e429633 Mon Sep 17 00:00:00 2001
From: Eyal Alon <3756641+soyeyalon@users.noreply.github.com>
Date: Fri, 20 Nov 2026 16:13:29 +0200
Subject: [PATCH 7/8] test(culture): name the window titles and a later switch
when a web view's document misses Hebrew
---
.../WebViewExampleTests.cs | 45 ++++++++++++++++---
1 file changed, 38 insertions(+), 7 deletions(-)
diff --git a/tests/e2e/Forma.Blazor.Browser.Tests/WebViewExampleTests.cs b/tests/e2e/Forma.Blazor.Browser.Tests/WebViewExampleTests.cs
index 142620680..cf76aca41 100644
--- a/tests/e2e/Forma.Blazor.Browser.Tests/WebViewExampleTests.cs
+++ b/tests/e2e/Forma.Blazor.Browser.Tests/WebViewExampleTests.cs
@@ -31,8 +31,8 @@ public async Task Should_switch_every_web_view_and_native_window_title_with_stri
await first.Locator(".hebrew").ClickAsync();
// Assert
- await ExpectHebrewAsync(first);
- await ExpectHebrewAsync(second);
+ await ExpectHebrewAsync(application, first);
+ await ExpectHebrewAsync(application, second);
await WaitForTitlesAsync(windows, HebrewTitle);
Assert.False(Directory.Exists(Path.Combine(application.Folder, ".locales")), "The publish carries no folder of locale files, so the host's strings come from its assembly.");
}
@@ -57,7 +57,7 @@ public async Task Should_keep_switching_the_native_window_left_and_its_web_view_
await first.Locator(".hebrew").ClickAsync();
// Assert
- await ExpectHebrewAsync(first);
+ await ExpectHebrewAsync(application, first);
await WaitForTitlesAsync(opened, HebrewTitle);
Assert.False(application.HasExited, $"The application exited as its other native window closed. It wrote:{Environment.NewLine}{application.GetOutput(40)}");
}
@@ -71,7 +71,7 @@ public async Task Should_start_in_the_culture_its_last_run_saved(string example)
{
var page = await OpenInEnglishAsync(previous);
await page.Locator(".hebrew").ClickAsync();
- await ExpectHebrewAsync(page);
+ await ExpectHebrewAsync(previous, page);
NativeWindows.Close((await WaitForWindowsAsync(previous, 1)).Single());
await previous.WaitForExitAsync();
}
@@ -81,7 +81,7 @@ public async Task Should_start_in_the_culture_its_last_run_saved(string example)
var restarted = await application.GetOtherWebViewAsync([], Runtime);
// Assert
- await ExpectHebrewAsync(restarted);
+ await ExpectHebrewAsync(application, restarted);
await WaitForTitlesAsync(await WaitForWindowsAsync(application, 1), HebrewTitle);
await restarted.Locator(".english").ClickAsync();
await Assertions.Expect(restarted.Locator(".welcome")).ToHaveTextAsync("Welcome");
@@ -103,11 +103,42 @@ private static async Task OpenInEnglishAsync(WebViewApplication applicati
}
// The host's own string, from the files its application embeds, the library's from the Hebrew pack, and the document's language and direction.
- private static async Task ExpectHebrewAsync(IPage page)
+ private static async Task ExpectHebrewAsync(WebViewApplication application, IPage page)
{
await Assertions.Expect(page.Locator(".welcome")).ToHaveTextAsync(Welcome);
await Assertions.Expect(page.Locator("nav")).ToHaveAttributeAsync("aria-label", PaginationLabel);
- await WaitForDocumentAsync(page, "he/rtl");
+
+ try
+ {
+ await WaitForDocumentAsync(page, "he/rtl");
+ }
+ catch (TimeoutException exception)
+ {
+ throw new TimeoutException($"{exception.Message}; {await DescribeFollowingAsync(application, page)}", exception);
+ }
+ }
+
+ // What tells a web view its application's coordinator let go of from one whose document missed a single switch: the native
+ // windows' titles, which follow the application's culture, and whether the document follows a switch to English after it.
+ private static async Task DescribeFollowingAsync(WebViewApplication application, IPage page)
+ {
+ var titles = string.Join(", ", NativeWindows.Find(application.ProcessId).Select(NativeWindows.GetTitle));
+
+ try
+ {
+ await page.Locator(".english").ClickAsync(new() { Timeout = 5000 });
+ await WaitForDocumentAsync(page, "en-US/ltr", 5000);
+
+ return $"the native windows' titles read {titles}, and a switch to English after it moved the document to en-US/ltr";
+ }
+ catch (TimeoutException exception)
+ {
+ return $"the native windows' titles read {titles}, and a switch to English after it didn't move the document: {exception.Message}";
+ }
+ catch (PlaywrightException exception)
+ {
+ return $"the native windows' titles read {titles}, and a switch to English after it couldn't be made: {exception.Message}";
+ }
}
// The application's native windows, once it shows as many as it is asked for.
From 88056ea3d87c4efb9b5315c484266aac8c41a281 Mon Sep 17 00:00:00 2001
From: Eyal Alon <3756641+soyeyalon@users.noreply.github.com>
Date: Fri, 20 Nov 2026 16:17:56 +0200
Subject: [PATCH 8/8] chore: release 1.0.0-preview.12
---
CHANGELOG.md | 2 +-
Directory.Build.props | 2 +-
docs/features-status.md | 2 +-
src/Framework/Forma.Framework.Localization/README.md | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd467561f..57db3ae13 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,7 +7,7 @@ set out. What Forma gained before its first release, month by month, is in [the
## `1.0.0-preview.12`
-*Unreleased*
+*November 20, 2026*
- A gender expression chooses a string's words by whom it is about, as a plural expression chooses them by a count:
`[$ [Rider] gender; female: Escaladora; other: Escalador; $]`. Its fields are `female`, `male` and `other`, and an
diff --git a/Directory.Build.props b/Directory.Build.props
index 4a79036f0..85ff12137 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -27,7 +27,7 @@
1.0.0
- preview.11
+ preview.12
diff --git a/docs/features-status.md b/docs/features-status.md
index 6ba814047..427c64586 100644
--- a/docs/features-status.md
+++ b/docs/features-status.md
@@ -7,7 +7,7 @@
| Measure | Now |
| --- | --- |
| Components | 67 implemented and 7 in progress, as [the catalog](component-catalog.md) lists them, and 21 planned, as [the roadmap](component-roadmap.md) orders them |
-| Packages | Every project under `src/` but the Showcase, released from `main` by `release.yml` to nuget.org and the organization's GitHub feed, the latest published release `1.0.0-preview.11` |
+| Packages | Every project under `src/` but the Showcase, released from `main` by `release.yml` to nuget.org and the organization's GitHub feed, the latest published release `1.0.0-preview.12` |
| Render modes | Interactive Server, WebAssembly and Auto implemented: every call a component makes to a script and every call back checked in each, and on the Server in WebKit, the engine of Safari and of Apple's web views, every runtime on a page following its culture coordinator, a client reading its host's own strings, and a host setting either arrangement up as the README says; static rendering implemented, every check page rendered statically with no enabled control that needs interactivity; Blazor Hybrid implemented on WPF, Windows Forms and MAUI on Windows, every component checked in a web view and each host's application set up as the README says; an inventory holds every component to a check page in every render mode |
The gate runs every check [the verification design](verification-design.md#gates) sets out, each platform's where the machine can run it. It passes locally on Windows and in CI on Linux, on Windows and on an Android emulator.
diff --git a/src/Framework/Forma.Framework.Localization/README.md b/src/Framework/Forma.Framework.Localization/README.md
index 51563c26f..aa92f5853 100644
--- a/src/Framework/Forma.Framework.Localization/README.md
+++ b/src/Framework/Forma.Framework.Localization/README.md
@@ -368,7 +368,7 @@ and referencing this package, whose build does the rest:
-
+