[SIEM] Fix Inspect query 'request timestamp' value changes when curso…#54223
Conversation
|
Pinging @elastic/siem (Team:SIEM) |
rylnd
left a comment
There was a problem hiding this comment.
Great stuff! 👍to the CSS approach for showing/hiding, that's much cleaner.
Fixing the "hide until hovered" behavior on those buttons is huge! There's much less visual clutter on our dashboards now (although our panels look a little bare now! 😦).
I think we could move those CSS unit tests into dedicated InspectButtonContainer unit tests, but other than that this is awesome. Thanks for updating those components re: displayName as you touched them, too. I'll try to do the same.
One other thing I noticed in review: the timestamp value still changes when the browser is resized. I'm not sure whether this is expected (do we have some kind of global re-render on window resize?) or whether we want to fix it, but I figured it was worth mentioning.
| .first() | ||
| .exists() | ||
| ).toBe(true); | ||
| expect(wrapper.find(`InspectButtonContainer`)).toHaveStyleRule('opacity', '0', { |
There was a problem hiding this comment.
It feels like these tests should live in inspect.index.test.tsx, no? If we truly want a test for the integration here, I would just keep the exists() check.
There was a problem hiding this comment.
Then we won't need to pass around BUTTON_CLASS, either.
There was a problem hiding this comment.
I was thinking about that as well, please let me know if it was done how you thought so :)
There was a problem hiding this comment.
Looks great! I'd love to get rid of the BUTTON_CLASS constant entirely but I couldn't immediately think of a way to get that to work. I was hoping we could use the css helper described here, but no such luck.
…ect-modal-rerender # Conflicts: # x-pack/legacy/plugins/siem/public/components/inspect/index.tsx # x-pack/legacy/plugins/siem/public/components/stat_items/__snapshots__/index.test.tsx.snap
rylnd
left a comment
There was a problem hiding this comment.
@patrykkopycinski things look good, thanks for making these changes. Just a summary of what's left:
- yarn.lock changes
- The issue I mentioned earlier about timestamp changing on resize. Is that expected? Do we care about that?
rylnd
left a comment
There was a problem hiding this comment.
Sounds good RE the Autosizer stuff. The rerender only happens on some pages, and even then it's not something we'd expect to happen all the time. 👍
|
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* upstream/master: (26 commits) Take page offset into account too (elastic#54567) [APM] Support error.{log,exception}.stacktrace.classname (elastic#54577) Np migration tsvb route validation (elastic#51850) [ML] MML calculator enhancements for multi-metric job wizard (elastic#54573) [SIEM] Fix Inspect query 'request timestamp' value changes when curso… (elastic#54223) Fix chromeless NP apps not using full page width (elastic#54550) Remove extraneous public import to prevent failing Kibana startup (elastic#54676) [Uptime] Temporarily skip flakey tests (elastic#54675) Skip failing uptime tests Create UI for alerting and actions plugin (elastic#48959) [dev/build/sass] build stylesheets for disabled plugins too (elastic#54654) [SIEM] Use bulk actions API when updating or deleting rules (elastic#54521) Support "Deprecated" label in advanced settings (elastic#54539) [Maps] add text halo color and width style properties (elastic#53827) Service Map Data API at Runtime (elastic#54027) [SIEM] Detection Engine Create Rule Design Review #1 (elastic#54442) Skip flaky test [Canvas] Enable Embeddable maps (elastic#53971) [SIEM][Detection Engine] Increases the number or rules you can view on a single page (elastic#54628) uiSettings - use validation field for image field maxSize (elastic#54522) ...
…r leaves modal
Summary
Fixes #54196
Switched from
useStatebased approach tocss, also extracted logic to a separate component, so there is no more need to set up state and callbacks in every componentRefactored couple components to a new approach for
React.memoto properly propagatedisplayNameFixed https://github.com/elastic/kibana/pull/54223/files#diff-203bd20c5fdd5ee6229bc376a8a586b9L23 so now the icon will be hidden by default,
;was missingChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers