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

fix(ui): skip history.push on initial page load. Fixes #13940 #13995

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

tczhao
Copy link
Member

@tczhao tczhao commented Dec 13, 2024

Fixes #13940

Motivation

To resolve issue where user need to click backbutton twice to go back to previous page

Modifications

useEffect always executes after page render, causing duplicate entry in history.
skip useEffect for initial page load

Verification

Clicking on UI make sure below issue doesn't occur

After transitioning from the list to the detail screen, a browser back is required twice to return to the list.
This can be observed not only in Workflow, but also in CronWorkflow, WorkflowTemplate, and ClusterWorkflowTemplate.

Check other UI parts perform as usual prior to the change

@tczhao tczhao marked this pull request as ready for review December 13, 2024 05:16
Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

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

Thank you!

@terrytangyuan terrytangyuan merged commit f796449 into main Dec 13, 2024
17 checks passed
@terrytangyuan terrytangyuan deleted the 13940-ui-backbutton branch December 13, 2024 11:34
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.

UI: Many steps are needed to get back to the detail screen from the list.
2 participants