Skip to content

Commit d821ffb

Browse files
authored
feat(UI): Add view button is now larger and has a tooltip (#555)
This PR makes the add view button larger and adds a tooltip to it. UI preview: https://github.com/user-attachments/assets/c5f6de13-18b7-482e-9620-9772e7ecf024 Fixes #509
1 parent b554400 commit d821ffb

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

skore-ui/src/components/SectionHeader.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<script setup lang="ts">
2+
import FloatingTooltip from "@/components/FloatingTooltip.vue";
23
import SimpleButton from "@/components/SimpleButton.vue";
34
45
const props = defineProps<{
56
title: string;
67
subtitle?: string;
78
icon?: string;
89
actionIcon?: string;
10+
actionTooltip?: string;
911
}>();
1012
1113
const emit = defineEmits(["action"]);
@@ -21,7 +23,10 @@ const emit = defineEmits(["action"]);
2123
</span>
2224
</h1>
2325
<div class="action" v-if="props.actionIcon">
24-
<SimpleButton :icon="props.actionIcon" @click="emit('action')" />
26+
<FloatingTooltip :text="props.actionTooltip" v-if="props.actionTooltip">
27+
<SimpleButton :icon="props.actionIcon" @click="emit('action')" />
28+
</FloatingTooltip>
29+
<SimpleButton v-else :icon="props.actionIcon" @click="emit('action')" />
2530
</div>
2631
</div>
2732
</template>

skore-ui/src/components/SimpleButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ onBeforeMount(() => {
7676
background: var(--border-color-lower);
7777
box-shadow: inset 0 0 3.24px 2.4px rgb(var(--text-color-highlight) 0.5);
7878
color: var(--text-color-normal);
79-
font-size: var(--text-size-small);
79+
font-size: var(--text-size-normal);
8080
font-weight: var(--text-weight-normal);
8181
}
8282

skore-ui/src/views/ComponentsView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import DataFrameWidget from "@/components/DataFrameWidget.vue";
1313
import DropdownButton from "@/components/DropdownButton.vue";
1414
import DropdownButtonItem from "@/components/DropdownButtonItem.vue";
1515
import { type EditableListItemModel } from "@/components/EditableList.vue";
16+
import FloatingTooltip from "@/components/FloatingTooltip.vue";
1617
import HtmlSnippetWidget from "@/components/HtmlSnippetWidget.vue";
1718
import ImageWidget from "@/components/ImageWidget.vue";
1819
import MarkdownWidget from "@/components/MarkdownWidget.vue";

skore-ui/src/views/project/ProjectViewList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ onMounted(async () => {
9090
<SectionHeader
9191
title="Views"
9292
icon="icon-recent-document"
93-
action-icon="icon-plus-circle"
93+
action-icon="icon-plus"
94+
action-tooltip="Add a new view"
9495
@action="onAddView"
9596
/>
9697
<Simplebar class="list">

0 commit comments

Comments
 (0)