From 399f84c250b5b78ff5cc5a31a4bc7962d95f7921 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:19:01 +0000 Subject: [PATCH 01/48] fix(nc-gui): enable extension by default in cloud --- packages/nc-gui/composables/useExtensions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/composables/useExtensions.ts b/packages/nc-gui/composables/useExtensions.ts index bd10a15b4e..9a362e8f48 100644 --- a/packages/nc-gui/composables/useExtensions.ts +++ b/packages/nc-gui/composables/useExtensions.ts @@ -412,9 +412,9 @@ export const useExtensions = createSharedComposable(() => { console.error('Error loading extensions:', error) } - // if (isEeUI) { - // extensionsEgg.value = true - // } + if (isEeUI) { + extensionsEgg.value = true + } }) watch( From 98852eb6e12c18c1abfbe393140311a78b384ca0 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:19:01 +0000 Subject: [PATCH 02/48] fix(nc-gui): resize extension issue --- packages/nc-gui/components/extensions/Extension.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/extensions/Extension.vue b/packages/nc-gui/components/extensions/Extension.vue index e3f1096938..019cfbb494 100644 --- a/packages/nc-gui/components/extensions/Extension.vue +++ b/packages/nc-gui/components/extensions/Extension.vue @@ -38,6 +38,8 @@ const titleEditMode = ref(false) const tempTitle = ref(extension.value.title) +const { height } = useElementSize(extensionRef) + const enableEditMode = () => { titleEditMode.value = true tempTitle.value = extension.value.title @@ -58,6 +60,14 @@ const component = ref(null) const extensionManifest = ref() +const extensionHeight = computed(() => { + const heigthInInt = parseInt(extensionManifest.value?.config?.contentMinHeight || '') || undefined + + if (!heigthInInt || height.value > heigthInInt) return `${height.value}px` + + return extensionManifest.value?.config?.contentMinHeight +}) + const fullscreenModalMaxWidth = computed(() => { const modalMaxWidth = { xs: 'min(calc(100vw - 32px), 448px)', @@ -153,7 +163,7 @@ eventBus.on((event, payload) => { :style=" !collapsed ? { - height: extensionManifest?.config?.contentMinHeight, + height: extensionHeight, minHeight: extensionManifest?.config?.contentMinHeight, } : {} From 7f1c93b774b629d7eeb58ad2d1b2ecb4e1e6f331 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:19:01 +0000 Subject: [PATCH 03/48] fix(nc-gui): add transition on integration card hover --- .../components/workspace/integrations/IntegrationsTab.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui/components/workspace/integrations/IntegrationsTab.vue b/packages/nc-gui/components/workspace/integrations/IntegrationsTab.vue index 880a184506..d50d9117fc 100644 --- a/packages/nc-gui/components/workspace/integrations/IntegrationsTab.vue +++ b/packages/nc-gui/components/workspace/integrations/IntegrationsTab.vue @@ -408,7 +408,7 @@ const handleAddIntegration = (category: IntegrationCategoryType, integration: In @apply flex gap-4 flex-wrap; .source-card { - @apply flex items-center gap-4 border-1 border-gray-200 rounded-xl p-3 w-[280px] cursor-pointer; + @apply flex items-center gap-4 border-1 border-gray-200 rounded-xl p-3 w-[280px] cursor-pointer transition-all duration-300; .integration-icon-wrapper { @apply flex-none h-[44px] w-[44px] rounded-lg flex items-center justify-center; From 98cdf4196311089605ff957fb5a1151df6dda424 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:19:01 +0000 Subject: [PATCH 04/48] fix(nc-gui): extension panel resize issue --- .../nc-gui/components/extensions/Pane.vue | 251 ++++++++---------- .../nc-gui/components/tabs/Smartsheet.vue | 40 +-- 2 files changed, 135 insertions(+), 156 deletions(-) diff --git a/packages/nc-gui/components/extensions/Pane.vue b/packages/nc-gui/components/extensions/Pane.vue index 54b54c329e..dfe8aa85fe 100644 --- a/packages/nc-gui/components/extensions/Pane.vue +++ b/packages/nc-gui/components/extensions/Pane.vue @@ -17,8 +17,6 @@ const { const { $e } = useNuxtApp() -const isReady = ref(false) - const searchExtensionRef = ref() const extensionHeaderRef = ref() @@ -27,6 +25,13 @@ const searchQuery = ref('') const showSearchBox = ref(false) +const panelSize = computed(() => { + if (isPanelExpanded.value) { + return extensionPanelSize.value + } + return 0 +}) + const { width } = useElementSize(extensionHeaderRef) const isOpenSearchBox = computed(() => { @@ -54,14 +59,6 @@ const toggleMarket = () => { isMarketVisible.value = !isMarketVisible.value } -const normalizePaneMaxWidth = computed(() => { - if (isReady.value) { - return 60 - } else { - return extensionPanelSize.value - } -}) - const onMove = async (_event: { moved: { newIndex: number; oldIndex: number; element: ExtensionType } }) => { let { moved: { newIndex = 0, oldIndex = 0, element }, @@ -100,20 +97,6 @@ const onMove = async (_event: { moved: { newIndex: number; oldIndex: number; ele $e('a:extension:reorder') } -defineExpose({ - onReady: () => { - isReady.value = true - }, -}) - -watch(isPanelExpanded, (newValue) => { - if (newValue && !isReady.value) { - setTimeout(() => { - isReady.value = true - }, 300) - } -}) - onClickOutside(searchExtensionRef, () => { if (searchQuery.value) { return @@ -130,125 +113,119 @@ onMounted(() => {