[Security Solution] expanded flyout - right section skeleton#152047
[Security Solution] expanded flyout - right section skeleton#152047PhilippeOberti merged 2 commits intomainfrom
Conversation
|
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
a8d1155 to
d8e8bad
Compare
d8e8bad to
5f0302a
Compare
| /** | ||
| * Open the Overview tab in the alert details expandable flyout right section | ||
| */ | ||
| export const openOverviewTab = () => cy.get(ALERT_DETAILS_FLYOUT_OVERVIEW_TAB).click(); |
There was a problem hiding this comment.
should we add any should('be.visible') to account for potential delays in the flyout opening in the CI environment? May not be necessary, but a flakiness issue I've seen with some of the popovers and flyouts
| if (isSecurityFlyoutEnabled) { | ||
| openFlyout({}); | ||
| openFlyout({ | ||
| right: { |
There was a problem hiding this comment.
Woohoo, a real panel! 😄
| /** | ||
| * Alert details flyout right section header | ||
| */ | ||
| export const HeaderTitle: FC = memo(() => { |
There was a problem hiding this comment.
One thing to note is that this flyout should probably be thought of as configurable as possible for both alerts and just simple events. Whether that means having separate components based on one vs the other, or a generalized unified component (i.e. a unified header) that works for both.
There was a problem hiding this comment.
you're totally correct, I actually have a separate ticket for the header itself, as I feel there be a need of some more discussion with Product and UI to handle different scenarios
| return ( | ||
| <EuiFlyoutBody | ||
| css={css` | ||
| height: calc(100vh - 262px); |
There was a problem hiding this comment.
I think I did the same thing with the explicit 262, but I think we should see if we can get the topbar heights from some shared constant if possible in case that changes
There was a problem hiding this comment.
you're right again, I stole this from you without really thinking about why we're using it. I feel like this shouldn't be part of the PR, and I'll add it back in a cleaner way once I implement the content of the tabs!
| const contextValue = useContext(RightPanelContext); | ||
|
|
||
| if (!contextValue) { | ||
| throw new Error('RightPanelContext can only be used within RightPanelContext provider'); |
There was a problem hiding this comment.
👍🏾 for the developer experience 😄
| * 2.0. | ||
| */ | ||
|
|
||
| export const OVERVIEW_TAB_CONTENT_TEST_ID = 'securitySolutionAlertDetailsFlyoutOverviewTabContent'; |
There was a problem hiding this comment.
I like this pattern and ultra separation of concerns. I know people tend to keep items like this in constants.ts files. I'm not sure which is better, but just wanted to point it out
There was a problem hiding this comment.
yeah I've seen many translations.ts files but not as many test_ids.ts files. What I like about having them separated, is when we declare variable in Cypress (within the screens folder) we can import those from the test_ids files. It avoids making typo mistakes
- header with simple static title - 3 empty tabs (overview, table and json)
5f0302a to
2ce05a5
Compare
|
@michaelolo24 I've decided to change slightly the folder structure under the |
2ce05a5 to
0c6df06
Compare
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
| */ | ||
|
|
||
| import { EuiFlyoutBody } from '@elastic/eui'; | ||
| import type { VFC } from 'react'; |
There was a problem hiding this comment.
We'll have to update this whenever we move to React 18 since it's deprecated in the most recent version
…#152047) - header with simple static title - 3 empty tabs (overview, table and json)
Summary
This PR leverages the expandable flyout work done in a previous PR and adds the alert details right section skeleton:
How to test
xpack.securitySolution.enableExperimental: ['securityFlyoutEnabled']to thekibana.jsonfileNotes:
'securityFlyoutEnabled'herehttps://github.com/elastic/security-team/issues/6065
Checklist