8000 Fix re-rendering on Error by laurakwhit · Pull Request #1431 · temporalio/ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix re-rendering on Error #1431

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

Merged
merged 1 commit into from
Jun 13, 2023
Merged

Fix re-rendering on Error #1431

merged 1 commit into from
Jun 13, 2023

Conversation

laurakwhit
Copy link
Contributor

Description & motivation 💭

When there is an error and the user attempts to navigates away, the existing layout is re-rendered and the user still see's the error. This was caused by the beforeNavigate clearing the error and causing a re-render (which would cause the error to be set again).

This PR changes the beforeNavigate to afterNavigate which clears the error after the user navigates to a new url and doesn't cause a re-render.

Screenshots (if applicable) 📸

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

  • Change this line to trigger a NetworkError (e.g. if (response.url.includes('/namespaces/default/workflows/')) {)
    • Navigate to workflows > select a workflow
    • Verify there is an error
    • Navigate away from the workflow
    • Verify the error does not persist

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

@laurakwhit laurakwhit requested a review from rossedfort as a code owner June 13, 2023 17:50
@vercel
Copy link
vercel bot commented Jun 13, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
holocene ✅ Ready (Inspect) Visit Preview Jun 13, 2023 5:50pm

@laurakwhit laurakwhit requested a review from Alex-Tideman June 13, 2023 17:50
@laurakwhit laurakwhit merged commit cf2a033 into main Jun 13, 2023
@laurakwhit laurakwhit deleted the fix-re-rendering-on-error branch June 13, 2023 18:23
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
0