Remove Discourse loading ellipsis from buttons
This commit is contained in:
1 parent
81a6b9b98a
commit
a271d1148f
2 files changed
+2
-27
No files matched your search
@@ -13,10 +13,6 @@ export default class NotificationsItemComponent extends Component {
|
||||
return this.unreadCount > 0;
|
||||
}
|
||||
|
||||
get isLoading() {
|
||||
return this.args.item?.status === 'loading';
|
||||
}
|
||||
|
||||
get isError() {
|
||||
return this.args.item?.status === 'error';
|
||||
}
|
||||
@@ -64,12 +60,7 @@ export default class NotificationsItemComponent extends Component {
|
||||
/>
|
||||
</svg>
|
||||
|
||||
{{#if this.isLoading}}
|
||||
<span
|
||||
class="text-xs text-white/60"
|
||||
data-test-notifications-loading
|
||||
>…</span>
|
||||
{{else if this.hasUnread}}
|
||||
{{#if this.hasUnread}}
|
||||
<span
|
||||
class="rounded-full bg-indigo-500 px-1.5 text-xs font-semibold tabular-nums"
|
||||
data-test-notifications-count
|
||||
|
||||
@@ -18,9 +18,7 @@ module('Integration | Component | notifications/item', function (hooks) {
|
||||
|
||||
await render(<template><NotificationItem @item={{this.item}} /></template>);
|
||||
|
||||
assert
|
||||
.dom('a')
|
||||
.hasAttribute('href', 'https://forum.example.com');
|
||||
assert.dom('a').hasAttribute('href', 'https://forum.example.com');
|
||||
assert.dom('a').doesNotHaveAttribute('target', '_blank');
|
||||
assert.dom('a').hasAttribute('title', 'forum.example.com');
|
||||
assert.dom('a').hasAttribute('aria-label', 'forum.example.com');
|
||||
@@ -40,23 +38,9 @@ module('Integration | Component | notifications/item', function (hooks) {
|
||||
await render(<template><NotificationItem @item={{this.item}} /></template>);
|
||||
|
||||
assert.dom('[data-test-notifications-count]').doesNotExist();
|
||||
assert.dom('[data-test-notifications-loading]').doesNotExist();
|
||||
assert.dom('a svg').hasClass('text-white');
|
||||
});
|
||||
|
||||
test('it shows a loading placeholder before the first fetch', async function (assert) {
|
||||
this.set('item', {
|
||||
label: 'forum.example.com',
|
||||
href: 'https://forum.example.com',
|
||||
status: 'loading',
|
||||
unreadCount: 0,
|
||||
});
|
||||
|
||||
await render(<template><NotificationItem @item={{this.item}} /></template>);
|
||||
|
||||
assert.dom('[data-test-notifications-loading]').exists();
|
||||
});
|
||||
|
||||
test('it explains an unreachable source in the tooltip', async function (assert) {
|
||||
this.set('item', {
|
||||
label: 'forum.example.com',
|
||||
|
||||
Reference in new issue
Block a user