-
Notifications
You must be signed in to change notification settings - Fork 208
Fix: preset button visibility in smaller screen #2758
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
Changes from all commits
f182f7d
ff37a87
394cb06
d7b5167
b60295a
01a7cdc
bb76972
c636ede
2366a6b
2458eae
fb784f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| .responsive-table { | ||
| overflow: hidden; | ||
| width: 100%; | ||
| scrollbar-width: thin; | ||
| position: relative; | ||
| } |
ItzNotABug marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,9 +13,16 @@ | |
| } from '@appwrite.io/pink-svelte'; | ||
| import DomainMetrics from './domainMetrics.svelte'; | ||
| import { base } from '$app/paths'; | ||
| import { isSmallViewport } from '$lib/stores/viewport'; | ||
| import { app } from '$lib/stores/app'; | ||
| import { Button } from '$lib/elements/forms'; | ||
| import { IconDownload, IconPlus, IconUpload } from '@appwrite.io/pink-icons-svelte'; | ||
| import { | ||
| IconDownload, | ||
| IconPlus, | ||
| IconUpload, | ||
| IconAdjustments | ||
| } from '@appwrite.io/pink-icons-svelte'; | ||
| import DisplaySettingsModal from '$lib/layout/displaySettingsModal.svelte'; | ||
| import { ViewSelector } from '$lib/components'; | ||
| import { View } from '$lib/helpers/load'; | ||
| import { columns, presets } from './store'; | ||
|
|
@@ -33,6 +40,7 @@ | |
| let showCreate = false; | ||
| let showPresetModal = false; | ||
| let showImportModal = false; | ||
| let showDisplaySettingsModal = false; | ||
| let selectedPreset = ''; | ||
| async function downloadRecords() { | ||
|
|
@@ -70,23 +78,55 @@ | |
|
|
||
| <Layout.Stack gap="l"> | ||
| {#if data.recordList.total} | ||
| <Layout.Stack direction="row" justifyContent="space-between"> | ||
| <Layout.Stack direction="row" gap="s" inline> | ||
| <Button secondary on:click={() => (showImportModal = true)}> | ||
| <Icon icon={IconUpload} size="s" slot="start" /> | ||
| Import zone file | ||
| <Layout.Stack direction="row" gap="s" alignItems="center" wrap="wrap"> | ||
| <div style:order={$isSmallViewport ? 2 : undefined}> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what does this |
||
| <Button | ||
| secondary | ||
| icon={$isSmallViewport} | ||
| ariaLabel={$isSmallViewport ? 'Import zone file' : undefined} | ||
| on:click={() => (showImportModal = true)}> | ||
| {#if $isSmallViewport} | ||
| <Icon size="m" icon={IconUpload} /> | ||
| {:else} | ||
| <Icon icon={IconUpload} size="s" slot="start" /> | ||
| Import zone file | ||
| {/if} | ||
| </Button> | ||
| </div> | ||
|
|
||
| <div style:order={$isSmallViewport ? 3 : undefined}> | ||
| <Tooltip> | ||
| <PinkButton.Button variant="secondary" icon on:click={downloadRecords}> | ||
| <Icon icon={IconDownload} size="s" /> | ||
| <Icon icon={IconDownload} size={$isSmallViewport ? 'm' : 's'} /> | ||
| </PinkButton.Button> | ||
| <svelte:fragment slot="tooltip">Export as .txt</svelte:fragment> | ||
| </Tooltip> | ||
| </Layout.Stack> | ||
| <Layout.Stack direction="row" gap="s" inline> | ||
| <ViewSelector ui="new" view={View.Table} {columns} hideView /> | ||
| </div> | ||
|
Comment on lines
+97
to
+104
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add The Export button is always icon-only and relies solely on the Tooltip for description. Tooltips are not reliably accessible to screen readers. For consistency with the Import button (line 86), add an explicit ♿ Proposed fix <PinkButton.Button
variant="secondary"
icon
+ ariaLabel="Export as .txt"
on:click={downloadRecords}>
<Icon icon={IconDownload} size={$isSmallViewport ? 'm' : 's'} />
</PinkButton.Button>🤖 Prompt for AI Agents |
||
|
|
||
| {#if !$isSmallViewport} | ||
| <div style="flex: 1"></div> | ||
| {/if} | ||
|
|
||
| <div style:order={$isSmallViewport ? 4 : undefined}> | ||
| {#if $isSmallViewport} | ||
| <Button | ||
| secondary | ||
| icon | ||
| ariaLabel="Display settings" | ||
| on:click={() => (showDisplaySettingsModal = true)}> | ||
| <Icon icon={IconAdjustments} /> | ||
| </Button> | ||
| {:else} | ||
| <ViewSelector ui="new" view={View.Table} {columns} hideView /> | ||
| {/if} | ||
| </div> | ||
|
|
||
| <div | ||
| style:order={$isSmallViewport ? 1 : undefined} | ||
| style:flex={$isSmallViewport ? 1 : undefined}> | ||
| <Popover let:toggle padding="none"> | ||
| <Button secondary on:click={toggle}>Add preset</Button> | ||
| <Button secondary fullWidth={$isSmallViewport} on:click={toggle} | ||
| >Add preset</Button> | ||
| <svelte:fragment slot="tooltip" let:toggle> | ||
| <ActionMenu.Root> | ||
| {#each presets as preset} | ||
|
|
@@ -100,11 +140,16 @@ | |
| </ActionMenu.Root> | ||
| </svelte:fragment> | ||
| </Popover> | ||
| <Button size="s" on:click={() => (showCreate = true)}> | ||
| </div> | ||
|
|
||
| <div | ||
| style:order={$isSmallViewport ? 5 : undefined} | ||
| style:width={$isSmallViewport ? '100%' : undefined}> | ||
| <Button fullWidth={$isSmallViewport} on:click={() => (showCreate = true)}> | ||
| <Icon size="s" icon={IconPlus} slot="start" /> | ||
| Create record | ||
| </Button> | ||
| </Layout.Stack> | ||
| </div> | ||
| </Layout.Stack> | ||
| <Table {data} /> | ||
| {:else} | ||
|
|
@@ -153,3 +198,11 @@ | |
| {#if showRetry} | ||
| <RetryDomainModal bind:show={showRetry} selectedDomain={data.domain} /> | ||
| {/if} | ||
|
|
||
| {#if showDisplaySettingsModal} | ||
| <DisplaySettingsModal | ||
| bind:show={showDisplaySettingsModal} | ||
| {columns} | ||
| hideView | ||
| view={View.Table} /> | ||
| {/if} | ||
ItzNotABug marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: appwrite/console
Length of output: 386
🏁 Script executed:
Repository: appwrite/console
Length of output: 888
🏁 Script executed:
Repository: appwrite/console
Length of output: 187
🏁 Script executed:
Repository: appwrite/console
Length of output: 23858
Update the import statement in
src/lib/actions/analytics.tsto use the new package name.The import on line 2 still references
'plausible-tracker', but the package.json dependency has been updated to'@plausible-analytics/tracker'. Update the import to:The migration is incomplete without this change, and the code will fail at runtime since the old package is no longer a dependency.
🤖 Prompt for AI Agents