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

3084 app crash when adding to cart from data table #1039

Merged

Conversation

nicwells
Copy link
Contributor

@nicwells nicwells commented Feb 3, 2022

Fixes BlueBrain/nexus#3084

Description

  • Created ErrorBoundary re-usable component that takes a fallback component to display if there's an error.
  • Created Fallback data cart component for if there's an error, wrapped data cart in ErrorBoundary component. Example of component below where the data cart fallback component will show an error icon and when clicked will allow recovery by clearing the cart
    Datacart_Fallback
  • Fix bug that is causing the data cart component to error. Where a Sparql or Elasticsearch query's results don't include _project property of resource the data cart will error as it expects this property.

How has this been tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added necessary unit and integration tests.
  • I have added screenshots (if applicable), in the comment section.

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (1.7.0-M4@d27aa86). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             1.7.0-M4    #1039   +/-   ##
===========================================
  Coverage            ?   66.61%           
===========================================
  Files               ?       22           
  Lines               ?      668           
  Branches            ?      144           
===========================================
  Hits                ?      445           
  Misses              ?      223           
  Partials            ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d27aa86...b371ec4. Read the comment docs.

@dhaneshnm dhaneshnm merged commit ac89535 into 1.7.0-M4 Feb 4, 2022
@dhaneshnm dhaneshnm deleted the 3084-app-crash-when-adding-to-cart-from-data-table branch February 4, 2022 08:33
dhaneshnm pushed a commit that referenced this pull request Mar 11, 2022
* Generic error boundary helper class component

* Use Error boundary for cart with fallback cart component

Fallback cart component allows you to clear and reset error boundary state

* Add _project property if missing which is required by data cart

Co-authored-by: Dhanesh Neela Mana <dhanesh.neelamana@epfl.ch>
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.

3 participants