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

Save comparison multi plot image values across sessions #4476

Merged
merged 13 commits into from
Aug 14, 2023

Conversation

julieg18
Copy link
Contributor

@julieg18 julieg18 commented Aug 10, 2023

Demo

Screen.Recording.2023-08-11.at.11.28.18.AM.mov

Part of #4422

@julieg18 julieg18 added the product PR that affects product label Aug 10, 2023
@julieg18 julieg18 self-assigned this Aug 10, 2023
value: number
) {
if (!this.comparisonMultiPlotValues[revision]) {
this.comparisonMultiPlotValues[revision] = {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we look into removing old revisions from the comparisonMultiPlotValues state? Updating the state every time a revision gets removed, for example?

Copy link
Member

Choose a reason for hiding this comment

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

If we were going to do that I would check to see if the revision is in the full list of experiments/commits before removing

useEffect(() => {
window.clearTimeout(changeDebounceTimer.current)
changeDebounceTimer.current = window.setTimeout(() => {
setComparisonMultiPlotValue(path, plot.id, currentStep)
Copy link
Contributor Author

@julieg18 julieg18 Aug 11, 2023

Choose a reason for hiding this comment

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

Originally, I wanted to rely solely on values and remove useState but that

  • was less respondent (took a sec for slider change to update the image and only when the user let go of their mouse)
  • made it more difficult to update the slider since the browser was handling the state instead of react

@julieg18 julieg18 marked this pull request as ready for review August 11, 2023 16:38
@julieg18 julieg18 enabled auto-merge (squash) August 14, 2023 12:28
@codeclimate
Copy link

codeclimate bot commented Aug 14, 2023

Code Climate has analyzed commit 2cab6ff and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 96.7% (85% is the threshold).

This pull request will bring the total coverage in the repository to 95.2% (0.0% change).

View more on Code Climate.

@julieg18 julieg18 merged commit 5851790 into main Aug 14, 2023
@julieg18 julieg18 deleted the save-comparison-multi-plot-values-across-sessions branch August 14, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR that affects product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants