diff --git a/packages/components/releaseNotes/components.md b/packages/components/releaseNotes/components.md index 6e6ae577c2..e9082cbe26 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.7.0 *Released*: 29 December 2025 - Workflow Automation: Task action to filter samples for selected task 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() && ( - - - - )} - { expect(options).not.toHaveProperty('domain'); expect(options).toHaveProperty('name'); expect(options).toHaveProperty('description'); - expect(options).toHaveProperty('discussionSetting'); const PKFieldName = existingModel .getIn(['domain', 'fields']) diff --git a/packages/components/src/internal/components/domainproperties/list/models.ts b/packages/components/src/internal/components/domainproperties/list/models.ts index 4921f82138..b910c40c93 100644 --- a/packages/components/src/internal/components/domainproperties/list/models.ts +++ b/packages/components/src/internal/components/domainproperties/list/models.ts @@ -36,7 +36,6 @@ export interface EntireListSettings { } export interface AdvancedSettingsForm extends EachItemSettings, EntireListSettings { - discussionSetting: number; eachItemIndex: boolean; entireListIndex: boolean; fileAttachmentIndex: boolean; @@ -60,7 +59,6 @@ export class ListModel extends Record({ titleColumn: undefined, domainId: undefined, keyType: undefined, - discussionSetting: undefined, allowDelete: undefined, allowUpload: undefined, allowExport: undefined, @@ -75,7 +73,6 @@ export class ListModel extends Record({ eachItemBodyTemplate: undefined, fileAttachmentIndex: undefined, listId: undefined, - discussionSettingEnum: undefined, containerPath: undefined, category: undefined, }) { @@ -89,7 +86,6 @@ export class ListModel extends Record({ declare titleColumn: string; declare domainId: number; declare keyType: string; - declare discussionSetting: number; declare allowDelete: true; declare allowUpload: true; declare allowExport: true; @@ -104,7 +100,6 @@ export class ListModel extends Record({ declare eachItemBodyTemplate: string; declare fileAttachmentIndex: false; declare listId: number; - declare discussionSettingEnum: string; declare containerPath: string; declare category: string; diff --git a/packages/components/src/test/data/constants.ts b/packages/components/src/test/data/constants.ts index 11722fa6b6..7f69b8a1bf 100644 --- a/packages/components/src/test/data/constants.ts +++ b/packages/components/src/test/data/constants.ts @@ -89,7 +89,6 @@ export const DEFAULT_LIST_SETTINGS = { allowDelete: true, allowUpload: true, allowExport: true, - discussionSetting: 0, entireListTitleTemplate: '', entireListIndexSetting: 0, entireListBodySetting: 0, diff --git a/packages/components/src/test/data/list-getDomainDetails-withAutoIntPK.json b/packages/components/src/test/data/list-getDomainDetails-withAutoIntPK.json index 37f7a8dc83..5835ba3a86 100644 --- a/packages/components/src/test/data/list-getDomainDetails-withAutoIntPK.json +++ b/packages/components/src/test/data/list-getDomainDetails-withAutoIntPK.json @@ -126,7 +126,6 @@ "allowDelete" : true, "allowUpload" : true, "allowExport" : true, - "discussionSetting" : 0, "entireListTitleTemplate" : null, "entireListIndexSetting" : 0, "entireListBodySetting" : 0, diff --git a/packages/components/src/test/data/list-getDomainDetails.json b/packages/components/src/test/data/list-getDomainDetails.json index c4b9b71c57..a8b3c710dd 100644 --- a/packages/components/src/test/data/list-getDomainDetails.json +++ b/packages/components/src/test/data/list-getDomainDetails.json @@ -687,7 +687,6 @@ "listId" : 277, "domainId" : 2280, "keyType" : "Integer", - "discussionSetting" : 1, "allowDelete" : true, "allowUpload" : true, "allowExport" : true, @@ -703,7 +702,6 @@ "eachItemBodySetting" : 0, "eachItemBodyTemplate" : null, "fileAttachmentIndex" : false, - "discussionSettingEnum" : "OnePerItem", "entireListIndexSettingEnum" : "MetaData", "entireListTitleSettingEnum" : "Standard", "entireListBodySettingEnum" : "AllFields",