diff --git a/packages/nc-gui/components/cell/attachment/Carousel.vue b/packages/nc-gui/components/cell/attachment/Carousel.vue index c10989c7f8..0ba3aea942 100644 --- a/packages/nc-gui/components/cell/attachment/Carousel.vue +++ b/packages/nc-gui/components/cell/attachment/Carousel.vue @@ -137,7 +137,8 @@ function onKeyDown(event: KeyboardEvent) { } } -/* +const { isFeatureEnabled } = useBetaFeatureToggle() + const openComments = ref(false) const toggleComment = () => { @@ -145,12 +146,16 @@ const toggleComment = () => { } onMounted(() => { - if (!isPublic.value && !isExpandedFormOpen.value && isUIAllowed('commentList')) { + if ( + !isPublic.value && + !isExpandedFormOpen.value && + isUIAllowed('commentList') && + isFeatureEnabled(FEATURE_FLAG.ATTACHMENT_CAROUSEL_COMMENTS) + ) { const { loadComments } = useRowCommentsOrThrow() loadComments() } }) -*/ const initEmblaApi = (val: any) => { emblaMainApi.value = val @@ -246,14 +251,17 @@ const initEmblaApi = (val: any) => { - +
@@ -365,8 +373,8 @@ const initEmblaApi = (val: any) => { - + diff --git a/packages/nc-gui/composables/useBetaFeatureToggle.ts b/packages/nc-gui/composables/useBetaFeatureToggle.ts index 751f28f7ba..a0dc634606 100644 --- a/packages/nc-gui/composables/useBetaFeatureToggle.ts +++ b/packages/nc-gui/composables/useBetaFeatureToggle.ts @@ -29,6 +29,13 @@ const FEATURES = [ enabled: false, isEngineering: true, }, + { + id: 'attachment_carousel_comments', + title: 'Comments in attachment carousel', + description: 'Enable comments in attachment carousel.', + enabled: false, + isEngineering: true, + }, ] export const FEATURE_FLAG = Object.fromEntries(FEATURES.map((feature) => [feature.id.toUpperCase(), feature.id])) as Record<