Skip to content

Author manager updates#260

Merged
notartom merged 5 commits into
LibriVox:masterfrom
redrun45:author-manager
May 24, 2025
Merged

Author manager updates#260
notartom merged 5 commits into
LibriVox:masterfrom
redrun45:author-manager

Conversation

@redrun45

Copy link
Copy Markdown
Collaborator

This PR does add more code than it removes... but hopefully it's clean and easy to follow. Each commit is separable, if just one part needs to go. There having been no objections on the admin side, I'm getting this up while it's still (re-)fresh in mind.

Resolves #91: after further discussion, we don't need that column visible for the foreseeable future. 😁

Resolves #24... hopefully. New endpoints for authors by ID, by project, or by confirmation status (the default use-case), and some hopefully-intuitive ways of navigating them. 🤞

Also, a nicer way of handling malformed responses to AJAX requests. Seeing an unhelpful message is better than having the application freeze, as seen in #31. Thankfully, that's rare on live these days. When testing with warnings enabled, not so rare. 😉

redrun45 added 5 commits May 22, 2025 00:08
This feature is unused, and it makes Author Manager's table too wide.
This commit adds some navigation options, rather than loading all author
records at once (at least by default).  It does NOT add real pagination,
which is evidently something that our dataTables library supports[1].

From the user side:
1. The client-side control (and JS code) for toggling between
 unconfirmed authors and *all* authors has been replaced with a pair of
 navigation buttons.  'unconfirmed' is the default, and is _faster_.
2. dataTables will now hide its client-side pagination and search
 controls, if there are 10 or fewer authors in the navigation selection.
3. Authors can be navigated individually by name, using the new,
 auto-completing search box (based on the one in Section Compiler).

[1]: https://datatables.net/manual/server-side
...though, at version 1.9.2, we're officially in legacy-land.
Based on @peterjdann's handy addition to project pages.  👍
Navigate Author Manager by project ID, showing all authors and
 translators assigned to the project (or to its individual sections, if
 it's a collection/compilation project).
For now, this is only linked from the Projects search view.
Added some try/catch logic, so the application doesn't hang when the
 server response is malformed or lost (see: HTML warnings that precede
 the expected JSON objects, or timeouts in certain AJAX requests).
Also, we can use the pretty message pattern that the other pages use,
 instead of a jarring fallback to `alert()`.
@notartom notartom merged commit b7f4d3b into LibriVox:master May 24, 2025
1 check passed
@redrun45 redrun45 deleted the author-manager branch May 25, 2025 05:33
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.

Author Manager: Reduce Horizontal Scrolling Improve the Loading Time for the Author Manager

2 participants