Skip to content

Commit 2abd070

Browse files
committed
components/tooltip: Remove unintentional whitespace elements
1 parent 9023fc7 commit 2abd070

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

app/components/tooltip.gjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,12 @@ export default class Tooltip extends Component {
6464
return () => cleanup();
6565
});
6666

67+
// The `{{~@x~}}` is used for whitespace control to ensure we don't insert a leading whitespace element
6768
<template>
69+
{{~@x~}}
6870
<span class='anchor' {{this.onInsertAnchor this}} />
6971

70-
{{#if this.visible}}
72+
{{~#if this.visible}}
7173
{{#in-element this.containerElement}}
7274
<div class='tooltip' ...attributes {{this.attachTooltip this side=@side}}>
7375
{{#if (has-block)}}
@@ -77,6 +79,6 @@ export default class Tooltip extends Component {
7779
{{/if}}
7880
</div>
7981
{{/in-element}}
80-
{{/if}}
82+
{{/if~}}
8183
</template>
8284
}

e2e/routes/settings/tokens/index.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ test.describe('/settings/tokens', { tag: '@routes' }, () => {
4949
await expect(page).toHaveURL('/settings/tokens');
5050
await expect(page.locator('[data-test-api-token]')).toHaveCount(1);
5151
await expect(page.locator('[data-test-endpoint-scopes]')).toHaveText(
52-
'Scopes: publish-new , publish-update , and yank',
52+
'Scopes: publish-new, publish-update, and yank',
5353
);
54-
await expect(page.locator('[data-test-crate-scopes]')).toHaveText('Crates: serde , serde-* , and serde_*');
54+
await expect(page.locator('[data-test-crate-scopes]')).toHaveText('Crates: serde, serde-*, and serde_*');
5555
});
5656
});

tests/routes/settings/tokens/index-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ module('/settings/tokens', function (hooks) {
5454
await visit('/settings/tokens');
5555
assert.strictEqual(currentURL(), '/settings/tokens');
5656
assert.dom('[data-test-api-token]').exists({ count: 1 });
57-
assert.dom('[data-test-endpoint-scopes]').hasText('Scopes: publish-new , publish-update , and yank');
58-
assert.dom('[data-test-crate-scopes]').hasText('Crates: serde , serde-* , and serde_*');
57+
assert.dom('[data-test-endpoint-scopes]').hasText('Scopes: publish-new, publish-update, and yank');
58+
assert.dom('[data-test-crate-scopes]').hasText('Crates: serde, serde-*, and serde_*');
5959
});
6060
});

0 commit comments

Comments
 (0)