Fix volcano plot thumbnail out of sync#1299
Merged
Conversation
Contributor
|
I would try to modify this code to something like this: if (!isEqual(filters ?? [], currentPlotFilters ?? [])) {This way, we aren't mutating state. Recall that state should almost always be treated as immutable, with few exceptions. This is especially true in React components and utility functions. |
Member
Author
|
Thanks @dmfalke ! Done and done! |
Member
Author
|
Updated with |
dmfalke
pushed a commit
that referenced
this pull request
Feb 14, 2025
* fix for thumnails not rendering * replace mutating state with better check of filters
dmfalke
added a commit
that referenced
this pull request
Feb 18, 2025
* checkpoint * Add type annotations to remove inferred `any` type. * Allow an analysis descriptor to be provided to `useAnalysis` * Only update state if the next param value is different than the previous param value * Extract useAnalysisState to allow external state tracking of analysis object * Use useAnalysisState, add counts, etc * Add stubbed question page with custom name * Allow hiding starred variable feature * fix typo * Use global memoization * Encapsulate creation of eda api clients * Adhere to lastest "api" for GenesByEdaSubset * dont wrap sentence * fix label in user comment upload form * Fix volcano plot thumbnail out of sync (#1299) * fix for thumnails not rendering * replace mutating state with better check of filters * Allow html formatting in search page header * Enable override for GenesByEdaSubset and set question page heading dynamically. * use more specific query name * Use alphabetic ordering when displaying a flattened list of eda entities (#1323) * only order variable tree entities alphabetically (#1324) * Add annotations to plotly plots (#1321) * added plot annotations functionality * improve scatter annotation story * added histogram annotation story * introduce VEuPathDBAnnotation type * fix annotation types in histogram * update query name * use dynamic import for plotly, to keep it out of the main bundle * replace "EdaSubsetting" with "EdaSubset" * Revert to injecting script and link tags in document head * rename component * Add custom formatter for stepDetails * Handle empty filters in param value formatter --------- Co-authored-by: aurreco-uga <aurreco@uga.edu> Co-authored-by: Cristina Aurrecoechea <aurreco@palm.penn.apidb.org> Co-authored-by: Ann Sizemore Blevins <asizemore@users.noreply.github.com>
dmfalke
added a commit
that referenced
this pull request
Feb 24, 2025
* checkpoint * Add type annotations to remove inferred `any` type. * Allow an analysis descriptor to be provided to `useAnalysis` * Only update state if the next param value is different than the previous param value * Extract useAnalysisState to allow external state tracking of analysis object * Use useAnalysisState, add counts, etc * Add stubbed question page with custom name * Allow hiding starred variable feature * fix typo * Use global memoization * Encapsulate creation of eda api clients * Adhere to lastest "api" for GenesByEdaSubset * Stub in eda scatterplot for phenotype dataset * Allow html formatting in search page header * Enable override for GenesByEdaSubset and set question page heading dynamically. * use more specific query name * update query name * use dynamic import for plotly, to keep it out of the main bundle * replace "EdaSubsetting" with "EdaSubset" * dont wrap sentence * fix label in user comment upload form * Fix volcano plot thumbnail out of sync (#1299) * fix for thumnails not rendering * replace mutating state with better check of filters * Allow html formatting in search page header * Enable override for GenesByEdaSubset and set question page heading dynamically. * use more specific query name * Use alphabetic ordering when displaying a flattened list of eda entities (#1323) * only order variable tree entities alphabetically (#1324) * Add annotations to plotly plots (#1321) * added plot annotations functionality * improve scatter annotation story * added histogram annotation story * introduce VEuPathDBAnnotation type * fix annotation types in histogram * update query name * use dynamic import for plotly, to keep it out of the main bundle * replace "EdaSubsetting" with "EdaSubset" * Revert to injecting script and link tags in document head * Export type * Expand type to include ReactHTML elements * Allow className to be overridden * Add EdaDatasetGraph component * Use EdaDatasetGraph component with EdaPhenotypeGraphsDataTable * simplify layout and add warning message for genes not in experiment * Add parentheses * Wire up highlightIds * Highlight graph_ids * Allow arbitrary variable values to be highlighted * Specify gene variable values to highlight --------- Co-authored-by: aurreco-uga <aurreco@uga.edu> Co-authored-by: Cristina Aurrecoechea <aurreco@palm.penn.apidb.org> Co-authored-by: Ann Sizemore Blevins <asizemore@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1297
From the start the
visualization.descriptor.currentPlotFilters = undefinedif there are no filters. It works fine if we do have filters. In the other visualizations it initializes to[]as it should if the analysis has no filters.This PR has a fix, but I doubt it's really the direction we should go. I'd like to ask if folks have any other ideas!