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

[Security Solution] EUI Refresh Followup Pt. 1 #205990

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Jan 9, 2025

Summary

This is the first batch of work involving #202052.

The new theme was verified to work as-is with our codebase (#205105), as we were not using any removed/renamed code, but this PR includes the other required tasks, as well as some cleanup of existing styles.

As a majority of these components' usage of theme variables is done with @styled-components, and we are transitioning away from that toward @emotion, I also opted to remove usages of @styled-components wherever possible, as that change was negligible in comparison with the theming changes.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

rylnd added 5 commits January 8, 2025 14:17
`warningText -> textWarning`. This also replaces some uses of the
now-deprecated `euiThemeVars` with use of the `useEuiTheme` hook.
* This uses the theme to set a min-height on the textarea, since it is a
  best practice with a resizable element. The dropped styles were no
  longer necessary with the EUI component.
Both box-shadow and border were being applied here, which combined with
the border-radius lead to a weird-looking input. This removes the
box-shadow.
* Removes uses of deprecated tokens
* Aligns EqlQueryBar closer to a normal form component (no custom label)
These were "solved" by using the `useEuiTheme` hook and placing the
generation of styles within the component itself, as opposed to
statically outside them.

In the case of `generateLinkedRulesMenuItems`, the function was a react
component in everything but name. I renamed it so that the react-hooks
linter rules wouldn't complain, but I left the manual invocations of the
element since they're
@elasticmachine
Copy link
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants