Skip to content

Show / hide configuration associations (PP-4022)#213

Merged
tdilauro merged 10 commits intomainfrom
feature/show-associated-libraries
Apr 16, 2026
Merged

Show / hide configuration associations (PP-4022)#213
tdilauro merged 10 commits intomainfrom
feature/show-associated-libraries

Conversation

@tdilauro
Copy link
Copy Markdown
Contributor

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+Click on 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 (or undefined to 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 links

Each component overrides as needed:

  • Collections / base class — shows associated libraries
  • DiscoveryServices — shows successfully registered libraries with their registration stage
  • IndividualAdmins — shows admin roles; sitewide roles (manager-all, librarian-all) are pinned to the top; system admins show a synthetic "sysadmin" entry
  • Libraries — suppresses the panel (libraries are not associated with other libraries)

Also includes a few minor fixes picked up along the way:

  • UNSAFE_componentWillMount update to componentDidMount,
  • (window as any).FormData updated to FormData,
  • .catch() added to save() to suppress unhandled-rejection warnings, and
  • CollectionData now explicitly declares marked_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?

  • Manual testing in local development environment.
  • New tests for added functionality.
  • CI checks pass.

Checklist:

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@tdilauro tdilauro requested a review from a team April 13, 2026 15:28
Copy link
Copy Markdown
Member

@jonathangreen jonathangreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/components/EditableConfigList.tsx Outdated
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)}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I forgot to take it out of the tab order.

expect(wrapper.instance().getAdminLevel()).to.equal(1);
});

describe("renderAssociatedLibraries", () => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Since we add tests/jest/components/EditableConfigList.test.tsx, shouldn't these new tests go there instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tdilauro tdilauro merged commit 5bc4942 into main Apr 16, 2026
1 check passed
@tdilauro tdilauro deleted the feature/show-associated-libraries branch April 16, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants