-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Obs AI Assistant] Simplify routing #176569
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
replace: (path, ...args) => { | ||
const next = link(path, ...args); | ||
history.replace(next); | ||
}, | ||
navigateToConversationsApp: (path, ...args) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious why we need this in any case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we necessarily do. I'd prefer only having push
/replace
but that would require changing them to use navigateToApp
(see conversation here).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the navigateToConversationsApp
method in 20c6148
}, | ||
replace: (path, ...args) => { | ||
const next = link(path, ...args); | ||
history.replace(next); | ||
navigateToApp('observabilityAIAssistant', { path: next, replace: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, does this not cause a full page refresh?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I was also a little worried about using this internally when the name suggests it should be used when navigating between apps. But I don't observe any downsides like full page refreshes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace does mean you can't go use browser back anymore no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace does mean you can't go use browser back anymore no?
Yes, instead of adding a new item to the history stack (like push
) replace
overwrites the existing item.
20c6148
to
64274cc
Compare
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Minor simplification to how we link into the conversation app
Minor simplification to how we link into the conversation app
Minor simplification to how we link into the conversation app