mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 07:40:59 +00:00
fix: the provisioning line reads as a key reference, the safe-area test follows margin-inline
lint:i18n-keys took the spread in front of t() for a member call and did not see native.provisioning.sub; the sentence is its own constant now. The shell chrome test asks for the logical margins and their right-to-left swap.
This commit is contained in:
@@ -1554,12 +1554,10 @@ function showProvisioning(instanceUrl: string, welcome?: string): void {
|
||||
stepServer,
|
||||
stepReady
|
||||
);
|
||||
// The address set in bold inside the sentence, wherever the language puts it.
|
||||
const sentence = t('native.provisioning.sub', { host: '\u0000' });
|
||||
const sub = el('span', {});
|
||||
sub.append(
|
||||
...t('native.provisioning.sub', { host: '\u0000' })
|
||||
.split('\u0000')
|
||||
.flatMap((part, i) => (i ? [el('b', { dir: 'ltr' }, host), part] : [part]))
|
||||
);
|
||||
sub.append(...sentence.split('\u0000').flatMap((part, i) => (i ? [el('b', { dir: 'ltr' }, host), part] : [part])));
|
||||
const view = stateScreen({
|
||||
camera: chosenCamera,
|
||||
kicker: t('native.provisioning.kicker'),
|
||||
|
||||
@@ -63,8 +63,10 @@ describe('safe area in the touch shell', () => {
|
||||
it('FE-MOB-CHROME-005: without the rail the floating bars keep clear of a side inset, such as a camera in a corner', () => {
|
||||
const narrow = "html:not(:has(.m-shell[data-size='wide'], .m-shell[data-size='split'])) :is(.m-bar-x, .m-span-x) {";
|
||||
const rule = css.split(narrow)[1]?.split('}')[0] ?? '';
|
||||
expect(rule).toContain('margin-left: var(--m-safe-l, 0px);');
|
||||
expect(rule).toContain('margin-right: var(--m-safe-r, 0px);');
|
||||
expect(rule).toContain('margin-inline: var(--m-safe-l, 0px) var(--m-safe-r, 0px);');
|
||||
// The insets are the screen's: right to left takes them the other way round.
|
||||
const rtl = css.split(`html[dir='rtl']${narrow.slice('html'.length)}`)[1]?.split('}')[0] ?? '';
|
||||
expect(rtl).toContain('margin-inline: var(--m-safe-r, 0px) var(--m-safe-l, 0px);');
|
||||
// On a wide window the bars keep no side margin, so mx-auto still centres them.
|
||||
for (const cls of ['m-bar-x', 'm-span-x']) {
|
||||
expect(css.split(`\n.${cls} {`)[1]?.split('}')[0] ?? '').not.toContain('margin');
|
||||
|
||||
Reference in New Issue
Block a user