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

Handle neverShowQueries inside the KebabMenu component. #2950

Merged
merged 14 commits into from
Feb 13, 2025
5 changes: 5 additions & 0 deletions .changeset/nasty-pumas-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@evidence-dev/core-components': patch
---

Dont hide entire kebab menu when neverShowQueries is true
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script>
import { dev } from '$app/environment';
import { Icon } from '@steeze-ui/svelte-icon';
import { X, Menu2 } from '@steeze-ui/tabler-icons';
import { addBasePath } from '@evidence-dev/sdk/utils/svelte';
Expand Down Expand Up @@ -118,9 +117,7 @@
{/if}
</div>
<div class="relative">
{#if dev || !neverShowQueries}
<KebabMenu />
{/if}
<KebabMenu {neverShowQueries} />
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
}

const { selectedAppearance, activeAppearance, cycleAppearance, themesConfig } = getThemeStores();

export let neverShowQueries;

$: themeLabel =
$selectedAppearance === 'system'
? 'System'
Expand All @@ -47,14 +50,17 @@
Print PDF
<DropdownMenu.Shortcut>⌘P</DropdownMenu.Shortcut>
</DropdownMenu.Item>
<DropdownMenu.Item
on:click={(e) => {
e.preventDefault();
showQueries.update((val) => !val);
}}
>
{$showQueries ? 'Hide ' : 'Show '} Queries
</DropdownMenu.Item>
{#if dev || !neverShowQueries}
<DropdownMenu.Item
on:click={(e) => {
e.preventDefault();
showQueries.update((val) => !val);
}}
>
{$showQueries ? 'Hide ' : 'Show '} Queries
</DropdownMenu.Item>
{/if}

{#if themesConfig.appearance.switcher}
<DropdownMenu.Item
on:click={(e) => {
Expand Down
Loading
Loading