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

[Logs UI] Refactor log stream page state #145131

Closed
Tracked by #134412
weltenwort opened this issue Nov 14, 2022 · 1 comment · Fixed by #145234
Closed
Tracked by #134412

[Logs UI] Refactor log stream page state #145131

weltenwort opened this issue Nov 14, 2022 · 1 comment · Fixed by #145234
Assignees
Labels
Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@weltenwort
Copy link
Member

weltenwort commented Nov 14, 2022

📓 Summary

In order to support upcoming features like the unified search bar's filter support and to improve the robustness of the page, we want to clean up the way the page manages and renders its state.

✔️ Acceptance criteria

  • xstate and xstate-react are Kibana dependencies and managed by renovate
  • Implement a state machine to model the initialization of the page:
    • uninitialized ➡️ loading log view ➡️ has log view
  • The "loading log view" state communicates with the separate log view resolution actor.
  • The short-circuiting logic in the LogsPageProviders component is made unnecessary.

Bonus achievements

  • The state machine is implemented in a package (such as packages/observability-logs/log-stream-page/state.
  • The state machine provides strict types, that are derived via typegen as part of the bazel build process.

💡 Implementation hints

Page state machine draft

image

Potential package structure

  • log-stream-page/state
  • log-stream-page/query-state
  • log-stream-page/datepicker-state
  • log-stream-page/filter-state
  • log-stream/log-entries-state
  • log-stream/log-histogram-state
  • log-view-state
@weltenwort weltenwort added Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Nov 14, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Logs UI Logs UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants