-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[OneDiscover][Extension] DataTable Row Actions #188762
Conversation
/ci |
/ci |
/ci |
/ci |
/ci |
as discussed async and in sync, no objections to permanently swap the positions |
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.
Did a quick test of the latest changes to update control column order and it's working as expected, thanks! 🙏
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.
Update to embed mode screenshot test baseline LGTM 👍 I scanned the PR, and I think that is the only change owned by the @elastic/kibana-presentation team... For some reason the codeowners file filter isn't available 🙈
…extension # Conflicts: # src/plugins/discover/public/context_awareness/profile_providers/example_data_source_profile/profile.tsx # src/plugins/discover/public/context_awareness/types.ts
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.
Hi @tonyghiani, The new actions are positioned each in its own grid control cell now. This allows for better keyboard navigation between them but yes, the header cell does not have enough space for the label now. Is it problematic if we drop 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.
Thanks for these changes. Left a question/comment regarding trailingControlColumn
which I think should be not be deprected.
Use getRowIndicator prop on UnifiedDataTable instead of border-left style
This change is helpful. But I think it might conflict ( will have to test ) with Security solution's Event Renderers which needs color indicators in 2 lines for one row as shown below
Currently it is simply a css based border styling and in my opinion, making it a seperate cell, makes it somewhat difficult for us to add color to the extra Event Rendered row.
May i know what was reason it is not a style (eg, border-left
) but a seperate cell?
export const getAdditionalRowControlColumns = ( | ||
rowControlColumns: RowControlColumn[] | ||
): EuiDataGridControlColumn[] => { | ||
if (rowControlColumns.length <= 2) { |
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.
It is a nit but Do we need a configuration on how many controls are visible? I will add @paulewing to this conversation because security uses 2 controls before shifting others in the popover menu.
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.
The implementation is according to the provided design. For consistency, I would not introduce a custom configuration for items visible/hidden. We can still increase this number of visible actions as a follow up if becomes necessary.
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.
Sure. Thanks for your response.
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.
normal = 'normal', | ||
} | ||
|
||
export const DataTableRowControl: React.FC<{ size?: Size }> = ({ size, children }) => { |
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.
Shouldn't size default to Size.normal
?
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.
Good question. I think for now it makes sense to apply a fixed size only for actions we provide via UnifiedDataTable and keep the default as it was before. In Security, there are larger control cells.
Not a big problem, but only the icon feels a bit confusing, I'd rather say we go without any icon/header label at this point. |
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
Hi @logeekal, Thanks for the review!
There are several reasons:
Please let us know whether it would conflict or not. It might be possible to reuse |
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.
Thank you @jughosta for all the clarifications. PR Looks great and I have desk tested as well. As you already said that if at a later stage, changes are needed we can do so at that point.
Honestly, I do not know yet. But I think we can tackle it later if that problem arises. Thanks for explaining the reasoning. |
💚 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
References to deprecated APIs
History
To update your PR or re-run it, just comment with: cc @jughosta |
## 📓 Summary Closes #190457 This change extracts the logic around the logs document controls/indicator from Logs Explorer and registers the same controls in Discover through the extension point added in #188762. The controls are registered only for the `logs-data-source-profile` contextual profile. https://github.com/user-attachments/assets/40adfb19-357f-46e1-9d69-fc9c0860c832 ## 👣 Next steps - [ ] #190670 - [ ] #190460 --------- Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 📓 Summary Closes elastic#190457 This change extracts the logic around the logs document controls/indicator from Logs Explorer and registers the same controls in Discover through the extension point added in elastic#188762. The controls are registered only for the `logs-data-source-profile` contextual profile. https://github.com/user-attachments/assets/40adfb19-357f-46e1-9d69-fc9c0860c832 ## 👣 Next steps - [ ] elastic#190670 - [ ] elastic#190460 --------- Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 📓 Summary Closes elastic#190457 This change extracts the logic around the logs document controls/indicator from Logs Explorer and registers the same controls in Discover through the extension point added in elastic#188762. The controls are registered only for the `logs-data-source-profile` contextual profile. https://github.com/user-attachments/assets/40adfb19-357f-46e1-9d69-fc9c0860c832 ## 👣 Next steps - [ ] elastic#190670 - [ ] elastic#190460 --------- Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
rowAdditionalLeadingControls
prop to render additional leading controlscustomControlColumnsConfiguration
to the new prop. Refactor actions format in Log Explorer.if custom row actions are specifiedTesting
For testing the example profile:
discover.experimental.enabledProfiles: ['example-root-profile', 'example-data-source-profile', 'example-document-profile']
to kibana.dev.ymlmy-example-logs
name or create an alias to an existing index:my-example-logs
indexFollow up for Security solution
The following items would require deprecation/refactoring in components on Security Solution pages to have consistent UX (can result in 500+ lines of code changes):
externalControlColumns
to the new proprowAdditionalLeadingControls
Convert fromtrailingControlColumns
to a normal column.trailingControlColumns
is deprecatedrowAdditionalLeadingControls
prop for UnifiedDataTable #189294getRowIndicator
prop on UnifiedDataTable instead ofborder-left
styleChecklist