From 9cae91c3a5423615d1e8d13357d5c1dbb07f2ed5 Mon Sep 17 00:00:00 2001 From: Adam Rauch Date: Sat, 27 Dec 2025 09:56:47 -0800 Subject: [PATCH 1/2] Remove all references to list discussions --- .../components/releaseNotes/components.md | 3 ++ .../components/src/internal/app/constants.ts | 1 - packages/components/src/internal/app/utils.ts | 5 -- .../ListPropertiesAdvancedSettings.test.tsx | 10 +--- .../list/ListPropertiesAdvancedSettings.tsx | 54 +------------------ .../domainproperties/list/models.ts | 5 -- .../components/src/test/data/constants.ts | 1 - .../list-getDomainDetails-withAutoIntPK.json | 1 - .../src/test/data/list-getDomainDetails.json | 2 - 9 files changed, 5 insertions(+), 77 deletions(-) diff --git a/packages/components/releaseNotes/components.md b/packages/components/releaseNotes/components.md index ed811ff4de..7c8df64ee7 100644 --- a/packages/components/releaseNotes/components.md +++ b/packages/components/releaseNotes/components.md @@ -1,6 +1,9 @@ # @labkey/components Components, models, actions, and utility functions for LabKey applications and pages +### version TBD +- Remove support for discussions in lists + ### version 7.5.1 *Released*: 24 December 2025 - Add `displaySelectedOptions` prop and respect setting when passing `selectedOptions` to the underlying `SelectInput` diff --git a/packages/components/src/internal/app/constants.ts b/packages/components/src/internal/app/constants.ts index 49f641d27a..531745460c 100644 --- a/packages/components/src/internal/app/constants.ts +++ b/packages/components/src/internal/app/constants.ts @@ -112,7 +112,6 @@ export const EXPERIMENTAL_PRODUCT_ALL_FOLDER_LOOKUPS = 'queryProductAllFolderLoo export const EXPERIMENTAL_PRODUCT_FOLDER_DATA_LISTING_SCOPED = 'queryProductProjectDataListingScoped'; export const EXPERIMENTAL_REQUESTS_MENU = 'experimental-biologics-requests-menu'; export const EXPERIMENTAL_SAMPLE_ALIQUOT_SELECTOR = 'experimental-sample-aliquot-selector'; -export const DEPRECATED_OBJECT_LEVEL_DISCUSSIONS = 'deprecatedObjectLevelDiscussions'; export const FOLDER_DATA_TYPE_EXCLUSIONS = 'dataTypeExclusions'; export const ARCHIVED_FOLDERS = 'archivedContainers'; diff --git a/packages/components/src/internal/app/utils.ts b/packages/components/src/internal/app/utils.ts index 0d69898ea3..7951db1094 100644 --- a/packages/components/src/internal/app/utils.ts +++ b/packages/components/src/internal/app/utils.ts @@ -24,7 +24,6 @@ import { ARCHIVED_FOLDERS, ASSAYS_KEY, BIOLOGICS_APP_PROPERTIES, - DEPRECATED_OBJECT_LEVEL_DISCUSSIONS, EXPERIMENTAL_PRODUCT_ALL_FOLDER_LOOKUPS, EXPERIMENTAL_PRODUCT_FOLDER_DATA_LISTING_SCOPED, EXPERIMENTAL_REQUESTS_MENU, @@ -417,10 +416,6 @@ export function isSampleAliquotSelectorEnabled(moduleContext?: ModuleContext): b return resolveModuleContext(moduleContext)?.samplemanagement?.[EXPERIMENTAL_SAMPLE_ALIQUOT_SELECTOR] === true; } -export function isObjectLevelDiscussionsEnabled(moduleContext?: ModuleContext): boolean { - return resolveModuleContext(moduleContext)?.core?.[DEPRECATED_OBJECT_LEVEL_DISCUSSIONS] === true; -} - export function hasModule(moduleName: string, moduleContext?: ModuleContext): boolean { return resolveModuleContext(moduleContext).api?.moduleNames?.indexOf(moduleName.toLowerCase()) >= 0; } diff --git a/packages/components/src/internal/components/domainproperties/list/ListPropertiesAdvancedSettings.test.tsx b/packages/components/src/internal/components/domainproperties/list/ListPropertiesAdvancedSettings.test.tsx index 13f70db583..da3abb3e07 100644 --- a/packages/components/src/internal/components/domainproperties/list/ListPropertiesAdvancedSettings.test.tsx +++ b/packages/components/src/internal/components/domainproperties/list/ListPropertiesAdvancedSettings.test.tsx @@ -13,21 +13,13 @@ import getDomainDetailsJSON from '../../../../test/data/list-getDomainDetails.js import { DomainField } from '../models'; -import { AdvancedSettings, DisplayTitle, SearchIndexing, IndexField } from './ListPropertiesAdvancedSettings'; +import { AdvancedSettings, DisplayTitle, IndexField, SearchIndexing } from './ListPropertiesAdvancedSettings'; import { ListModel } from './models'; const emptyNewModel = ListModel.create(null, DEFAULT_LIST_SETTINGS); const populatedExistingModel = ListModel.create(getDomainDetailsJSON); describe('AdvancedSettings', () => { - beforeEach(() => { - LABKEY.moduleContext = { - core: { - deprecatedObjectLevelDiscussions: false, - }, - }; - }); - test('default properties', () => { const advancedSettings = ( diff --git a/packages/components/src/internal/components/domainproperties/list/ListPropertiesAdvancedSettings.tsx b/packages/components/src/internal/components/domainproperties/list/ListPropertiesAdvancedSettings.tsx index c600dbe038..082687613d 100644 --- a/packages/components/src/internal/components/domainproperties/list/ListPropertiesAdvancedSettings.tsx +++ b/packages/components/src/internal/components/domainproperties/list/ListPropertiesAdvancedSettings.tsx @@ -3,7 +3,7 @@ import classNames from 'classnames'; import { Modal } from '../../../Modal'; -import { getSubmitButtonClass, isObjectLevelDiscussionsEnabled } from '../../../app/utils'; +import { getSubmitButtonClass } from '../../../app/utils'; import { DomainFieldLabel } from '../DomainFieldLabel'; @@ -33,8 +33,6 @@ export const DISPLAY_TITLE_TIP = ( ); -export const DISCUSSION_LINKS_TIP = - 'Optionally allow one or more discussion links to be shown on the details view of each list item.'; export const SEARCH_INDEXING_TIP = 'Controls how this list is indexed for search within LabKey Server.'; interface DisplayTitleProps { @@ -66,45 +64,6 @@ export const DisplayTitle: FC = memo(({ model, onSelectChange }); DisplayTitle.displayName = 'DisplayTitle'; -interface DiscussionLinksProps { - discussionSetting: number; - onRadioChange: (evt: any) => void; -} - -// TODO: use RadioGroupInput instead -const DISCUSSION_RADIO_NAME = 'discussionSetting'; -const DiscussionInputs: FC = memo(({ onRadioChange, discussionSetting }) => ( -
- - Disable discussions - - - - Allow one discussion per item - - - - Allow multiple discussions per item - -
-)); -DiscussionInputs.displayName = 'DiscussionInputs'; - interface TitleIndexFieldProps { name: string; onInputChange: (evt: any) => void; @@ -435,7 +394,6 @@ export class AdvancedSettings extends React.PureComponent - {isObjectLevelDiscussionsEnabled() && ( - - - - )} - Date: Sat, 27 Dec 2025 10:12:56 -0800 Subject: [PATCH 2/2] Remove another reference --- .../src/internal/components/domainproperties/list/models.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/components/src/internal/components/domainproperties/list/models.test.ts b/packages/components/src/internal/components/domainproperties/list/models.test.ts index b17a617ade..7b62d1ad43 100644 --- a/packages/components/src/internal/components/domainproperties/list/models.test.ts +++ b/packages/components/src/internal/components/domainproperties/list/models.test.ts @@ -77,7 +77,6 @@ describe('ListModel', () => { expect(options).not.toHaveProperty('domain'); expect(options).toHaveProperty('name'); expect(options).toHaveProperty('description'); - expect(options).toHaveProperty('discussionSetting'); const PKFieldName = existingModel .getIn(['domain', 'fields'])