Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbDisc: Plate Set ELN Reference #1648

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labkey/components",
"version": "5.24.0",
"version": "5.24.0-fb-pslsidcolumn.0",
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
"sideEffects": false,
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ export const SearchPanel: FC<SearchPanelProps> = memo(props => {
}
if (platesEnabled) {
categories.push(SearchCategory.Plate);
categories.push(SearchCategory.PlateSet);
}

return categories;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export function resolveIconSrc(data: any, category: SearchCategory): string {
// else fallback to default
} else if (data.sampleSet?.name) {
iconSrc = 'samples';
} else if (data.type) {
} else if (data.type && category !== SearchCategory.PlateSet) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly hacky... currently without this conditional the 'type' on a PS makes logic flow into this block

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not seeing why going into this block is a problem. Does the lcType for PS end up matching on one of these conditions? I'd assume it would just fall through.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It falls through and renders like so:
Screenshot 2024-11-22 at 11 34 44 AM

const lcType = data.type.toLowerCase();
if (lcType === 'sampleset') {
iconSrc = 'sample_set';
Expand All @@ -233,6 +233,7 @@ export function resolveIconSrc(data: any, category: SearchCategory): string {
case SearchCategory.NotebookTemplate:
iconSrc = 'notebook_blue';
break;
case SearchCategory.PlateSet:
case SearchCategory.Plate:
iconSrc = 'plates';
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export enum SearchCategory {
Notebook = 'notebook',
NotebookTemplate = 'notebookTemplate',
Plate = 'plate',
PlateSet = 'plateSet',
StorageLocation = 'storageLocation',
TerminalStorageLocation = 'terminalStorageLocation',
WorkflowJob = 'workflowJob',
Expand Down