Skip to content

Commit 2e1b262

Browse files
committed
feat(leaderboard): enhance header with beta indicator and tooltip
Adds a "BETA" indicator and tooltip to the leaderboard header, improving user awareness of the feature's status. Comments out conditional score indicators in the entries table to simplify the template and avoid unnecessary logic.
1 parent 129ba9b commit 2e1b262

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

app/components/leaderboard-page/entries-table/row.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@
4646
</td>
4747
<td class="px-4 py-2 whitespace-nowrap border border-gray-200">
4848
<div class="flex items-center justify-end">
49-
{{#if (eq @entry.score 142)}}
49+
{{!-- {{#if (eq @entry.score 142)}}
5050
<span class="inline-block align-middle text-teal-500 triangle-up mr-1.5" aria-hidden="true">
5151
<EmberTooltip @text="Increased from 139 to 142 in the past month" />
5252
</span>
53-
{{/if}}
53+
{{/if}} --}}
5454

55-
{{#if (eq @entry.score 99)}}
55+
{{!-- {{#if (eq @entry.score 99)}}
5656
<span class="inline-block align-middle text-red-500 triangle-down mr-1.5" aria-hidden="true">
5757
<EmberTooltip @text="Decreased from 199 to 99 in the past month" />
5858
</span>
59-
{{/if}}
59+
{{/if}} --}}
6060

6161
<div class="text-xs font-mono">
6262
<span class="{{if this.isCurrentUser 'text-teal-600' 'text-gray-700'}}">{{@entry.score}}</span>

app/components/leaderboard-page/header.hbs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<div class="flex items-center justify-between gap-x-6 gap-y-4 flex-wrap" ...attributes>
22
<div class="flex-shrink-0">
3-
<h3 class="text-2xl font-bold text-gray-800" data-test-leaderboard-title>
4-
{{@selectedLanguage.name}}
5-
Leaderboard
6-
</h3>
7-
<div class="text-xs text-gray-400" data-test-leaderboard-description>
8-
Leaderboard for
9-
{{@selectedLanguage.name}}
10-
users
3+
<div class="flex items-center gap-x-2">
4+
<h3 class="text-2xl font-bold text-gray-800" data-test-leaderboard-title>
5+
{{@selectedLanguage.name}}
6+
Leaderboard
7+
</h3>
8+
<Pill @color="green">
9+
BETA
10+
<EmberTooltip @text="We're still working on this feature, rough edges expected!" @side="top" />
11+
</Pill>
1112
</div>
1213
</div>
1314

0 commit comments

Comments
 (0)