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

[Obs AI Assistant] Simplify routing #176569

Merged
merged 2 commits into from
Feb 11, 2024
Merged

Conversation

sorenlouv
Copy link
Member

Minor simplification to how we link into the conversation app

@sorenlouv sorenlouv requested a review from a team as a code owner February 9, 2024 09:30
@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

replace: (path, ...args) => {
const next = link(path, ...args);
history.replace(next);
},
navigateToConversationsApp: (path, ...args) => {
Copy link
Member

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?

Copy link
Member Author

@sorenlouv sorenlouv Feb 9, 2024

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).

Copy link
Member Author

@sorenlouv sorenlouv Feb 9, 2024

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

@sorenlouv sorenlouv added release_note:skip Skip the PR/issue when compiling release notes v8.13.0 labels Feb 9, 2024
},
replace: (path, ...args) => {
const next = link(path, ...args);
history.replace(next);
navigateToApp('observabilityAIAssistant', { path: next, replace: true });
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

perfect

Copy link
Contributor

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?

Copy link
Member Author

@sorenlouv sorenlouv Feb 13, 2024

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.

@sorenlouv sorenlouv enabled auto-merge (squash) February 11, 2024 22:34
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observabilityAIAssistant 168.8KB 168.5KB -320.0B

History

  • 💛 Build #192553 was flaky 20c6148bfde5a8213fa858d29c1263317fb6f633
  • 💚 Build #192484 succeeded 3e557988c94ec2860cf7e36df3e56dc2384f477f

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@sorenlouv sorenlouv merged commit 955dd69 into elastic:main Feb 11, 2024
17 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Feb 11, 2024
@sorenlouv sorenlouv deleted the navigate-to-app branch February 13, 2024 08:52
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
Minor simplification to how we link into the conversation app
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
Minor simplification to how we link into the conversation app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants