-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Logs Explorer] Implement Flyout content header #169832
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
…na into 169501-log-flyout-header
…na into 169501-log-flyout-header
…na into 169501-log-flyout-header
Content: (props) => { | ||
const KibanaContextProviderForPlugin = useKibanaContextForPluginProvider(core, plugins); | ||
|
||
return ( | ||
<KibanaContextProviderForPlugin> | ||
<LazyCustomFlyoutContent {...props} /> | ||
</KibanaContextProviderForPlugin> | ||
); | ||
}, |
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.
Content: (props) => { | |
const KibanaContextProviderForPlugin = useKibanaContextForPluginProvider(core, plugins); | |
return ( | |
<KibanaContextProviderForPlugin> | |
<LazyCustomFlyoutContent {...props} /> | |
</KibanaContextProviderForPlugin> | |
); | |
}, | |
Content: (props) => { | |
const KibanaContextProviderForPlugin = useKibanaContextForPluginProvider(core, plugins); | |
const internalState = useObservable( | |
stateContainer.internalState.state$, | |
stateContainer.internalState.get() | |
); | |
return ( | |
<KibanaContextProviderForPlugin> | |
<LazyCustomFlyoutContent {...props} dataView={internalState.dataView} /> | |
</KibanaContextProviderForPlugin> | |
); | |
}, |
Instead of adding dataView
to FlyoutContentProps
, could we instead retrieve it from the state container directly and pass it to your custom component? I'd prefer to keep a single source of truth for customizations to access the shared state if possible.
On a side note, requiring useObservable
to access our state in customization components feels a bit inconvenient IMO. Internally we use state selector functions instead, and we could likely give customizations access to the same selectors by passing them to the CustomizationCallback
. Just curious if it would be useful for your team to have access to these selectors too?
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.
Hey Davis, our team is working on extracting the persistent system on top of the state container, so that each consumer of the log explorer won't depend on the URL sync. I think we'll consume the internal state reacting to the observable changes anyway, I can't say if we'll need those selectors.
Regarding your suggestion I see your point, I'll apply your suggestion and revert the changes on the customization contract.
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.
Changes applied in c0cf9dc
/oblt-deploy |
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.
Code-only review. Data Discovery changes (now just some type exports) LGTM 👍
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
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.
LGTM! Clean work 👏 Tested it and works great
Thanks for adding the tests
📓 Summary
Closes #169501
🛑
Merge blocked by: #169634This work implements the first frame for a detailed log flyout.
It adds highlight on the log level, timestamp and message details for a log.
This first layer of customization will work as a base for all the upcoming enhancements on the flyout detail.
Screen.Recording.2023-10-26.at.10.20.49.mov