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] The page template is re-rendered unnecessarily on any state change of the log stream page #150624

Closed
weltenwort opened this issue Feb 8, 2023 · 1 comment · Fixed by #151311
Assignees
Labels
bug Fixes for quality problems that affect the customer experience 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

📓 Problem description

The Logs UI uses the observability page template to wrap the pages. On the stream page, the template is re-rendered on any state change of the page, even though its direct props haven't changed

✔️ Acceptance criteria

  • The page template component is memoized such that changes in the context providers in the hierarchy above it don't cause a re-render.
@weltenwort weltenwort added bug Fixes for quality problems that affect the customer experience 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 Feb 8, 2023
@elasticmachine
Copy link
Contributor

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

@crespocarlos crespocarlos self-assigned this Feb 13, 2023
crespocarlos added a commit that referenced this issue Feb 22, 2023
## Summary

closes [#150624](#150624)

This PR improves how the page template re-renders, preventing it from
doing so when context providers in the hierarchy below it change.



https://user-images.githubusercontent.com/2767137/219055025-7da3a0ab-446f-4a8e-9a8e-af24a1a254be.mov


### For maintainers

At given moments, the Logs UI URL changes, updating the `logPosition`
state. This will re-render the template and its children.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience 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