Show / hide configuration associations (PP-4022)#213
Conversation
jonathangreen
left a comment
There was a problem hiding this comment.
This looks great to me @tdilauro! This is a feature that I've wanted to see for a long time. 🎉
As always, my caveat with front-end reviews is that I only know enough here to be dangerous. I added a couple of minor comments to consider, but they may or may not be relevant.
| duplicate of the controls above the list. Screen readers and | ||
| keyboard users should interact with the first set only. */} | ||
| <div aria-hidden="true"> | ||
| {this.renderExpandCollapseControls(expandable)} |
There was a problem hiding this comment.
Minor comment / question on this one: Does aria-hidden mean that keyboard users can't land on this control? Otherwise couldn't a user tab into this control, but not get the announcement for it?
There was a problem hiding this comment.
Good catch. I forgot to take it out of the tab order.
| expect(wrapper.instance().getAdminLevel()).to.equal(1); | ||
| }); | ||
|
|
||
| describe("renderAssociatedLibraries", () => { |
There was a problem hiding this comment.
Minor: Since we add tests/jest/components/EditableConfigList.test.tsx, shouldn't these new tests go there instead?
There was a problem hiding this comment.
I put these in here because I was being lazy and using the old enzyme style tests. But I'll move them over to jest/react testing library.
Description
Add an expandable disclosure panel to each row on the integration/configuration list pages, showing the libraries / roles associated with that service. Users can expand/collapse individual rows or use Expand all / Collapse all controls.
Alt+Clickon any toggle expands or collapses all rows at once.This is implemented as a set of overridable template methods on
GenericEditableConfigList:getAssociatedEntries— returns entries to display (orundefinedto suppress the toggle entirely)formatAssociatedCount— controls the count label (e.g. "3 libraries", "2 roles", "1 registered library")getAllLibraries— resolves short names to display names and edit linksEach component overrides as needed:
Also includes a few minor fixes picked up along the way:
UNSAFE_componentWillMountupdate tocomponentDidMount,(window as any).FormDataupdated toFormData,.catch()added tosave()to suppress unhandled-rejection warnings, andCollectionDatanow explicitly declaresmarked_for_deletion.Motivation and Context
Admins currently have no way to see which libraries are associated with a service without opening each service's edit form individually.
[Jira PP-4022]
How Has This Been Tested?
Checklist: