Wait & show spinner when associated libraries still loading (PP-5030) - #352
Conversation
|
Claude finished @tdilauro's task in 8m 51s —— View job Code review
SummaryThis holds up well. I traced the reducer's state machine through every ordering I could construct — first failure → retry → DetailsMinor:
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #352 +/- ##
==========================================
+ Coverage 91.50% 91.82% +0.31%
==========================================
Files 206 209 +3
Lines 7593 7716 +123
Branches 1662 1696 +34
==========================================
+ Hits 6948 7085 +137
+ Misses 357 353 -4
+ Partials 288 278 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
048675a to
f708a02
Compare
ff88b40 to
619422d
Compare
That is not quite true, but even if it were, this change is out of proportion to its value. It would be an absolute mess to do. If an issue like this ever becomes a problem in real life, there are easier ways to handle this. |
619422d to
9320855
Compare
9320855 to
4743d84
Compare
4743d84 to
676820b
Compare
676820b to
059541f
Compare
907b149 to
d798098
Compare
886202e to
9febbd7
Compare
| : allLibrariesError || allLibrariesRefreshError | ||
| ? "" |
There was a problem hiding this comment.
When either library request fails, this component clears the persistent status region because it assumes the adjacent Alert has role="alert". This repository uses react-bootstrap 0.32.4, whose Alert renders a plain div unless a role is explicitly supplied. As a result, screen-reader users are not notified when loading transitions to a failure or refresh failure. The same unsupported assumption appears in the alerts rendered by LibrariesRefreshWarning, IndividualAdminEditForm, and ServiceEditForm.
79dd1ad to
c140598
Compare
| * twice. This region covers the one transition nothing else announces, | ||
| * loading to cleanly loaded. | ||
| */ | ||
| export default function LibrariesLoadStatus({ |
There was a problem hiding this comment.
LibrariesLoadStatus directly renders a <p>, but its name does not identify that DOM role. This violates the repository directive that component names should reflect the element they produce, so the requirement must be satisfied before merging.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
54637f6 to
c2cfd4e
Compare
c2cfd4e to
1df9580
Compare
|
Re: Claude feedback...
Not going to do this. This would perpetuate the same kind of "has everything loaded yet" confusion I opened this PR to fix. We have the loading state from the libraries, so I think it's better to just display everything once the libraries have arrived. |
## Description Bump the pinned `@thepalaceproject/circulation-admin` package version from 1.46.0 to [v1.47.0](https://github.com/ThePalaceProject/circulation-admin/releases/tag/v1.47.0). That release contains: - Clear all associated libraries after a successful save (PP-5153, [#353](ThePalaceProject/circulation-admin#353)) - Adopt library object building subclass hook to avoid duplication ([#354](ThePalaceProject/circulation-admin#354)) - Wait & show spinner when associated libraries still loading (PP-5030, [#352](ThePalaceProject/circulation-admin#352)) ## Motivation and Context New Palace Manager release should ship the current admin UI. ## How Has This Been Tested? Ran the admin config tests locally (`tox -e py312-docker -- tests/manager/api/admin/test_config.py`) — 32 passed. CI covers the rest. **Note:** at the time this PR was opened, the `v1.47.0` npm publish had not yet completed (the admin repo's `Test & Publish` workflow for the tag was still running), so jsDelivr does not resolve the new specifier yet: ``` $ curl -s "https://data.jsdelivr.com/v1/packages/npm/@thepalaceproject/circulation-admin/resolved?specifier=1.47.0" {"type":"npm","name":"@thepalaceproject/circulation-admin","version":null,"links":{}} ``` This should be re-checked before merging to confirm the production package URL the manager builds will serve real assets. ## Checklist - [x] I have updated the documentation accordingly. - [x] All new and existing tests passed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Description
Note:
Header,QuicksightDashboard, andCustomListsstill read the libraries slice directly; migrating them tosettledAllLibraries/fetchLibrariesIfNeededis deferred for future work.Motivation and Context
The library list loads separately from the integration data and, on large sites, may arrive noticeably later. The Libraries section rendered bare short names first, then visibly rewrote itself with linked labels.
[Jira PP-5030]
How Has This Been Tested?
dev-serveragainst a PM CM with many libraries.Checklist: