Skip to content

Conversation

AlinaGoaga
Copy link
Contributor

@AlinaGoaga AlinaGoaga commented Jan 2, 2023

Closes #1902

What changed?

Once error boundary kicked in, navigating away from the page had no effect, the user had to refresh the page to get access to the app again.

I've added a wrapper around the class component that we've got from the React docs to allow the use of useEffect which gives us the possibility to remove the error on location change

Sadly we can't use the Core component with a ContentWrapper page passed in which I had created, as the Core ErrorBoundary catches the error and displays it before it reaches the custom EE version which results in it not being displayed properly. It would be good to use the layout core components in EE as well, that would remove the issue

The changes have also made in core on PR weaveworks/weave-gitops#3205

How can we test it?

To test you can, for example, pass null instead of data?.deployments in <FluxRuntime deployments={data?.deployments} />

@AlinaGoaga AlinaGoaga added the bug Something isn't working label Jan 2, 2023
@AlinaGoaga AlinaGoaga changed the title Error boundary implementation with core component [UI] Fix: error boundary does not allow user to navigate away from the page Jan 2, 2023
@AlinaGoaga AlinaGoaga marked this pull request as ready for review January 2, 2023 15:42
@AlinaGoaga AlinaGoaga requested review from ahussein3 and foot January 2, 2023 15:42
@AlinaGoaga AlinaGoaga merged commit 008efc1 into main Jan 5, 2023
@AlinaGoaga AlinaGoaga deleted the error-boundary branch January 5, 2023 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[UI] Error boundary in the UI doesn't work properly
2 participants