Skip to content

Commit 41f053f

Browse files
committed
fix(ui): prevent sessions header buttons stacking
1 parent dba4a2e commit 41f053f

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

tests/unit/session-header-actions-layout.test.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ test('sessions header actions keep buttons inline (contract)', () => {
2727
/\.sessions-header-actions\s*\{[\s\S]*?display:\s*inline-flex\s*!important\s*;[\s\S]*?flex-wrap:\s*nowrap\s*!important\s*;[\s\S]*?\}/m.test(css),
2828
'controls-forms.css should force sessions-header-actions inline-flex nowrap'
2929
);
30+
assert(
31+
/\.sessions-header-actions\s*>\s*\.btn-tool[\s\S]*?width:\s*auto\s*!important\s*;/m.test(css),
32+
'controls-forms.css should force sessions-header-actions > .btn-tool width auto'
33+
);
34+
assert(
35+
/\.sessions-header-actions\s*>\s*\.btn-tool-compact[\s\S]*?width:\s*auto\s*!important\s*;/m.test(css),
36+
'controls-forms.css should force sessions-header-actions > .btn-tool-compact width auto'
37+
);
3038
assert(
3139
!/\.sessions-header-actions\s*\{[\s\S]*?flex-wrap:\s*wrap\b/m.test(css),
3240
'sessions-header-actions must not allow flex-wrap: wrap'
@@ -49,4 +57,3 @@ test('sessions header actions keep buttons inline (contract)', () => {
4957
`sessions-header-actions should not be overridden in other stylesheets: ${unexpectedOverrides.join(', ')}`
5058
);
5159
});
52-

web-ui/styles/controls-forms.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@
116116

117117
.sessions-header-actions > .btn-tool,
118118
.sessions-header-actions > .btn-tool-compact {
119+
display: inline-flex !important;
120+
width: auto !important;
119121
white-space: nowrap;
120122
flex: 0 0 auto;
121123
}

0 commit comments

Comments
 (0)