Round 2 (B): study-group page redesign — one verb per action, scoped download, status badge, pinned columns - #658
Open
mcfrank wants to merge 1 commit into
Open
Round 2 (B): study-group page redesign — one verb per action, scoped download, status badge, pinned columns#658mcfrank wants to merge 1 commit into
mcfrank wants to merge 1 commit into
Conversation
…us badge, pinned columns Round-2 feedback, part B (approved design). Principle: one verb, one place; scope follows the selection; destructive actions look destructive and ask properly. No POST names or view handlers change; the one backend tweak is that deleting a group now lands on the dashboard instead of the deleted group's page. Toolbar (interface.html) - Single primary "Add administrations"; the split-button arrow is gone. - One "Download" menu. With nothing ticked it posts the whole-group names (download-study-csv etc.); with rows ticked the same items post the selected-rows names (download-selected etc.). A scope header says which. Clinical reports and participant links genuinely need a selection, so they stay visible but disabled with "select rows first" until rows are ticked. - "Group settings" replaces "Update Group". - Selection row reads "N selected" and holds Re-administer and Delete; Delete opens a count-stating dialog instead of a browser confirm(). - Delete group leaves the page (see study_form.html). Table (tables.py, table.html): 15 columns -> 10 - Pinned on the left: checkbox, Edit (pencil + label), Participant ID. - Status badge replaces Scored / Completed / Completed background info / Completed survey / Is active: Not started -> In progress -> Survey pending -> Completed -> Scored, plus Expired and Inactive; the tooltip carries last activity. Opt-out appears as a chip next to the badge only when set. - Link cell: Open (new tab) + copy-to-clipboard button. - Created / Expires / Completed rendered from ISO via data-utc in the viewer's local time (the old header-name-keyed conversion is gone). - Last modified, confirmed-completion and completion-flag response move into the row's Edit dialog (retitled "Edit administration") as read-only fields. - Sticky header; the card scrolls horizontally on narrow screens with the pinned columns holding. Group settings (study_form.html) - Titled "Group settings · <name>"; danger zone at the bottom with the GitHub-style type-the-name-to-confirm dialog, posting the existing delete-study action. Both deletes are soft deletes in the backend, so the copy says "cannot be undone from your account" rather than promising erasure. Add administrations (administer_new_modal.html, import_data.html) - Titled "Add administrations"; method tabs (Enter IDs / Generate / Upload CSV / Reusable link / External source / Import completed responses) with one short sentence each instead of the duplicated wall of text. Field names are unchanged, so admin_new_fun's field-based dispatch is untouched. Footer button follows the tab; link tabs get copy buttons; the importer tab hands off to the (retitled, slimmed) import dialog. Docs synced to the new names. Theme CSS (both copies) gains the table, badge, danger-zone and method-tab styles. Known follow-ups: the Selenium test for deleting a group (and the locator-rot tracked in #648) needs rewriting for the new flow; the theme CSS is served without cache-busting, so testers may need a hard reload. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part B of the round-2 feedback (the approved group-page proposal), stacked on #657. Design proposal with before/after mockups: https://claude.ai/code/artifact/7a4700c1-5e9d-4d52-ba64-299ee58981c6
No POST names or handlers change. Everything is templates, CSS, and small JS — with one deliberate 3-line backend tweak, called out below. Principle throughout: one verb, one place; scope follows the selection; destructive actions look destructive and ask properly.
Toolbar
download-study-csv…); rows ticked → the same items post the selected-rows names (download-selected…), and a scope header says which. Clinical reports and participant links genuinely need a selection (per-row PDFs; no whole-group links handler), so they stay visible but disabled with "select rows first".confirm().Table: 15 columns → 10
data-utc.Group settings page
delete-studyaction.delete-study,StudyCreateView.postnow redirects to the dashboard instead of the deleted group's page (3 lines;test_post_delete_studyupdated to the new contract and also asserts the soft-delete). Worth a look, @HenryMehta.is_active/active=False), so the copy says "cannot be undone from your account" rather than promising erasure.Add administrations dialog
admin_new_fun's field-based dispatch is untouched. Footer button follows the tab; link tabs get copy buttons; the importer tab hands off to the (retitled, slimmed) import dialog.Verification (all local, against this branch)
Known follow-ups
test_delete_study(and the locator rot already tracked in Refresh Selenium browser-test locators for the post-facelift console #648) needs rewriting for the new flow. I keptid_add_participants,id_update_study,id_new_study, the dialog field ids, andid_modal_submit_btnstable so most of those tests survive.ManifestStaticFilesStorageas a separate change.checked_only()inresearcher_UI.jsis no longer called (superseded by the selection sync here); left in place.🤖 Generated with Claude Code