Dashboard banners on a phone wrap inside the banner; the banner link takes the banner's colour
gates / gates (push) Successful in 1m5s

Seen on scratch 9202 with the R-906 build: once the real banner warnings showed (instead of an empty
overflow line), the link ran 90 px past a 390 px screen and rendered browser-default blue. Phone block:
.alert-banner wraps, .alert-message breaks long paths, .alert-link on its own line; .alert-link color: inherit.
Pinned in TestR907_PageHeaderWrapsOnAPhone (red against d5f2e47's CSS). No Hungarian string changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
This commit is contained in:
2026-10-08 14:41:18 +02:00
parent e37e9b50c6
commit 423b6d3404
3 changed files with 24 additions and 2 deletions
@@ -101,7 +101,8 @@ func TestStackCardHeaderLayout(t *testing.T) {
// R-907 — on a phone the launcher's title, domain chip and share button sat on one row that does not wrap; the
// button ran off the right edge (390 px, demo-hp 9201, 2026-10-08).
//
// RED-PROOF (REPORT): against 05e12921's style.css this fails — the 768px block has no .page-header rule.
// RED-PROOF (REPORT): against 05e12921's style.css this fails — the 768px block has no .page-header rule, no
// banner rule, and .alert-link has no colour.
func TestR907_PageHeaderWrapsOnAPhone(t *testing.T) {
data, err := StyleCSS()
if err != nil {
@@ -114,6 +115,16 @@ func TestR907_PageHeaderWrapsOnAPhone(t *testing.T) {
if !regexp.MustCompile(`\.share-open-btn \{[^}]*white-space: nowrap`).MatchString(block) {
t.Error("the share button's text must stay whole when it drops to its own line")
}
// A banner on a phone: the long message breaks and the link wraps inside the banner (seen on 9202 once R-906
// let the real banners through: the link ran past the screen). And the link has a colour of its own.
for _, re := range []string{`\.alert-banner \{[^}]*flex-wrap: wrap`, `\.alert-message \{[^}]*min-width: 0[^}]*overflow-wrap: anywhere`, `\.alert-link \{[^}]*flex-basis: 100%`} {
if !regexp.MustCompile(re).MatchString(block) {
t.Errorf("the phone block lacks %s", re)
}
}
if r := cssRule(t, string(data), ".alert-link"); !strings.Contains(r, "color: inherit") {
t.Errorf(".alert-link must take the banner's colour, not the browser's link blue: %s", r)
}
// The button is still in the header it wraps inside, in both languages.
s := i18nTestServer(t)
for _, c := range i18nCases() {