Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix(nc-gui): shared view height issue in mobile mode

Ramesh Maned605f451b059
diff --git a/packages/nc-gui/assets/nc-windicss-shortcuts-plugin.ts b/packages/nc-gui/assets/nc-windicss-shortcuts-plugin.ts
index 8b39a68e60..14d528a5f6 100644
--- a/packages/nc-gui/assets/nc-windicss-shortcuts-plugin.ts
+++ b/packages/nc-gui/assets/nc-windicss-shortcuts-plugin.ts
@@ -8,6 +8,9 @@ export default plugin(({ addUtilities }) => {
'@supports (height: 100dvh)': {
height: '100dvh',
},
+ '@supports (height: 100svh)': {
+ height: '100svh',
+ },
}
utils['.nc-min-h-screen'] = {
@@ -15,6 +18,9 @@ export default plugin(({ addUtilities }) => {
'@supports (min-height: 100dvh)': {
'min-height': '100dvh',
},
+ '@supports (min-height: 100svh)': {
+ 'min-height': '100svh',
+ },
}
utils['.nc-w-screen'] = {
@@ -22,6 +28,9 @@ export default plugin(({ addUtilities }) => {
'@supports (width: 100dvw)': {
width: '100dvw',
},
+ '@supports (width: 100svw)': {
+ width: '100svw',
+ },
}
utils['.nc-min-w-screen'] = {
@@ -29,6 +38,9 @@ export default plugin(({ addUtilities }) => {
'@supports (width: 100dvw)': {
'min-width': '100dvw',
},
+ '@supports (min-width: 100svw)': {
+ 'min-width': '100svw',
+ },
}
addUtilities(utils, {
diff --git a/packages/nc-gui/components/smartsheet/Kanban.vue b/packages/nc-gui/components/smartsheet/Kanban.vue
index d8e659e7f6..44556b85a9 100644
--- a/packages/nc-gui/components/smartsheet/Kanban.vue
+++ b/packages/nc-gui/components/smartsheet/Kanban.vue
@@ -499,11 +499,7 @@ const handleOpenNewRecordForm = (stackTitle?: string) => {
>
<div
ref="kanbanContainerRef"
- class="nc-kanban-container flex p-3 overflow-y-hidden w-full nc-scrollbar-x-lg"
- :style="{
- minHeight: isMobileMode ? 'calc(100% - 2rem)' : 'calc(100vh - var(--topbar-height) - var(--toolbar-height) - 0.4rem)',
- maxHeight: isMobileMode ? 'calc(100% - 2rem)' : 'calc(100vh - var(--topbar-height) - var(--toolbar-height) - 0.4rem)',
- }"
+ class="nc-kanban-container flex p-3 overflow-y-hidden w-full nc-scrollbar-x-lg min-h-[calc(100%_-_0.4rem)] max-h-[calc(100%_-_0.4rem)]"
>
<div v-if="isViewDataLoading" class="flex flex-row min-h-full gap-x-2">
<a-skeleton-input v-for="index of Array(20)" :key="index" class="!min-w-80 !min-h-full !rounded-xl overflow-hidden" />
@@ -782,6 +778,7 @@ const handleOpenNewRecordForm = (stackTitle?: string) => {
draggable=".nc-kanban-item"
group="kanban-card"
class="flex flex-col h-full"
+ :disabled="isMobileMode"
:filter="draggableCardFilter"
@start="(e) => e.target.classList.add('grabbing')"
@end="(e) => e.target.classList.remove('grabbing')"
diff --git a/packages/nc-gui/layouts/shared-view.vue b/packages/nc-gui/layouts/shared-view.vue
index 4681a599f6..90632fa49e 100644
--- a/packages/nc-gui/layouts/shared-view.vue
+++ b/packages/nc-gui/layouts/shared-view.vue
@@ -138,6 +138,8 @@ export default {
.nc-shared-view-container {
&:not(.disable-topbar) {
+ --topbar-height: 2.875rem; // 46px
+
height: calc(100vh - (var(--topbar-height) - 3.6px));
@supports (height: 100dvh) {