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

Replace style with css prop in SessionView plugin #202778

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

albertoblaz
Copy link
Contributor

Summary

Part of the resolution of this issue:

Removes the style prop in React components and elements to avoid using inline styles. Instead, it uses now the emotion.css prop to dynamically attach all styles to the native class attribute.

Motivation

Using inline styles at scale causes a performance penalty at rendering time. It's way more efficient to attach styles to a single or several classnames instead.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

@albertoblaz albertoblaz added release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:version Backport to applied version labels v8.18.0 labels Dec 3, 2024
@albertoblaz albertoblaz self-assigned this Dec 3, 2024
@albertoblaz albertoblaz requested a review from a team as a code owner December 3, 2024 17:22
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
sessionView 392.1KB 392.1KB +65.0B

cc @albertoblaz

@Omolola-Akinleye Omolola-Akinleye self-requested a review December 9, 2024 10:52
@Omolola-Akinleye
Copy link
Contributor

@albertoblaz Any screenshot to validate none of the styles broke?

Copy link
Contributor

@seanrathier seanrathier left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.18.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants