Skip to content

feat(slo): store search state in url#168528

Merged
kdelemme merged 14 commits intoelastic:mainfrom
kdelemme:feat/store-slo-search-state
Oct 17, 2023
Merged

feat(slo): store search state in url#168528
kdelemme merged 14 commits intoelastic:mainfrom
kdelemme:feat/store-slo-search-state

Conversation

@kdelemme
Copy link
Copy Markdown
Contributor

Resolves #167899

🍒 Summary

This PR synchronizes the search bar with the url state, useful for bookmarking and sharing search filters.
I've also refactored the search bar to remove the possibility to unselect a sort option.

search.state.mov

@kdelemme kdelemme added release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" Feature:SLO v8.12.0 labels Oct 10, 2023
@kdelemme kdelemme self-assigned this Oct 10, 2023
@ghost
Copy link
Copy Markdown

ghost commented Oct 10, 2023

🤖 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!)

@kdelemme kdelemme marked this pull request as ready for review October 10, 2023 18:54
@kdelemme kdelemme requested a review from a team October 10, 2023 18:54
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/actionable-observability (Team: Actionable Observability)

@kibana-ci
Copy link
Copy Markdown

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
observability 481 482 +1

Async chunks

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

id before after diff
observability 1.0MB 1.0MB +551.0B

History

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

cc @kdelemme

@CoenWarmer
Copy link
Copy Markdown
Contributor

Looks good. Have you considered placing the logic for use_url_search_state inside a locator? That way other pages inside O11y and other apps could also deeplink to it.

@kdelemme
Copy link
Copy Markdown
Contributor Author

Looks good. Have you considered placing the logic for use_url_search_state inside a locator? That way other pages inside O11y and other apps could also deeplink to it.

I'll see how this works

Copy link
Copy Markdown
Member

@simianhacker simianhacker left a comment

Choose a reason for hiding this comment

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

LGTM

@mgiota
Copy link
Copy Markdown
Contributor

mgiota commented Oct 17, 2023

Have you considered placing the logic for use_url_search_state inside a locator?

@CoenWarmer Are locators similar to state containers? Cause I have implemented something similar with state containers in the o11y rules page.

In case it's relevant @kdelemme you can have a look at these PRs to checkout how I used state containers
#131523
#131300

My initial inspiration was this PR

@CoenWarmer
Copy link
Copy Markdown
Contributor

IMO the state containers pattern is a little complex for what it aims to achieve.

I've created a couple of locators which are a bit more simple here:

  • x-pack/plugins/observability/public/locators

@kdelemme
Copy link
Copy Markdown
Contributor Author

I've created an issue for adding the locator: #169101

@kdelemme kdelemme merged commit 9cc7b8c into elastic:main Oct 17, 2023
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Oct 17, 2023
@kdelemme kdelemme deleted the feat/store-slo-search-state branch October 17, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting Feature:SLO release_note:skip Skip the PR/issue when compiling release notes Team: Actionable Observability - DEPRECATED For Observability Alerting and SLOs use "Team:obs-ux-management", for AIops "Team:obs-knowledge" v8.12.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SLO] Store search state in URL

7 participants