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

[Stack Monitoring][Angular removal] Datepicker not updated when url is changed #112063

Closed
Tracked by #115026
estermv opened this issue Sep 14, 2021 · 3 comments
Closed
Tracked by #115026
Assignees
Labels
Epic: Stack Monitoring de-angularization Feature:Stack Monitoring Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@estermv
Copy link
Contributor

estermv commented Sep 14, 2021

When the time is changed in the url, for example, with the zoom-out behavior from charts or from the browser go back button, the datepicker is not synced with the url.

@botelastic botelastic bot added the needs-team Issues missing a team label label Sep 14, 2021
@estermv estermv added Epic: Stack Monitoring de-angularization Feature:Stack Monitoring Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services and removed needs-team Issues missing a team label labels Sep 14, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@klacabane
Copy link
Contributor

klacabane commented Oct 7, 2021

So we have two-way binding between the timepicker and the url and we're currently only handling the timepicker->url by directly mutating the global state, which ends up updating the url. Didn't dive deep enough to understand the magic behind that yet.

We need a way to propagate a url change down to the datepicker. The timefilter object that's exposed via the useKibana hook may be a good option as it seems responsive to url changes through the timeUpdate$ observable. Can we subscribe to that and make appropriate state changes ?
Two open questions so far:

  • will this introduce a circular event chain: timepicker change -triggers-> url change -triggers-> observable event -triggers-> timepicker change ... ?
  • the timefilter class is prefixed with a TODO: remove that's 2 years old, is that still relevant ? Looks like we're using that all over the place already so I guess it's not

@klacabane
Copy link
Contributor

Looks like we're clear on the circular event chain, submitting a fix

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

No branches or pull requests

3 participants