Skip to content

Commit cc3b759

Browse files
committed
revert: drop showAggregateTabs column, migration, and CDP admin management
Per product decision: which collections show the in-depth aggregate tabs doesn't need to be independently manageable per foundation - the insights frontend can derive this directly from collection type (curated vs community), which it already knows. Removes the migration, the DAL/admin UI wiring, and the per-foundation CDP toggle entirely. Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
1 parent 64db617 commit cc3b759

5 files changed

Lines changed: 2 additions & 38 deletions

File tree

backend/src/database/migrations/U1784026542__addShowAggregateTabsColumnToCollectionsTable.sql

Lines changed: 0 additions & 3 deletions
This file was deleted.

backend/src/database/migrations/V1784026542__addShowAggregateTabsColumnToCollectionsTable.sql

Lines changed: 0 additions & 10 deletions
This file was deleted.

frontend/src/modules/admin/modules/collections/components/lf-collection-add.vue

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,6 @@
186186
</lf-field>
187187
</article>
188188
</div>
189-
190-
<!-- Show aggregate tabs -->
191-
<article class="mb-6">
192-
<lf-field label-text="Show aggregate tabs">
193-
<div class="flex items-center gap-2">
194-
<lf-switch v-model="form.showAggregateTabs" size="small">
195-
<span class="text-2xs text-gray-400">Show in-depth aggregate metric tabs on the public collection page</span>
196-
</lf-switch>
197-
</div>
198-
</lf-field>
199-
</article>
200189
</div>
201190
<lf-collection-add-projects-tab
202191
v-if="activeTab === 'projects'"
@@ -232,7 +221,6 @@ import LfTabs from '@/ui-kit/tabs/Tabs.vue';
232221
import LfTab from '@/ui-kit/tabs/Tab.vue';
233222
import LfInput from '@/ui-kit/input/Input.vue';
234223
import LfTextarea from '@/ui-kit/textarea/Textarea.vue';
235-
import LfSwitch from '@/ui-kit/switch/Switch.vue';
236224
import LfField from '@/ui-kit/field/Field.vue';
237225
import LfFieldMessages from '@/ui-kit/field-messages/FieldMessages.vue';
238226
@@ -272,7 +260,6 @@ const form = reactive<CollectionFormModel>({
272260
color: '',
273261
projects: [],
274262
starred: false,
275-
showAggregateTabs: true,
276263
});
277264
278265
const rules = {
@@ -340,7 +327,6 @@ const onSubmit = () => {
340327
starred: project?.starred || false,
341328
})),
342329
starred: !!form.starred,
343-
showAggregateTabs: !!form.showAggregateTabs,
344330
categoryId: form.categoryId,
345331
slug: form.name.toLowerCase().replace(/ /g, '-'),
346332
};

frontend/src/modules/admin/modules/collections/models/collection.model.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export interface CollectionModel {
1414
projects: InsightsProjectModel[];
1515
category: Category & {categoryGroupType: string, categoryGroupName: string};
1616
starred?: boolean;
17-
showAggregateTabs?: boolean;
1817
}
1918

2019
export interface CollectionRequest {
@@ -26,7 +25,6 @@ export interface CollectionRequest {
2625
color?: string;
2726
slug: string;
2827
starred: boolean;
29-
showAggregateTabs?: boolean;
3028
projects: {
3129
id: string;
3230
starred: boolean;
@@ -42,5 +40,4 @@ export interface CollectionFormModel {
4240
color: string;
4341
projects: InsightsProjectModel[];
4442
starred: boolean;
45-
showAggregateTabs: boolean;
4643
}

services/libs/data-access-layer/src/collections/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export interface ICreateCollection {
2121
name: string
2222
slug?: string
2323
starred: boolean
24-
showAggregateTabs?: boolean
2524
isPrivate?: boolean
2625
ssoUserId?: string | null
2726
logoUrl?: string | null
@@ -94,7 +93,6 @@ export enum CollectionField {
9493
SLUG = 'slug',
9594
SSO_USER_ID = 'ssoUserId',
9695
STARRED = 'starred',
97-
SHOW_AGGREGATE_TABS = 'showAggregateTabs',
9896
UPDATED_AT = 'updatedAt',
9997
DELETED_AT = 'deletedAt',
10098
}
@@ -146,16 +144,12 @@ export async function createCollection(
146144
logoUrl: null,
147145
imageUrl: null,
148146
color: null,
149-
// Only LF Foundation (curated) collections get aggregate tabs by default.
150-
// ssoUserId is only set for community/user-curated collections, so
151-
// ssoUserId being unset identifies curated collections (see V1784026542).
152-
showAggregateTabs: !collection.ssoUserId,
153147
...collection,
154148
}
155149
return qx.selectOne(
156150
`
157-
INSERT INTO collections (name, description, slug, "categoryId", starred, "logoUrl", "imageUrl", color, "showAggregateTabs")
158-
VALUES ($(name), $(description), $(slug), $(categoryId), $(starred), $(logoUrl), $(imageUrl), $(color), $(showAggregateTabs))
151+
INSERT INTO collections (name, description, slug, "categoryId", starred, "logoUrl", "imageUrl", color)
152+
VALUES ($(name), $(description), $(slug), $(categoryId), $(starred), $(logoUrl), $(imageUrl), $(color))
159153
RETURNING *
160154
`,
161155
data,

0 commit comments

Comments
 (0)