Skip to content

Commit 1939dae

Browse files
committed
feat(ui): refines tooltip text and placement per feedback
1 parent c786a49 commit 1939dae

File tree

8 files changed

+48
-46
lines changed

8 files changed

+48
-46
lines changed

src/app/components/dashboard/PersonalSummaryStrip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export default function PersonalSummaryStrip(props: PersonalSummaryStripProps) {
177177
</>
178178
)}
179179
</For>
180-
<InfoTooltip content="Click a stat to jump to that tab with filters applied." placement="bottom" />
180+
<InfoTooltip content="Click any count to view those items." placement="bottom" />
181181
</div>
182182
</Show>
183183
);

src/app/components/layout/FilterBar.tsx

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { createMemo, createSignal, createEffect, onCleanup, Show } from "solid-j
22
import { Select } from "@kobalte/core/select";
33
import { config } from "../../stores/config";
44
import { viewState, setGlobalFilter } from "../../stores/view";
5+
import { Tooltip } from "../shared/Tooltip";
56

67
interface FilterBarProps {
78
isRefreshing?: boolean;
@@ -118,34 +119,35 @@ export default function FilterBar(props: FilterBarProps) {
118119
</span>
119120
</Show>
120121

121-
<button
122-
onClick={props.onRefresh}
123-
disabled={props.isRefreshing}
124-
class="btn btn-ghost btn-sm"
125-
aria-label="Refresh data"
126-
>
127-
<Show
128-
when={props.isRefreshing}
129-
fallback={
130-
<svg
131-
xmlns="http://www.w3.org/2000/svg"
132-
class="h-4 w-4 inline-block mr-1"
133-
viewBox="0 0 20 20"
134-
fill="currentColor"
135-
aria-hidden="true"
136-
>
137-
<path
138-
fill-rule="evenodd"
139-
d="M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z"
140-
clip-rule="evenodd"
141-
/>
142-
</svg>
143-
}
122+
<Tooltip content="Refresh data">
123+
<button
124+
onClick={props.onRefresh}
125+
disabled={props.isRefreshing}
126+
class="btn btn-ghost btn-sm"
127+
aria-label="Refresh data"
144128
>
145-
<span class="loading loading-spinner loading-xs mr-1" />
146-
</Show>
147-
Refresh
148-
</button>
129+
<Show
130+
when={props.isRefreshing}
131+
fallback={
132+
<svg
133+
xmlns="http://www.w3.org/2000/svg"
134+
class="h-4 w-4"
135+
viewBox="0 0 20 20"
136+
fill="currentColor"
137+
aria-hidden="true"
138+
>
139+
<path
140+
fill-rule="evenodd"
141+
d="M4 2a1 1 0 011 1v2.101a7.002 7.002 0 0111.601 2.566 1 1 0 11-1.885.666A5.002 5.002 0 005.999 7H9a1 1 0 010 2H4a1 1 0 01-1-1V3a1 1 0 011-1zm.008 9.057a1 1 0 011.276.61A5.002 5.002 0 0014.001 13H11a1 1 0 110-2h5a1 1 0 011 1v5a1 1 0 11-2 0v-2.101a7.002 7.002 0 01-11.601-2.566 1 1 0 01.61-1.276z"
142+
clip-rule="evenodd"
143+
/>
144+
</svg>
145+
}
146+
>
147+
<span class="loading loading-spinner loading-xs" />
148+
</Show>
149+
</button>
150+
</Tooltip>
149151
</div>
150152
);
151153
}

src/app/components/shared/ExpandCollapseButtons.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ export interface ExpandCollapseButtonsProps {
88
export default function ExpandCollapseButtons(props: ExpandCollapseButtonsProps) {
99
return (
1010
<div class="flex items-center gap-1">
11-
<Tooltip content="Expand all">
11+
<Tooltip content="Expand all repos">
1212
<button
1313
class="btn btn-ghost btn-xs"
14-
aria-label="Expand all"
14+
aria-label="Expand all repos"
1515
onClick={props.onExpandAll}
1616
>
1717
<svg
@@ -30,10 +30,10 @@ export default function ExpandCollapseButtons(props: ExpandCollapseButtonsProps)
3030
</svg>
3131
</button>
3232
</Tooltip>
33-
<Tooltip content="Collapse all">
33+
<Tooltip content="Collapse all repos">
3434
<button
3535
class="btn btn-ghost btn-xs"
36-
aria-label="Collapse all"
36+
aria-label="Collapse all repos"
3737
onClick={props.onCollapseAll}
3838
>
3939
<svg

src/app/components/shared/RepoLockControls.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function RepoLockControls(props: RepoLockControlsProps) {
4949
</svg>
5050
</button>
5151
</Tooltip>
52-
<Tooltip content={lockInfo().isFirst ? "Already at top" : "Move up"}>
52+
<Tooltip content={lockInfo().isFirst ? "Already at top of pinned list" : "Move up"}>
5353
<button
5454
class="btn btn-ghost btn-xs"
5555
onClick={() => moveLockedRepo(props.tab, props.repoFullName, "up")}
@@ -62,7 +62,7 @@ export default function RepoLockControls(props: RepoLockControlsProps) {
6262
</svg>
6363
</button>
6464
</Tooltip>
65-
<Tooltip content={lockInfo().isLast ? "Already at bottom" : "Move down"}>
65+
<Tooltip content={lockInfo().isLast ? "Already at bottom of pinned list" : "Move down"}>
6666
<button
6767
class="btn btn-ghost btn-xs"
6868
onClick={() => moveLockedRepo(props.tab, props.repoFullName, "down")}

src/app/components/shared/StatusDot.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default function StatusDot(props: StatusDotProps) {
5757
);
5858

5959
return (
60-
<Tooltip content={cfg().label} focusable={!props.href}>
60+
<Tooltip content={cfg().label} focusable={!props.href} placement="right">
6161
<Show when={props.href} fallback={dot()}>
6262
{(url) => (
6363
<a

tests/components/ExpandCollapseButtons.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ import ExpandCollapseButtons from "../../src/app/components/shared/ExpandCollaps
66
describe("ExpandCollapseButtons", () => {
77
it("renders both buttons with correct aria-labels", () => {
88
render(() => <ExpandCollapseButtons onExpandAll={() => {}} onCollapseAll={() => {}} />);
9-
expect(screen.getByRole("button", { name: "Expand all" })).toBeTruthy();
10-
expect(screen.getByRole("button", { name: "Collapse all" })).toBeTruthy();
9+
expect(screen.getByRole("button", { name: "Expand all repos" })).toBeTruthy();
10+
expect(screen.getByRole("button", { name: "Collapse all repos" })).toBeTruthy();
1111
});
1212

1313
it("calls onExpandAll when expand button is clicked", async () => {
1414
const user = userEvent.setup();
1515
const onExpandAll = vi.fn();
1616
render(() => <ExpandCollapseButtons onExpandAll={onExpandAll} onCollapseAll={() => {}} />);
17-
await user.click(screen.getByRole("button", { name: "Expand all" }));
17+
await user.click(screen.getByRole("button", { name: "Expand all repos" }));
1818
expect(onExpandAll).toHaveBeenCalledTimes(1);
1919
});
2020

2121
it("calls onCollapseAll when collapse button is clicked", async () => {
2222
const user = userEvent.setup();
2323
const onCollapseAll = vi.fn();
2424
render(() => <ExpandCollapseButtons onExpandAll={() => {}} onCollapseAll={onCollapseAll} />);
25-
await user.click(screen.getByRole("button", { name: "Collapse all" }));
25+
await user.click(screen.getByRole("button", { name: "Collapse all repos" }));
2626
expect(onCollapseAll).toHaveBeenCalledTimes(1);
2727
});
2828
});

tests/components/IssuesTab.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ describe("IssuesTab", () => {
407407
expect(screen.queryByText("org/repo-b")).toBeNull();
408408

409409
// Collapse all — only affects visible (filtered) repos
410-
await user.click(screen.getByLabelText("Collapse all"));
410+
await user.click(screen.getByLabelText("Collapse all repos"));
411411
expect(screen.queryByText("Alice issue")).toBeNull();
412412

413413
// Remove filter — repo-b should still be expanded (was hidden during collapse-all)
@@ -469,7 +469,7 @@ describe("IssuesTab", () => {
469469
expect(screen.queryByText("Issue A")).toBeNull();
470470
expect(screen.queryByText("Issue B")).toBeNull();
471471

472-
await user.click(screen.getByLabelText("Expand all"));
472+
await user.click(screen.getByLabelText("Expand all repos"));
473473
screen.getByText("Issue A");
474474
screen.getByText("Issue B");
475475
});
@@ -485,7 +485,7 @@ describe("IssuesTab", () => {
485485
screen.getByText("Issue A");
486486
screen.getByText("Issue B");
487487

488-
await user.click(screen.getByLabelText("Collapse all"));
488+
await user.click(screen.getByLabelText("Collapse all repos"));
489489
expect(screen.queryByText("Issue A")).toBeNull();
490490
expect(screen.queryByText("Issue B")).toBeNull();
491491
});
@@ -581,7 +581,7 @@ describe("IssuesTab", () => {
581581
screen.getByText(/Page 1 of 2/);
582582

583583
// Expand all — affects repos on ALL pages
584-
await user.click(screen.getByLabelText("Expand all"));
584+
await user.click(screen.getByLabelText("Expand all repos"));
585585
// Repo-a items visible on page 1
586586
screen.getByText("Repo A issue 0");
587587

tests/components/PullRequestsTab.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ describe("PullRequestsTab", () => {
509509
expect(screen.queryByText("PR in repo A")).toBeNull();
510510
expect(screen.queryByText("PR in repo B")).toBeNull();
511511

512-
await user.click(screen.getByLabelText("Expand all"));
512+
await user.click(screen.getByLabelText("Expand all repos"));
513513

514514
screen.getByText("PR in repo A");
515515
screen.getByText("PR in repo B");
@@ -527,7 +527,7 @@ describe("PullRequestsTab", () => {
527527
screen.getByText("PR in repo A");
528528
screen.getByText("PR in repo B");
529529

530-
await user.click(screen.getByLabelText("Collapse all"));
530+
await user.click(screen.getByLabelText("Collapse all repos"));
531531

532532
expect(screen.queryByText("PR in repo A")).toBeNull();
533533
expect(screen.queryByText("PR in repo B")).toBeNull();
@@ -618,7 +618,7 @@ describe("PullRequestsTab", () => {
618618
screen.getByText(/Page 1 of 2/);
619619

620620
// Expand all — affects repos on ALL pages
621-
await user.click(screen.getByLabelText("Expand all"));
621+
await user.click(screen.getByLabelText("Expand all repos"));
622622
// Repo-a items visible on page 1
623623
screen.getByText("Repo A PR 0");
624624

0 commit comments

Comments
 (0)