diff --git a/packages/bbui/src/ActionButton/ActionButton.svelte b/packages/bbui/src/ActionButton/ActionButton.svelte
index c346e34d54..d3cec0f307 100644
--- a/packages/bbui/src/ActionButton/ActionButton.svelte
+++ b/packages/bbui/src/ActionButton/ActionButton.svelte
@@ -57,6 +57,7 @@
class:fullWidth
class="spectrum-ActionButton spectrum-ActionButton--size{size}"
class:active
+ class:disabled
{disabled}
on:longPress
on:click|preventDefault
@@ -109,19 +110,22 @@
background: var(--spectrum-global-color-gray-300);
border-color: var(--spectrum-global-color-gray-500);
}
- .noPadding {
- padding: 0;
- min-width: 0;
- }
.spectrum-ActionButton--quiet {
padding: 0 8px;
}
.spectrum-ActionButton--quiet.is-selected {
color: var(--spectrum-global-color-gray-900);
}
+ .noPadding {
+ padding: 0;
+ min-width: 0;
+ }
.is-selected:not(.emphasized) .spectrum-Icon {
color: var(--spectrum-global-color-gray-900);
}
+ .is-selected.disabled .spectrum-Icon {
+ color: var(--spectrum-global-color-gray-500);
+ }
.tooltip {
position: absolute;
pointer-events: none;
diff --git a/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte b/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte
similarity index 59%
rename from packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte
rename to packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte
index 5b74e01958..0a85e41966 100644
--- a/packages/frontend-core/src/components/grid/controls/HideColumnsButton.svelte
+++ b/packages/frontend-core/src/components/grid/controls/ColumnsSettingButton.svelte
@@ -1,7 +1,8 @@
(open = !open)}
@@ -54,25 +69,25 @@
{$stickyColumn.label}
-
+
+
{/if}
{#each $columns as column}
{column.label}
- toggleColumn(column, e.detail)}
- disabled={column.primaryDisplay}
+ toggleColumn(column, e.detail)}
+ value={columnToPermissionOptions(column)}
+ {options}
/>
{/each}
-
@@ -83,15 +98,11 @@
flex-direction: column;
gap: 12px;
}
- .buttons {
- display: flex;
- flex-direction: row;
- gap: 8px;
- }
.columns {
display: grid;
align-items: center;
grid-template-columns: 1fr auto;
+ gap: 8px;
}
.columns :global(.spectrum-Switch) {
margin-right: 0;
diff --git a/packages/frontend-core/src/components/grid/controls/ToggleActionButtonGroup.svelte b/packages/frontend-core/src/components/grid/controls/ToggleActionButtonGroup.svelte
new file mode 100644
index 0000000000..e705b5016d
--- /dev/null
+++ b/packages/frontend-core/src/components/grid/controls/ToggleActionButtonGroup.svelte
@@ -0,0 +1,43 @@
+
+
+
+ {#each options as option}
+
+ dispatch("click", option.value)}
+ {disabled}
+ size="S"
+ icon={option.icon}
+ quiet
+ selected={option.value === value}
+ noPadding
+ />
+
+ {/each}
+
+
+
diff --git a/packages/frontend-core/src/components/grid/layout/Grid.svelte b/packages/frontend-core/src/components/grid/layout/Grid.svelte
index 5eb14beede..0a3075a61f 100644
--- a/packages/frontend-core/src/components/grid/layout/Grid.svelte
+++ b/packages/frontend-core/src/components/grid/layout/Grid.svelte
@@ -18,7 +18,7 @@
import UserAvatars from "./UserAvatars.svelte"
import KeyboardManager from "../overlays/KeyboardManager.svelte"
import SortButton from "../controls/SortButton.svelte"
- import HideColumnsButton from "../controls/HideColumnsButton.svelte"
+ import ColumnsSettingButton from "../controls/ColumnsSettingButton.svelte"
import SizeButton from "../controls/SizeButton.svelte"
import NewRow from "./NewRow.svelte"
import { createGridWebsocket } from "../lib/websocket"
@@ -153,7 +153,7 @@
-
+