Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some bookmark design tweaks #4331

Merged
merged 2 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions web-admin/src/features/bookmarks/BaseBookmarkForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
import Label from "@rilldata/web-common/components/forms/Label.svelte";
import Switch from "@rilldata/web-common/components/forms/Switch.svelte";
import InputV2 from "@rilldata/web-common/components/forms/InputV2.svelte";
import InfoCircle from "@rilldata/web-common/components/icons/InfoCircle.svelte";
import Tooltip from "@rilldata/web-common/components/tooltip/Tooltip.svelte";
import TooltipContent from "@rilldata/web-common/components/tooltip/TooltipContent.svelte";
import FilterChipsReadOnly from "@rilldata/web-common/features/dashboards/filters/FilterChipsReadOnly.svelte";
import { useDashboardStore } from "@rilldata/web-common/features/dashboards/stores/dashboard-stores";
import type { V1TimeRange } from "@rilldata/web-common/runtime-client";
import { runtime } from "@rilldata/web-common/runtime-client/runtime-store";
import type { createForm } from "svelte-forms-lib";
import { InfoIcon } from "lucide-svelte";

export let metricsViewName: string;
export let formState: ReturnType<typeof createForm<BookmarkFormValues>>;
Expand Down Expand Up @@ -96,7 +96,7 @@ Managed bookmarks will be available to all viewers of this dashboard.`;
<Label class="font-normal flex gap-x-1 items-center" for="filtersOnly">
<span>Save filters only</span>
<Tooltip distance={8}>
<InfoCircle />
<InfoIcon class="text-gray-500" size="14px" strokeWidth={2} />
<TooltipContent
class="whitespace-pre-line"
maxWidth="600px"
Expand All @@ -114,7 +114,7 @@ Managed bookmarks will be available to all viewers of this dashboard.`;
<div class="text-left text-sm flex gap-x-1 items-center">
<span>Absolute time range</span>
<Tooltip distance={8}>
<InfoCircle />
<InfoIcon class="text-gray-500" size="14px" strokeWidth={2} />
<TooltipContent
class="whitespace-pre-line"
maxWidth="600px"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,16 @@
on:click={() => dispatch("create-home")}
slot="manage-project"
>
<div class="flex flex-row gap-x-2 items-center">
<div class="flex flex-row gap-x-2">
<HomeBookmarkPlus size="16px" />
<div class="text-xs">Bookmark current view as Home.</div>
<div>
<div class="text-xs font-medium text-gray-700 h-4">
Bookmark current view as Home.
</div>
<div class="text-[11px] font-normal text-gray-500 h-4">
This will be everyone’s main view for this dashboard.
</div>
</div>
</div>
</DropdownMenuItem>
{/if}
Expand Down
14 changes: 10 additions & 4 deletions web-admin/src/features/bookmarks/BookmarksDropdownMenuItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,17 @@
{#if !readOnly}
<div class="flex flex-row justify-end gap-x-2 items-start w-20">
{#if hovered}
<button on:click={editBookmark}>
<EditIcon size="16px" className="text-gray-400" />
<button
on:click={editBookmark}
class="bg-gray-100 hover:bg-primary-100 px-2 h-7 text-gray-400 hover:text-gray-500"
>
<EditIcon size="16px" />
</button>
<button on:click={deleteBookmark}>
<Trash size="16px" className="text-gray-400" />
<button
on:click={deleteBookmark}
class="bg-gray-100 hover:bg-primary-100 px-2 h-7 text-gray-400 hover:text-gray-500"
>
<Trash size="16px" />
</button>
{/if}
</div>
Expand Down
4 changes: 2 additions & 2 deletions web-common/src/components/forms/Select.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import InfoCircle from "@rilldata/web-common/components/icons/InfoCircle.svelte";
import Tooltip from "@rilldata/web-common/components/tooltip/Tooltip.svelte";
import TooltipContent from "@rilldata/web-common/components/tooltip/TooltipContent.svelte";
import { InfoIcon } from "lucide-svelte";
import { createEventDispatcher } from "svelte";
import CaretDownIcon from "../icons/CaretDownIcon.svelte";
import Menu from "../menu-v2/Menu.svelte";
Expand Down Expand Up @@ -43,7 +43,7 @@
{/if}
{#if tooltip}
<Tooltip distance={8}>
<InfoCircle />
<InfoIcon class="text-gray-500" size="14px" strokeWidth={2} />
<TooltipContent
slot="tooltip-content"
maxWidth="600px"
Expand Down
Loading