diff --git a/packages/frontend-core/src/components/sheet/cells/AttachmentCell.svelte b/packages/frontend-core/src/components/sheet/cells/AttachmentCell.svelte index 7f3b065845..9cd48cfaca 100644 --- a/packages/frontend-core/src/components/sheet/cells/AttachmentCell.svelte +++ b/packages/frontend-core/src/components/sheet/cells/AttachmentCell.svelte @@ -122,7 +122,7 @@ flex-direction: row; justify-content: flex-start; align-items: center; - height: calc(var(--cell-height) - 12px); + height: calc(var(--row-height) - 12px); padding: 0 8px; color: var(--spectrum-global-color-gray-800); border: 1px solid var(--spectrum-global-color-gray-300); @@ -133,7 +133,7 @@ user-select: none; } img { - height: calc(var(--cell-height) - 12px); + height: calc(var(--row-height) - 12px); max-width: 64px; } .dropzone { diff --git a/packages/frontend-core/src/components/sheet/cells/LongFormCell.svelte b/packages/frontend-core/src/components/sheet/cells/LongFormCell.svelte index 1392cccfc4..1c9eaa06ca 100644 --- a/packages/frontend-core/src/components/sheet/cells/LongFormCell.svelte +++ b/packages/frontend-core/src/components/sheet/cells/LongFormCell.svelte @@ -92,7 +92,7 @@ top: -1px; left: -1px; width: calc(100% + 100px); - height: calc(5 * var(--cell-height) + 1px); + height: calc(5 * var(--row-height) + 1px); border: var(--cell-border); box-shadow: inset 0 0 0 2px var(--spectrum-global-color-blue-400); } diff --git a/packages/frontend-core/src/components/sheet/cells/OptionsCell.svelte b/packages/frontend-core/src/components/sheet/cells/OptionsCell.svelte index f0755abf4a..5f30e80f9f 100644 --- a/packages/frontend-core/src/components/sheet/cells/OptionsCell.svelte +++ b/packages/frontend-core/src/components/sheet/cells/OptionsCell.svelte @@ -192,7 +192,7 @@ top: 0; } .option { - flex: 0 0 var(--cell-height); + flex: 0 0 var(--row-height); padding: 0 var(--cell-padding); display: flex; flex-direction: row; @@ -202,7 +202,7 @@ background-color: var(--cell-background-hover); } .option:first-child { - flex: 0 0 calc(var(--cell-height) - 1px); + flex: 0 0 calc(var(--row-height) - 1px); } .option:hover, .option.focused { diff --git a/packages/frontend-core/src/components/sheet/cells/RelationshipCell.svelte b/packages/frontend-core/src/components/sheet/cells/RelationshipCell.svelte index 725a57d26b..98c45058a7 100644 --- a/packages/frontend-core/src/components/sheet/cells/RelationshipCell.svelte +++ b/packages/frontend-core/src/components/sheet/cells/RelationshipCell.svelte @@ -316,7 +316,7 @@ } .result { padding: 0 var(--cell-padding); - flex: 0 0 var(--cell-height); + flex: 0 0 var(--row-height); display: flex; gap: var(--cell-spacing); justify-content: space-between; @@ -331,7 +331,7 @@ } .search { - flex: 0 0 calc(var(--cell-height) - 1px); + flex: 0 0 calc(var(--row-height) - 1px); display: flex; align-items: center; margin: 0 var(--cell-padding); @@ -349,7 +349,7 @@ color: var(--spectrum-global-color-gray-600); font-size: 12px; padding: var(--cell-padding); - flex: 0 0 var(--cell-height); + flex: 0 0 var(--row-height); display: flex; align-items: center; white-space: nowrap; diff --git a/packages/frontend-core/src/components/sheet/cells/SheetCell.svelte b/packages/frontend-core/src/components/sheet/cells/SheetCell.svelte index e80757d537..725de655d9 100644 --- a/packages/frontend-core/src/components/sheet/cells/SheetCell.svelte +++ b/packages/frontend-core/src/components/sheet/cells/SheetCell.svelte @@ -54,7 +54,7 @@ diff --git a/packages/frontend-core/src/components/sheet/layout/HeaderRow.svelte b/packages/frontend-core/src/components/sheet/layout/HeaderRow.svelte index 53d2ef2279..187848ed6d 100644 --- a/packages/frontend-core/src/components/sheet/layout/HeaderRow.svelte +++ b/packages/frontend-core/src/components/sheet/layout/HeaderRow.svelte @@ -33,7 +33,7 @@ border-bottom: var(--cell-border); position: relative; z-index: 2; - height: var(--cell-height); + height: var(--row-height); } .row { display: flex; @@ -42,7 +42,7 @@ position: absolute; right: 0; top: 0; - height: var(--cell-height); + height: var(--row-height); background: var(--spectrum-global-color-gray-100); display: grid; place-items: center; diff --git a/packages/frontend-core/src/components/sheet/layout/NewRowTop.svelte b/packages/frontend-core/src/components/sheet/layout/NewRowTop.svelte index 9240f60b03..abda73b0fc 100644 --- a/packages/frontend-core/src/components/sheet/layout/NewRowTop.svelte +++ b/packages/frontend-core/src/components/sheet/layout/NewRowTop.svelte @@ -149,7 +149,7 @@ .container { pointer-events: none; position: absolute; - top: var(--cell-height); + top: var(--row-height); transform: translateY(-100%); z-index: 1; transition: transform 130ms ease-out; diff --git a/packages/frontend-core/src/components/sheet/layout/Sheet.svelte b/packages/frontend-core/src/components/sheet/layout/Sheet.svelte index 1f414b10eb..57bfdea45d 100644 --- a/packages/frontend-core/src/components/sheet/layout/Sheet.svelte +++ b/packages/frontend-core/src/components/sheet/layout/Sheet.svelte @@ -40,7 +40,6 @@ export let allowEditRows = true // Sheet constants - const cellHeight = 36 const gutterWidth = 72 const rand = Math.random() @@ -60,7 +59,6 @@ let context = { API: API || createAPIClient(), rand, - cellHeight, gutterWidth, config, tableId: tableIdStore, @@ -81,7 +79,7 @@ context = { ...context, ...createWheelStores(context) } // Reference some stores for local use - const { isResizing, isReordering, ui, loaded } = context + const { isResizing, isReordering, ui, loaded, rowHeight } = context // Keep stores up to date $: tableIdStore.set(tableId) @@ -109,7 +107,7 @@ id="sheet-{rand}" class:is-resizing={$isResizing} class:is-reordering={$isReordering} - style="--cell-height:{cellHeight}px; --gutter-width:{gutterWidth}px; --max-cell-render-height:{MaxCellRenderHeight}px;" + style="--row-height:{$rowHeight}px; --gutter-width:{gutterWidth}px; --max-cell-render-height:{MaxCellRenderHeight}px;" >