-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Enhancement endpoint flyout UI fixes #117987
[Security Solution] Enhancement endpoint flyout UI fixes #117987
Conversation
Pinging @elastic/security-onboarding-and-lifecycle-mgt (Team:Onboarding and Lifecycle Mgt) |
} | ||
`; | ||
|
||
const ColumnTitle = ({ children }: { children: React.ReactNode }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest you use memo()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need for memo here. In addition detailsResults
(where this component is used) is already memoized.
description: ( | ||
<EuiText> | ||
<EuiText size="xs"> | ||
{' '} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not part of your changes, but just wondering if this was intentional or if perhaps it was just the IDE formatter that did it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably some previous PR mistake. I'll remove it.
<EndpointPolicyLink | ||
policyId={details.Endpoint.policy.applied.id} | ||
data-test-subj="policyDetailsValue" | ||
style={{ paddingRight: '5px' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a static object for the style
value or memoizing it in order to avoid unnecessary re-renders. Same below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no need for memo here. this component is literally a link, the win on using memo is probably worse in performance than not using it. Furthermore the variable where this is stored detailsResults
is already memoized
I'll use className in this one as David suggested.
color="subdued" | ||
size="xs" | ||
className={'eui-displayInlineBlock'} | ||
style={{ whiteSpace: 'nowrap', paddingRight: '5px' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: I think Eui has a class name that can be added to className=
prop for no wrap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also we should avoid using the style
prop and use styled components instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering what was the go-to approach for this. I'll go for classNane.
@paul-tavares yes I totally forgot about that, thanks!
@elasticmachine merge upstream |
…t-flyout-ui-fixes
70c4593
to
a8a1af4
Compare
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
) * initial UI changes for font size and deprecated dependency * remove euitext wrapper * Remove unused dependency * Remove import * Add text break word * inline policy, version and icon * Allign icon in the out_of_date component * Remove unncessary wrapper * Replace style attributes with className Co-authored-by: Kibana Machine <[email protected]>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…118856) * initial UI changes for font size and deprecated dependency * remove euitext wrapper * Remove unused dependency * Remove import * Add text break word * inline policy, version and icon * Allign icon in the out_of_date component * Remove unncessary wrapper * Replace style attributes with className Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Esteban Beltran <[email protected]>
) * initial UI changes for font size and deprecated dependency * remove euitext wrapper * Remove unused dependency * Remove import * Add text break word * inline policy, version and icon * Allign icon in the out_of_date component * Remove unncessary wrapper * Replace style attributes with className Co-authored-by: Kibana Machine <[email protected]>
* initial UI changes for font size and deprecated dependency * remove euitext wrapper * Remove unused dependency * Remove import * Add text break word * inline policy, version and icon * Allign icon in the out_of_date component * Remove unncessary wrapper * Replace style attributes with className Co-authored-by: Kibana Machine <[email protected]>
Summary
This is a second attempt for #115758
Fixes:
Before
After
Checklist
Delete any items that are not applicable to this PR.