Skip to content

Comments

Fix volcano plot thumbnail out of sync#1299

Merged
asizemore merged 4 commits intomainfrom
fix-1297-volcano-thumbnail
Feb 6, 2025
Merged

Fix volcano plot thumbnail out of sync#1299
asizemore merged 4 commits intomainfrom
fix-1297-volcano-thumbnail

Conversation

@asizemore
Copy link
Member

Resolves #1297

From the start the visualization.descriptor.currentPlotFilters = undefined if 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!

@dmfalke
Copy link
Contributor

dmfalke commented Dec 16, 2024

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.

@asizemore
Copy link
Member Author

Thanks @dmfalke ! Done and done!

@asizemore asizemore requested a review from dmfalke December 19, 2024 14:18
@asizemore asizemore marked this pull request as ready for review December 19, 2024 14:37
@asizemore
Copy link
Member Author

Updated with main.
@dmfalke I totally forgot about this PR after the break. Do you mind giving it another look when you have a min please?

Copy link
Contributor

@dmfalke dmfalke left a comment

Choose a reason for hiding this comment

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

Sorry for the delay! 🚀

@asizemore asizemore merged commit 90471ab into main Feb 6, 2025
1 check passed
@dmfalke dmfalke deleted the fix-1297-volcano-thumbnail branch February 11, 2025 18:17
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>
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.

Volcano thumbnail not loading

2 participants