Allow role mappings to be cloned#118434
Conversation
|
Pinging @elastic/kibana-security (Team:Security) |
| interface ActionsEuiTableFormattingProps { | ||
| children: ReactNode; | ||
| } | ||
| export const ActionsEuiTableFormatting = React.memo<ActionsEuiTableFormattingProps>( |
There was a problem hiding this comment.
Notes for reviewer: Why did Xavier decide to override EUI? is he crazy?
Answer: maybe he is, but the real reason is that I/we wanted to keep our icon working with onClick and href at the same time but the actions props in EuiTable does not let you do that and I still wanted the same style how EUI do it and that's my reason.
if you know/have a better way please let me know, I will love/do it.
There was a problem hiding this comment.
There isn't a better way (that I'm aware of) to achieve this without changing some things in EUI 👍
|
@elasticmachine merge upstream |
thompsongl
left a comment
There was a problem hiding this comment.
Both comments should be taken as one. Not a blocker, just a suggestion if you don't need to maintain the styles in a variable as template string.
|
@elasticmachine merge upstream |
jportner
left a comment
There was a problem hiding this comment.
Nice job, just a couple of nits below
|
|
||
| it('allows a role mapping to be deleted', async () => { | ||
| await testSubjects.click(`deleteRoleMappingButton-new_role_mapping`); | ||
| await testSubjects.click('euiCollapsedItemActionsButton'); |
There was a problem hiding this comment.
Maybe to future-proof the other tests against any EUI changes, we should change the other two action tests (clone, edit) to also use the collapsed item actions button. WDYT?
There was a problem hiding this comment.
I do not think it is really needed because it is the same actions button on the row or in the popover menu item. In my opinion, it should already being handle by the EUI library ;) (We need to trust our tools)
x-pack/plugins/security/public/management/roles/roles_grid/roles_grid_page.tsx
Outdated
Show resolved
Hide resolved
| private onCancelDelete = () => { | ||
| this.setState({ showDeleteConfirmation: false }); | ||
| this.setState({ showDeleteConfirmation: false, selection: [] }); | ||
| this.tableRef.current?.setSelection([]); | ||
| }; |
jportner
left a comment
There was a problem hiding this comment.
LGTM, one last nit below
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* add clobe to role mapping and update functionalit in role to match UX * fix some I * fix jest test + fix table selection when canceling deletion * add tests around clone action in role mapping * fix i18n * remove i18n * review Greg I * fix styling + name * add explaination Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
* add clobe to role mapping and update functionalit in role to match UX * fix some I * fix jest test + fix table selection when canceling deletion * add tests around clone action in role mapping * fix i18n * remove i18n * review Greg I * fix styling + name * add explaination Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
* add clobe to role mapping and update functionalit in role to match UX * fix some I * fix jest test + fix table selection when canceling deletion * add tests around clone action in role mapping * fix i18n * remove i18n * review Greg I * fix styling + name * add explaination Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* add clobe to role mapping and update functionalit in role to match UX * fix some I * fix jest test + fix table selection when canceling deletion * add tests around clone action in role mapping * fix i18n * remove i18n * review Greg I * fix styling + name * add explaination Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Adding functionality to clone a role mapping. I realized that there was some discrepancy between roles and roles mapping. I took the initiative to make it similar. It also matching what EUI is doing in their example
Resolves: #111744
Checklist