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

Change file and links name to resource displayName #5061

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
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
8 changes: 7 additions & 1 deletion src/pages/studyView/StudyViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,13 @@ export default class StudyViewPage extends React.Component<
id={
StudyViewPageTabKeyEnum.FILES_AND_LINKS
}
linkText={RESOURCES_TAB_NAME}
linkText={
this.store.resourceDefinitions
.result?.length == 1
? this.store.resourceDefinitions
.result[0].displayName
: RESOURCES_TAB_NAME
}
Comment on lines +724 to +730
Copy link
Member

@inodb inodb Dec 11, 2024

Choose a reason for hiding this comment

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

how does this work when there is only a resource definition for a study resource (e.g. rather than a sample or patient resource)? I guess, technically, it might show up as two tabs with the same name? Prolly ok to not handle this case but just curious

Copy link
Collaborator

Choose a reason for hiding this comment

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

@inodb @hweej the fact that the content of this is this.openResource suggests it can contain many things no? So to just choose the first resourceDefinition doesn't seem right.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah i see. it's if the length is one.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@hweej i think this will have behavior where tab will have text RESOURCE_TAB_NAME while the resource definitions are loading and then the name will switch. We should probably just the tab until it finishes loading. see hide propery on other tabs in this collection

hide={!this.shouldShowResources}
>
<div>
Expand Down
Loading