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

Hotfix: Sample details modal add/remove to/from cart #1397

Merged
merged 7 commits into from
Nov 3, 2022

Conversation

deepsidhu85
Copy link
Contributor

@deepsidhu85 deepsidhu85 commented Nov 1, 2022

Description of changes

What did you change in this pull request? Provide a description of files changed, user interactions changed, etc. Include how to test your changes.

Fixed bug with sample details viewer which would still display a Add to Cart button to if the modal was closed and relaunched after the sample was added to the cart from the viewer.

Steps to reproduce before fix:

  1. Add sample to project
  2. Launch sample details viewer by clicking on the sample name in the project samples table
  3. Click the Add to Cart button. Should now display the Remove from Cart button
  4. Close the viewer
  5. Relaunch the details viewer for the same sample
  6. You should see a Add to Cart button

To test fix:

  1. Add sample to project
  2. Launch sample details viewer by clicking on the sample name in the project samples table
  3. Click the Add to Cart button. Should now display the Remove from Cart button
  4. Close the viewer
  5. Relaunch the details viewer for the same sample
  6. You should see a Remove from Cart button

Related issue

Link to the GitHub issue this pull request addresses using the #issuenum format. If it completes an issue, use Fixes #issuenum to automatically close the issue.

Checklist

Things for the developer to confirm they've done before the PR should be accepted:

  • CHANGELOG.md (and UPGRADING.md if necessary) updated with information for new change.
  • Tests added (or description of how to test) for any new features.
    * [ ] User documentation updated for UI or technical changes.

deepsidhu85 and others added 7 commits November 1, 2022 14:39
…iewer, then closed, reopened, it would still have an add to cart button until the page was refreshed. Updated previous refetch to refetchCart
…e sample detail viewer if the sample was previously added to the cart, the viewer closed, then relaunched
…sample is added or removed to/from the cart then the SampleDetails tag is invalidated and a fresh query is made to the server to get updated sample info
Copy link
Member

@ericenns ericenns left a comment

Choose a reason for hiding this comment

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

👍 I test this locally and it now works as expected. Thanks @deepsidhu85

@ericenns ericenns merged commit c87efff into master Nov 3, 2022
@ericenns ericenns deleted the hotfix-sample-modal-cart branch November 3, 2022 13:08
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.

2 participants