Skip to content

Commit 50dc2d7

Browse files
authored
feat: added tooltip for more info for hidden panel (#2854)
Signed-off-by: Brian <[email protected]>
1 parent b4e8c7c commit 50dc2d7

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

packages/frontend/src/lib/ContentDetailsLayout.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
export let detailsTitle: string;
33
export let detailsLabel: string;
4+
export let detailsSummary: string = '';
45
let open: boolean = true;
56
67
const toggle = (): void => {
@@ -35,7 +36,7 @@ const toggle = (): void => {
3536
class:block={!open}
3637
class="bg-[var(--pd-content-card-bg)] mt-5 p-4 rounded-md h-fit max-lg:hidden"
3738
aria-label={`toggle ${detailsLabel}`}>
38-
<button on:click={toggle} aria-label={`show ${detailsLabel}`}
39+
<button on:click={toggle} aria-label={`show ${detailsLabel}`} title={detailsSummary}
3940
><i class="fas fa-angle-left text-[var(--pd-content-card-icon)]"></i></button>
4041
</div>
4142
</div>

packages/frontend/src/lib/ContentDetailsLayoutTest.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import ContentDetailsLayout from './ContentDetailsLayout.svelte';
33
</script>
44

5-
<ContentDetailsLayout detailsTitle="a title" detailsLabel="a label">
5+
<ContentDetailsLayout detailsTitle="a title" detailsLabel="a label" detailsSummary="a summary">
66
<svelte:fragment slot="content">A Content</svelte:fragment>
77
<svelte:fragment slot="details">Details...</svelte:fragment>
88
</ContentDetailsLayout>

packages/frontend/src/pages/Playground.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,10 @@ function handleOnClick(): void {
212212
<svelte:fragment slot="content">
213213
<div class="flex flex-col w-full h-full bg-[var(--pd-content-bg)]">
214214
<div class="h-full overflow-auto" bind:this={scrollable}>
215-
<ContentDetailsLayout detailsTitle="Settings" detailsLabel="settings">
215+
<ContentDetailsLayout
216+
detailsTitle="Settings"
217+
detailsLabel="settings"
218+
detailsSummary="Playground Settings: edit model parameters and view metrics">
216219
<svelte:fragment slot="content">
217220
<div class="flex flex-col w-full h-full grow overflow-auto">
218221
<div aria-label="conversation" class="w-full h-full">

packages/frontend/src/pages/Recipe.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ function getFilter(items: ApplicationState[]): ApplicationState[] {
6565
<svelte:fragment slot="content">
6666
<div class="bg-[var(--pd-content-bg)] h-full overflow-y-auto">
6767
<Route path="/">
68-
<ContentDetailsLayout detailsTitle="AI App Details" detailsLabel="application details">
68+
<ContentDetailsLayout
69+
detailsTitle="AI App Details"
70+
detailsLabel="application details"
71+
detailsSummary="AI App Details: view the app repository">
6972
<svelte:fragment slot="content">
7073
<MarkdownRenderer source={recipe?.readme} />
7174
</svelte:fragment>

0 commit comments

Comments
 (0)