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

Do not show hidden values in the barchart List sample label menu option results #2593

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

creilly8
Copy link
Contributor

@creilly8 creilly8 commented Jan 10, 2025

Description

Closes issue #2583.

Catches custom hidden variables as categories before displaying them on the client. Will send data to use for testing in All-pharmacotyping example: http://localhost:3000/?noheader=1&massnative=hg38,ALL-pharmacotyping.

Checklist

Check each task that has been performed or verified to be not applicable.

  • Tests: added and/or passed unit and integration tests, or N/A
  • Todos: commented or documented, or N/A
  • Notable Changes: updated release.txt, prefixed a commit message with "fix:" or "feat:", added to an internal tracking document, or N/A

@karishma-gangwani
Copy link
Contributor

karishma-gangwani commented Jan 10, 2025

seeing this error when 'RNA-seq' from assay availability is overlaid with 'sex' in all-pharma and categories are clicked to enable hiding via the legend.

image

/** Don't show hidden values in the results
* May not be caught in server request for custom variables
* with user supplied keys */
if (self.config.term.q?.hiddenValues && `${sample[self.config.term.$id].key}` in self.config.term.q.hiddenValues)
Copy link
Contributor

Choose a reason for hiding this comment

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

do you want to add additional check with optional chaining to check against the .key?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really. The in operator make this safer since the string value itself could be anything: str | undefined | null

Copy link
Collaborator

Choose a reason for hiding this comment

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

i suggest to look into a backend fix instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

list samples should correspond to samples hidden in legend category
3 participants