Sample color display - grid column renderer, sample detail header, storage box view, etc. - #2056
Conversation
…E_COLOR_REQUIRED_COLUMNS in requiredColumns
…when no colors defined in project
…n header" for sample type with sample color breakdown
|
|
||
| export function setActiveProjectColors(moduleContext: ModuleContext, hasActiveProjectColors: boolean): ModuleContext { | ||
| // side-effect set global moduleContext | ||
| if (LABKEY?.moduleContext?.samplemanagement) { |
There was a problem hiding this comment.
Perhaps something for future, but would be good to indicate to other active sessions that a color is no longer active to avoid additional usage.
There was a problem hiding this comment.
Yeah, I like that idea but that seems like a future TODO once we see how much the sample color feature (and archived colors in particular) gets used.
| columns: string[], | ||
| colFieldKeyMap?: Record<string, string> | ||
| colFieldKeyMap?: Record<string, string>, | ||
| displayValueKeys?: string[] |
There was a problem hiding this comment.
I see this is used by eln/Tooltip. Wonder why similar treatment is not needed for sample status which also contains color display?
There was a problem hiding this comment.
Good call. Turns out I don't need to do this displayValueKeys behavior if we just query for the ExpMaterialColor/Label directly, instead of relying on displayValue of ExpMaterialColor, in the ToolTipLoader.ts loadSampleData
…orage box view, etc. (#7932) ## Rationale Server-side foundation for the sample color work: expose the set of active project colors through `ExperimentService` so clients can determine whether a project has colors defined and gate color display accordingly, and remove the experimental feature flag now that the feature is complete. ## Related Pull Requests - LabKey/labkey-ui-components#2056 - LabKey/labkey-ui-premium#1014 - LabKey/limsModules#2402 - #7932 ## Changes - Added `ExperimentService.getActiveProjectColors()`, which backs the `hasActiveProjectColors` module context flag consumed by the client apps. - Renamed `ExperimentService.getDataColorLabel()` to `getDataColor()`. - Sample listing grids include `ExpMaterialColor` and use `SAMPLE_COLOR_REQUIRED_COLUMNS` for `requiredColumns`. - Removed the experimental feature flag.
…orage box view, etc. (#3156) ## Rationale See related PR for rationale. This PR adds test helpers for getting various sample color related dom elements. ## Related Pull Requests - LabKey/labkey-ui-components#2056 - LabKey/labkey-ui-premium#1014 - LabKey/limsModules#2402 - LabKey/platform#7932 ## Changes - Selenium test helpers for sample color test cases
Rationale
Surface the sample color assigned via project-level sample colors throughout the sample UI — grid columns, detail views, lineage details, editable grids, and storage capacity breakdowns — and only include the color column where the project actually has active colors defined. Also removes the experimental feature flag now that the feature is complete.
Related Pull Requests
Changes
ExpMaterialColorand useSAMPLE_COLOR_REQUIRED_COLUMNSforrequiredColumns; addedQueryInfo.showSampleColorColand exportedSAMPLE_COLOR_COLOR_COLUMN_NAME.Apphelpers to readhasActiveProjectColorsfrommoduleContext, used to gate color display:getOmittedSampleTypeColumnsaddsSAMPLE_COLOR_REQUIRED_COLUMNSwhen no colors are defined in the project, and sample type system fields includeExpMaterialColoronly when colors are active.SampleColorRenderer: addedcls,showLabel, anduseSmallprops plus styling updates;SampleColorInputoption renderer now includesColorIcon.HorizontalBarSectionandItemsLegendhandle a section header for the sample type with sample color breakdown.QueryModel.flattenValuesFromRownow carriesdisplayValue.