From 369bad6730f9244606008d2f0ece1776720510fa Mon Sep 17 00:00:00 2001 From: cnathe Date: Wed, 30 Apr 2025 16:08:41 -0500 Subject: [PATCH 1/8] Issue 52979: App grid customize view doesn't expand lookup field with special char --- packages/components/releaseNotes/components.md | 4 ++++ .../src/public/QueryModel/CustomizeGridViewModal.tsx | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/components/releaseNotes/components.md b/packages/components/releaseNotes/components.md index c25c6a334e..6a2c71c52f 100644 --- a/packages/components/releaseNotes/components.md +++ b/packages/components/releaseNotes/components.md @@ -1,6 +1,10 @@ # @labkey/components Components, models, actions, and utility functions for LabKey applications and pages +### version TBD +*Released*: TBD +- Issue 52979: App grid customize view doesn't expand lookup field with special char + ### version 6.38.2 *Released*: 30 April 2025 - Remove remnants of Edit with Grid from Bulk Edit modal diff --git a/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx b/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx index f32b36d080..fef8367327 100644 --- a/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx +++ b/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx @@ -34,12 +34,12 @@ export const includedColumnsForCustomizationFilter = (column: QueryColumn, showA export const getExpandQueryInfo = async (queryInfo: QueryInfo, column: QueryColumn): Promise => { const fkQueryInfo = await getQueryDetails({ - fk: column.index, + fk: column.fieldKeyPath, // Issue 52979: use encoded fieldKeyPath lookup: column.lookup, schemaQuery: queryInfo.schemaQuery, }); // For data classes, we want to limit the Ancestor filters to exclude 'Samples' - if (column.index === QueryColumn.ANCESTORS_PREFIX && queryInfo.schemaQuery.schemaName === SCHEMAS.DATA_CLASSES.SCHEMA) { + if (column.fieldKey === QueryColumn.ANCESTORS_PREFIX && queryInfo.schemaQuery.schemaName === SCHEMAS.DATA_CLASSES.SCHEMA) { fkQueryInfo.columns = fkQueryInfo.columns.filter( col => col.fieldKey !== 'Samples' && col.fieldKey !== 'MediaSamples' ); From 5467da501c4bb5ab3c8da8f10f5e8d1a6adea75f Mon Sep 17 00:00:00 2001 From: cnathe Date: Wed, 30 Apr 2025 16:09:12 -0500 Subject: [PATCH 2/8] Issue 52472: Re-clicking the Source Types, Sample Types or Assay links in the mega menu removes the sort=Name parameter from the url --- packages/components/releaseNotes/components.md | 1 + packages/components/src/internal/app/utils.ts | 4 ++++ .../internal/components/navigation/ProductMenuSection.tsx | 8 ++++++-- .../src/internal/components/navigation/model.ts | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/components/releaseNotes/components.md b/packages/components/releaseNotes/components.md index 6a2c71c52f..032791d5b5 100644 --- a/packages/components/releaseNotes/components.md +++ b/packages/components/releaseNotes/components.md @@ -4,6 +4,7 @@ Components, models, actions, and utility functions for LabKey applications and p ### version TBD *Released*: TBD - Issue 52979: App grid customize view doesn't expand lookup field with special char +- Issue 52472: Re-clicking the Source Types, Sample Types or Assay links in the mega menu removes the sort=Name parameter from the url ### version 6.38.2 *Released*: 30 April 2025 diff --git a/packages/components/src/internal/app/utils.ts b/packages/components/src/internal/app/utils.ts index 53b1154f63..e4d8c0969a 100644 --- a/packages/components/src/internal/app/utils.ts +++ b/packages/components/src/internal/app/utils.ts @@ -580,6 +580,7 @@ export function addSourcesSectionConfig( emptyText: 'No source types have been defined', filteredEmptyText: 'No source types available', iconURL: imageURL('_images', 'source_type.svg'), + headerURLParams: { 'sourcetypegrid.sort': 'Name' }, // Issue 52472 }); if (user && userCanDesignSourceTypes(user)) { sourcesMenuConfig = sourcesMenuConfig.merge({ @@ -596,6 +597,7 @@ export function getSamplesSectionConfig(user: User): MenuSectionConfig { emptyText: 'No sample types have been defined', filteredEmptyText: 'No sample types available', iconURL: imageURL('_images', 'samples.svg'), + headerURLParams: { 'samplesetgrid.sort': 'Name' }, // Issue 52472 }); if (user && user.hasDesignSampleTypesPermission()) { samplesMenuConfig = samplesMenuConfig.merge({ @@ -616,6 +618,7 @@ export function addAssaysSectionConfig( emptyText: 'No assays have been defined', filteredEmptyText: 'No assays available', iconURL: imageURL('_images', 'assay.svg'), + headerURLParams: { 'allassaysgrid.sort': 'Name', 'activeassaysgrid.sort': 'Name' }, // Issue 52472 }); if (user && user.hasDesignAssaysPermission()) { assaysMenuConfig = assaysMenuConfig.merge({ @@ -660,6 +663,7 @@ function getMediaSectionConfig(): MenuSectionConfig { function getRegistrySectionConfig(): MenuSectionConfig { return new MenuSectionConfig({ iconURL: imageURL('_images', 'molecule.svg'), + headerURLParams: { 'query.sort': 'Name' }, // Issue 52472 }); } diff --git a/packages/components/src/internal/components/navigation/ProductMenuSection.tsx b/packages/components/src/internal/components/navigation/ProductMenuSection.tsx index 5f11e8686b..54bef00b46 100644 --- a/packages/components/src/internal/components/navigation/ProductMenuSection.tsx +++ b/packages/components/src/internal/components/navigation/ProductMenuSection.tsx @@ -106,12 +106,16 @@ export const ProductMenuSection: FC = memo(props => { section.productId, currentProductId, containerPath, - undefined, + config.headerURLParams, config.headerURLPart ?? section.key ); if (headerURL instanceof AppURL) { - headerEl = {label}; + headerEl = ( + + {label} + + ); } else { headerEl = {label}; } diff --git a/packages/components/src/internal/components/navigation/model.ts b/packages/components/src/internal/components/navigation/model.ts index 4d2f826bfb..c2db3cb920 100644 --- a/packages/components/src/internal/components/navigation/model.ts +++ b/packages/components/src/internal/components/navigation/model.ts @@ -219,6 +219,7 @@ export class MenuSectionConfig extends Record({ filteredEmptyText: undefined, emptyAppURL: undefined, emptyURLText: 'Get started...', + headerURLParams: undefined, headerURLPart: undefined, headerText: undefined, iconCls: undefined, @@ -232,6 +233,7 @@ export class MenuSectionConfig extends Record({ declare filteredEmptyText?: string; declare emptyAppURL?: AppURL; declare emptyURLText: string; + declare headerURLParams: Record; declare headerURLPart: string; declare headerText?: string; declare iconCls?: string; From 8361b6e11d239c07ea34674f35f25db46e730a31 Mon Sep 17 00:00:00 2001 From: cnathe Date: Wed, 30 Apr 2025 16:14:02 -0500 Subject: [PATCH 3/8] 6.38.2-cory256pri3.0 --- packages/components/package-lock.json | 4 ++-- packages/components/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/components/package-lock.json b/packages/components/package-lock.json index f85b66fce5..e2885b8095 100644 --- a/packages/components/package-lock.json +++ b/packages/components/package-lock.json @@ -1,12 +1,12 @@ { "name": "@labkey/components", - "version": "6.38.2", + "version": "6.38.2-cory256pri3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@labkey/components", - "version": "6.38.2", + "version": "6.38.2-cory256pri3.0", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/packages/components/package.json b/packages/components/package.json index a94de6bc39..2cd41bbc17 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@labkey/components", - "version": "6.38.2", + "version": "6.38.2-cory256pri3.0", "description": "Components, models, actions, and utility functions for LabKey applications and pages", "sideEffects": false, "files": [ From 0965e7f108a86a31b798625d65312597cf0b5814 Mon Sep 17 00:00:00 2001 From: cnathe Date: Wed, 30 Apr 2025 16:36:12 -0500 Subject: [PATCH 4/8] Customize view available field data-fieldkey attribute to use encoded fieldKey values --- packages/components/releaseNotes/components.md | 1 + .../src/internal/components/ColumnSelectionModal.tsx | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/components/releaseNotes/components.md b/packages/components/releaseNotes/components.md index 032791d5b5..763ab40b63 100644 --- a/packages/components/releaseNotes/components.md +++ b/packages/components/releaseNotes/components.md @@ -5,6 +5,7 @@ Components, models, actions, and utility functions for LabKey applications and p *Released*: TBD - Issue 52979: App grid customize view doesn't expand lookup field with special char - Issue 52472: Re-clicking the Source Types, Sample Types or Assay links in the mega menu removes the sort=Name parameter from the url +- Customize view available field data-fieldkey attribute to use encoded fieldKey values ### version 6.38.2 *Released*: 30 April 2025 diff --git a/packages/components/src/internal/components/ColumnSelectionModal.tsx b/packages/components/src/internal/components/ColumnSelectionModal.tsx index f7082c4079..5100727782 100644 --- a/packages/components/src/internal/components/ColumnSelectionModal.tsx +++ b/packages/components/src/internal/components/ColumnSelectionModal.tsx @@ -105,7 +105,6 @@ export const ColumnChoice: FC = memo(props => { false ); const supportsExpand = !!onExpandColumn; - const colFieldKey = column.index; const disabled = disabledMsg !== undefined; // 46256: use encoded fieldKeyPath @@ -136,12 +135,12 @@ export const ColumnChoice: FC = memo(props => { ); return ( -
+
{supportsExpand && ( <> {parentFieldKeys.map((parent, index) => ( // eslint-disable-next-line react/no-array-index-key -
+
))}
{column.isLookup() && !isExpanded && ( From 53bea66c6d19a9414feb916cf1bd3e8ec31a88a0 Mon Sep 17 00:00:00 2001 From: cnathe Date: Wed, 30 Apr 2025 16:37:16 -0500 Subject: [PATCH 5/8] 6.38.2-cory256pri3.1 --- packages/components/package-lock.json | 4 ++-- packages/components/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/components/package-lock.json b/packages/components/package-lock.json index e2885b8095..f5c0ceba60 100644 --- a/packages/components/package-lock.json +++ b/packages/components/package-lock.json @@ -1,12 +1,12 @@ { "name": "@labkey/components", - "version": "6.38.2-cory256pri3.0", + "version": "6.38.2-cory256pri3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@labkey/components", - "version": "6.38.2-cory256pri3.0", + "version": "6.38.2-cory256pri3.1", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/packages/components/package.json b/packages/components/package.json index 2cd41bbc17..896cf2244e 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@labkey/components", - "version": "6.38.2-cory256pri3.0", + "version": "6.38.2-cory256pri3.1", "description": "Components, models, actions, and utility functions for LabKey applications and pages", "sideEffects": false, "files": [ From e585015984e33b5fe05952fac5d9d87c8a9c42cb Mon Sep 17 00:00:00 2001 From: cnathe Date: Fri, 2 May 2025 14:48:17 -0500 Subject: [PATCH 6/8] merge develop to branch --- .../src/internal/components/navigation/model.ts | 2 +- .../src/public/QueryModel/CustomizeGridViewModal.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/components/src/internal/components/navigation/model.ts b/packages/components/src/internal/components/navigation/model.ts index c2db3cb920..be5c2851af 100644 --- a/packages/components/src/internal/components/navigation/model.ts +++ b/packages/components/src/internal/components/navigation/model.ts @@ -177,7 +177,7 @@ export class ProductMenuModel extends Record({ }); return List(sections); - }; + } setLoadedSections(sections: List): ProductMenuModel { return this.merge({ diff --git a/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx b/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx index fef8367327..b4f747e033 100644 --- a/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx +++ b/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx @@ -9,9 +9,10 @@ import { QueryColumn } from '../QueryColumn'; import { SCHEMAS } from '../../internal/schemas'; -import { QueryModel } from './QueryModel'; import { QueryInfo } from '../QueryInfo'; +import { QueryModel } from './QueryModel'; + export const includedColumnsForCustomizationFilter = (column: QueryColumn, showAllColumns: boolean): boolean => { const isAncestor = column.fieldKeyPath?.indexOf('/Ancestors') >= 0; const isAncestorChild = column.fieldKeyPath?.indexOf('Ancestors/') >= 0; @@ -39,7 +40,10 @@ export const getExpandQueryInfo = async (queryInfo: QueryInfo, column: QueryColu schemaQuery: queryInfo.schemaQuery, }); // For data classes, we want to limit the Ancestor filters to exclude 'Samples' - if (column.fieldKey === QueryColumn.ANCESTORS_PREFIX && queryInfo.schemaQuery.schemaName === SCHEMAS.DATA_CLASSES.SCHEMA) { + if ( + column.fieldKey === QueryColumn.ANCESTORS_PREFIX && + queryInfo.schemaQuery.schemaName === SCHEMAS.DATA_CLASSES.SCHEMA + ) { fkQueryInfo.columns = fkQueryInfo.columns.filter( col => col.fieldKey !== 'Samples' && col.fieldKey !== 'MediaSamples' ); From 12fd54e7b59dfe640de13f45646f6a68f284df1f Mon Sep 17 00:00:00 2001 From: cnathe Date: Fri, 2 May 2025 14:51:19 -0500 Subject: [PATCH 7/8] Update release notes with version number and release date --- packages/components/releaseNotes/components.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/releaseNotes/components.md b/packages/components/releaseNotes/components.md index 699a52ae36..53ad58d8af 100644 --- a/packages/components/releaseNotes/components.md +++ b/packages/components/releaseNotes/components.md @@ -1,8 +1,8 @@ # @labkey/components Components, models, actions, and utility functions for LabKey applications and pages -### version TBD -*Released*: TBD +### version 6.39.1 +*Released*: 2 May 2025 - Issue 52979: App grid customize view doesn't expand lookup field with special char - Issue 52472: Re-clicking the Source Types, Sample Types or Assay links in the mega menu removes the sort=Name parameter from the url - Customize view available field data-fieldkey attribute to use encoded fieldKey values From 020f42b1c3922508474ace3c75765589ddfeb7be Mon Sep 17 00:00:00 2001 From: cnathe Date: Fri, 2 May 2025 14:51:44 -0500 Subject: [PATCH 8/8] 6.39.1 --- packages/components/package-lock.json | 4 ++-- packages/components/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/components/package-lock.json b/packages/components/package-lock.json index eb000a34f6..4537df3047 100644 --- a/packages/components/package-lock.json +++ b/packages/components/package-lock.json @@ -1,12 +1,12 @@ { "name": "@labkey/components", - "version": "6.39.0", + "version": "6.39.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@labkey/components", - "version": "6.39.0", + "version": "6.39.1", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/packages/components/package.json b/packages/components/package.json index 2fecb4e1d0..4ff806ed4b 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@labkey/components", - "version": "6.39.0", + "version": "6.39.1", "description": "Components, models, actions, and utility functions for LabKey applications and pages", "sideEffects": false, "files": [