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

Add fix to browser history after navigating to exploration page with no pipeline #464

Merged
merged 4 commits into from
Feb 27, 2023

Conversation

nandhinibsn
Copy link
Contributor

@nandhinibsn nandhinibsn commented Feb 23, 2023

Resolve #

Description:

Checklist:

You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge it.

  • ISSUE NUMBER. You linked the issue number (Ex: Resolve #XXX).
  • PRE-COMMIT. You ran pre-commit on all commits, or else, you
    ran pre-commit run --all-files at the end.
  • USER CHANGES. The changes are added to CHANGELOG.md and the documentation, if they impact
    our users.
  • DEV CHANGES.
    • Update the documentation if this PR changes how to develop/launch on the app.
    • Update the README files and our wiki for any big design decisions, if relevant.
    • Add unit tests, docstrings, typing and comments for complex sections.

@nandhinibsn nandhinibsn self-assigned this Feb 23, 2023
@nandhinibsn nandhinibsn changed the title Add fix to save the browser history in exploration page-utterance table Add fix to browser history after navigating to exploration page with no pipeline Feb 23, 2023
@nandhinibsn
Copy link
Contributor Author

There was a console error which occurred when we navigate to the exploration page with no pipeline.
Screen Shot 2023-02-23 at 5 17 01 PM

I simplified the solution to navigating on the Dashboard page instead of the Exploration page. I believe it's more of a simplified way. Let me know your thoughts @JosephMarinier

@nandhinibsn
Copy link
Contributor Author

Hey @JosephMarinier, the solution added to Dashboard has been reverted as it resolved the issue with tracking history. Still, it did not switch tabs from prediction overview to utterance table if no pipeline was selected from the exploration page.

Additionally, I understood why the console error was caused by reading this blog.

To solve the bug, I added useEffect to handle the pipeline change from the exploration page to solve the issue with tracking history while the console error is not occurring anymore. Let me know what you think

@JosephMarinier
Copy link
Contributor

Excellent! 👍
As you said, the React.useEffect is perfect for if you select No pipeline when already on the Exploration Space. However, when navigating from the Dashboard to the Exploration Space, it now works (👍) but it adds an intermediary state in the history, on the invalid Prediction Overview tab. So, I think the two solutions could be combined. You could also add your initial solution to the Link to= on the Dashboard, to polish the navigation. It also has the advantage of showing the correct destination when hovering the button.

@nandhinibsn
Copy link
Contributor Author

Excellent! 👍 As you said, the React.useEffect is perfect for if you select No pipeline when already on the Exploration Space. However, when navigating from the Dashboard to the Exploration Space, it now works (👍) but it adds an intermediary state in the history, on the invalid Prediction Overview tab. So, I think the two solutions could be combined. You could also add your initial solution to the Link to= on the Dashboard, to polish the navigation. It also has the advantage of showing the correct destination when hovering the button.

Okay, Make sense. I will add the condition back to the Dashboard page.

@nandhinibsn nandhinibsn force-pushed the nandhini/fix-browser-history-from-exploration-page branch from 30ffb02 to 2e3952e Compare February 27, 2023 17:20
Copy link
Contributor

@JosephMarinier JosephMarinier left a comment

Choose a reason for hiding this comment

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

🚢 🇮🇹

@nandhinibsn
Copy link
Contributor Author

Thank you for your time and valuable suggestion :)

@nandhinibsn nandhinibsn merged commit 11780f6 into main Feb 27, 2023
@nandhinibsn nandhinibsn deleted the nandhini/fix-browser-history-from-exploration-page branch February 27, 2023 18:51
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.

None yet

2 participants