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

Bugfix: no Trrack action for unchanged filters #319

Merged
merged 5 commits into from
Mar 25, 2024

Conversation

NateLanza
Copy link
Contributor

Does this PR close any open issues?

Closes #306

Give a longer description of what this PR addresses and why it's needed

Previously, moving the degree filter slider around and returning it to its original position dispatched a trrack action to the provenance graph despite no change being made. In addition, changing only the lower or upper bound would dispatch an action for the unchanged bound. This fixes both issues by only dispatching actions for changed bounds after the slider is released.

Provide pictures/videos of the behavior before and after these changes (optional)

Have you added or updated relevant tests?

  • Yes
  • No changes are needed

Have you added or updated relevant documentation?

  • Yes
  • No changes are needed

Are there any additional TODOs before this PR is ready to go?

TODOs:

  • ...

@NateLanza NateLanza requested a review from JakeWags March 23, 2024 22:24
@NateLanza NateLanza self-assigned this Mar 23, 2024
Copy link

netlify bot commented Mar 23, 2024

Deploy Preview for upset2 ready!

Name Link
🔨 Latest commit 725d44d
🔍 Latest deploy log https://app.netlify.com/sites/upset2/deploys/6601a8d61a763300086820e4
😎 Deploy Preview https://deploy-preview-319--upset2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@NateLanza
Copy link
Contributor Author

NateLanza commented Mar 23, 2024

@JakeWags I'm not sure if this is exactly what you had in mind; lmk what you think. It might make more sense to have all of the actions confirm that change has occurred before updating the provenance graph, but it appears that declining to update the state inside one of the action callback functions still adds a node to the trrack graph, so I wasn't able to stop the action there. I'm not seeing another place to halt the action except before it's dispatched, which I've done here.

@JakeWags
Copy link
Member

@JakeWags I'm not sure if this is exactly what you had in mind; lmk what you think. It might make more sense to have all of the actions confirm that change has occurred before updating the provenance graph, but it appears that declining to update the state inside one of the action callback functions still adds a node to the trrack graph, so I wasn't able to stop the action there. I'm not seeing another place to halt the action except before it's dispatched, which I've done here.

I think this solution works fine because there really isn't anything else which both updates Trrack state AND can be set to the current value.

Copy link
Member

@JakeWags JakeWags left a comment

Choose a reason for hiding this comment

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

Approved 👍

@NateLanza NateLanza merged commit cb64fb6 into main Mar 25, 2024
7 checks passed
@NateLanza NateLanza deleted the isu306-trrack-filter-dups branch March 25, 2024 16:44
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.

Trrack: Filtering should only register one action for the changed slider
2 participants