diff --git a/packages/bbui/src/Popover/Popover.svelte b/packages/bbui/src/Popover/Popover.svelte index 081e3a34df..69da250a2b 100644 --- a/packages/bbui/src/Popover/Popover.svelte +++ b/packages/bbui/src/Popover/Popover.svelte @@ -19,6 +19,7 @@ export let dismissible = true export let offset = 5 export let customHeight + export let animate = true $: target = portalTarget || getContext(Context.PopoverRoot) || ".spectrum" @@ -76,7 +77,7 @@ class="spectrum-Popover is-open" role="presentation" style="height: {customHeight}" - transition:fly|local={{ y: -20, duration: 200 }} + transition:fly|local={{ y: -20, duration: animate ? 200 : 0 }} > diff --git a/packages/builder/src/components/backend/DataTable/DataTable.svelte b/packages/builder/src/components/backend/DataTable/DataTable.svelte index ced118d5e2..c7a7c74f99 100644 --- a/packages/builder/src/components/backend/DataTable/DataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/DataTable.svelte @@ -228,5 +228,6 @@ display: flex; flex-direction: column; background: var(--background); + overflow: hidden; } diff --git a/packages/frontend-core/src/components/sheet/ResizeOverlay.svelte b/packages/frontend-core/src/components/sheet/ResizeOverlay.svelte index 3bf3ea35a3..85d69a6f97 100644 --- a/packages/frontend-core/src/components/sheet/ResizeOverlay.svelte +++ b/packages/frontend-core/src/components/sheet/ResizeOverlay.svelte @@ -1,15 +1,8 @@ @@ -89,8 +80,7 @@ class="resize-slider sticky" class:visible={columnIdx === "sticky"} on:mousedown={e => startResizing("sticky", e)} - style="--left:{40 + - $stickyColumn.width}px; --content-height:{contentHeight}px;" + style="--left:{40 + $stickyColumn.width}px;" >
@@ -100,7 +90,7 @@ class="resize-slider" class:visible={columnIdx === col.idx} on:mousedown={e => startResizing(col.idx, e)} - style={getStyle(col, offset, scrollLeft, contentHeight)} + style={getStyle(col, offset, scrollLeft)} >
@@ -114,7 +104,7 @@ height: var(--cell-height); left: var(--left); opacity: 0; - padding: 0 16px; + padding: 0 8px; transform: translateX(-50%); user-select: none; } @@ -122,7 +112,6 @@ .resize-slider.visible { cursor: col-resize; opacity: 1; - height: min(var(--content-height), 100%); } .resize-slider.sticky { z-index: 2; diff --git a/packages/frontend-core/src/components/sheet/StickyColumn.svelte b/packages/frontend-core/src/components/sheet/StickyColumn.svelte index 084ec02284..3782bc3463 100644 --- a/packages/frontend-core/src/components/sheet/StickyColumn.svelte +++ b/packages/frontend-core/src/components/sheet/StickyColumn.svelte @@ -5,6 +5,7 @@ import SheetCell from "./cells/SheetCell.svelte" import { getCellRenderer } from "./renderers" import SheetScrollWrapper from "./SheetScrollWrapper.svelte" + import HeaderCell from "./cells/HeaderCell.svelte" const { rows, @@ -67,6 +68,7 @@ {#if $stickyColumn} - - - - {$stickyColumn.name} - - + {/if} diff --git a/packages/frontend-core/src/components/sheet/cells/HeaderCell.svelte b/packages/frontend-core/src/components/sheet/cells/HeaderCell.svelte index 4bf4e1a461..793f7979cf 100644 --- a/packages/frontend-core/src/components/sheet/cells/HeaderCell.svelte +++ b/packages/frontend-core/src/components/sheet/cells/HeaderCell.svelte @@ -1,56 +1,92 @@ -
+
reorder.actions.startReordering(column.name, e)} - on:click={openPopover} + on:mousedown={startReordering} + on:mouseup={stopReordering} + on:click={onClick} width={column.width} left={column.left} > -
- -
- {column.name} asdasdasd asdasdas asdasdasd -
-
- -
+ +
+ {column.name} +
+
+
-asdsad asdasd asdasd asasa + + Edit column + Sort ascending + Sort descending + Move left + Move right + Delete + + diff --git a/packages/frontend-core/src/components/sheet/cells/SheetCell.svelte b/packages/frontend-core/src/components/sheet/cells/SheetCell.svelte index e719087adb..8c09891a9d 100644 --- a/packages/frontend-core/src/components/sheet/cells/SheetCell.svelte +++ b/packages/frontend-core/src/components/sheet/cells/SheetCell.svelte @@ -10,6 +10,7 @@ export let center = false export let selectedUser = null export let rowIdx + export let foo $: style = getStyle(width, selectedUser) @@ -24,6 +25,7 @@
@@ -113,6 +116,9 @@ justify-content: center; align-items: center; } + .cell.foo { + background: var(--spectrum-global-color-gray-100); + } /* Other user email */ .user { diff --git a/packages/frontend-core/src/components/sheet/stores/reorder.js b/packages/frontend-core/src/components/sheet/stores/reorder.js index 76b82ba79a..13a89c736d 100644 --- a/packages/frontend-core/src/components/sheet/stores/reorder.js +++ b/packages/frontend-core/src/components/sheet/stores/reorder.js @@ -1,4 +1,4 @@ -import { get, writable } from "svelte/store" +import { get, writable, derived } from "svelte/store" export const createReorderStores = context => { const { columns, rand, scroll, bounds, stickyColumn } = context @@ -7,8 +7,11 @@ export const createReorderStores = context => { targetColumn: null, breakpoints: [], initialMouseX: null, + scrollLeft: 0, + sheetLeft: 0, } const reorder = writable(reorderInitialState) + const isReordering = derived(reorder, $reorder => !!$reorder.sourceColumn) // Callback when dragging on a colum header and starting reordering const startReordering = (column, e) => { @@ -115,5 +118,6 @@ export const createReorderStores = context => { stopReordering, }, }, + isReordering, } } diff --git a/packages/server/src/websockets/websocket.ts b/packages/server/src/websockets/websocket.ts index c58419748c..d3c1a7a8b3 100644 --- a/packages/server/src/websockets/websocket.ts +++ b/packages/server/src/websockets/websocket.ts @@ -4,6 +4,7 @@ import Koa from "koa" import Cookies from "cookies" import { userAgent } from "koa-useragent" import { auth } from "@budibase/backend-core" +import currentApp from "../middleware/currentapp" export default class Socket { io: Server @@ -25,6 +26,7 @@ export default class Socket { const middlewares = [ userAgent, authenticate, + // currentApp, ...(additionalMiddlewares || []), ]