Skip to content

[8.x] fix dashboard grid item performs 2 DOM queries every render (#199390)#200648

Merged
nreese merged 1 commit intoelastic:8.xfrom
nreese:backport/8.x/pr-199390
Nov 18, 2024
Merged

[8.x] fix dashboard grid item performs 2 DOM queries every render (#199390)#200648
nreese merged 1 commit intoelastic:8.xfrom
nreese:backport/8.x/pr-199390

Conversation

@nreese
Copy link
Contributor

@nreese nreese commented Nov 18, 2024

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…199390)

Closes elastic#199361

While investigating, I found that fetching DOM element with id
`app-fixed-viewport` is a common pattern. I created the hook
`useAppFixedViewport` to consolidate this logic into a single location.
The hook only performs the DOM look-up on first render and then avoids
the DOM look-up on each additional render.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 9f54503)

# Conflicts:
#	.github/CODEOWNERS
@nreese nreese added the backport This PR is a backport of another PR label Nov 18, 2024
@nreese nreese enabled auto-merge (squash) November 18, 2024 20:09
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. labels Nov 18, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@github-actions
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.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
core 447 450 +3
dashboard 686 689 +3
expressionPartitionVis 196 199 +3
expressionXY 257 260 +3
synthetics 1038 1041 +3
uptime 590 593 +3
total +18

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/core-rendering-browser - 2 +2

Async chunks

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

id before after diff
dashboard 647.1KB 647.2KB +165.0B
expressionPartitionVis 35.5KB 35.6KB +74.0B
expressionXY 127.6KB 127.7KB +59.0B
synthetics 1.1MB 1.1MB +26.0B
uptime 468.2KB 468.2KB +26.0B
total +350.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dashboard 51.8KB 51.8KB +2.0B
Unknown metric groups

API count

id before after diff
@kbn/core-rendering-browser - 2 +2

@nreese nreese merged commit 7e5eeb3 into elastic:8.x Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR ci:project-deploy-observability Create an Observability project Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants