Add trash/restore for deleted studies + studies page polish#111
Open
hendriebeats wants to merge 11 commits into
Open
Add trash/restore for deleted studies + studies page polish#111hendriebeats wants to merge 11 commits into
hendriebeats wants to merge 11 commits into
Conversation
Contributor
Author
|
@boxyoman this is another decent one you may like. |
204bebc to
2ab7ed9
Compare
…me in redirect - Replace pencil edit img with a <button> in Editor.tsx for keyboard accessibility - Replace remove div with a <button> in StudyBlockEditor.ts for keyboard accessibility - Add button reset styles in editor.css and study.css for the new buttons - Fix typo "grad" -> "drag" in study.html - URL-encode doc.name in Study.hs deleteStudy redirect to handle special characters Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Relude already re-exports decodeUtf8 and encodeUtf8, causing an ambiguous import warning treated as an error by GHC. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tore-and-better-styles
- Fix bug: resendInvite fetched share data before extending expiry, so the re-rendered badge could still show "Expired" or "Rejected" - Fix bug: ownershipMemberDoc hardcoded isOwner=True, exposing owner controls (role dropdown, remove button) to non-owner members - Remove dead code: getInvite handler and its /group_study/invite/:groupId route (replaced by inline invite form in the group study modal) - Remove leftover debug logDebugSH/logInfoSH calls - Consolidate duplicate unsafeAsObject/emptyStudy into Entity.Document - Convert <img onclick> close icons and bare <a onclick> to proper <button> elements with aria-labels - Add aria-labels to all color swatches, parallel view button, question popup close, and study block remove buttons - Add contenteditable="false" to verse ref, question mark, placeholder, and other-cursor ProseMirror widget elements - Fix duplicate underlineClick function definition in study.html - Fix duplicate class attributes on Accept/Reject invite buttons
…s on mousedown - Validate redirect targets in login flow to reject absolute/protocol-relative URLs (safeRedirect) - Apply same redirect validation in the already-logged-in path in Server.hs - Move emptyStudy definition to Entity.Document and remove duplicate in GroupStudy.hs - Fix CSS selector typo: a&hover → &:hover on study card hover state - Add mousedown preventDefault on editor NodeView buttons and decorations to prevent ProseMirror losing focus on click - Remove unused Entity.User import from Study.hs
Remove editor fixes, accessibility rewrites, open-redirect fix, and auth bug fixes that were accidentally bundled in by a wide-scope agent run. Restore those files to master. Keep only the trash tab, restore endpoint, and undo banner functionality in Study.hs, Entity/Document.hs, and Server.hs.
- Add hx-target="#groupStudy" to the create group study form so the response replaces the dialog content instead of nesting inside the form - Remove unused getInvite handler and getInviteNewMemberHTML (dead code since the inline invite form replaced the separate invite page) - Remove the /group_study/invite/:groupId GET route from Server.hs - Add contenteditable="false" to non-editable ProseMirror node view elements (verse ref widget, studyBlocks edit icon, Bible text header, questions placeholder, add-answer button) to prevent cursor placement inside them - Add mousedown preventDefault to studyBlocks edit icon and add-answer button to prevent editor focus loss on click - Add mouseup to verseRefWidget stopEvent to prevent browser selection from overriding the cursor position set by the mousedown handler - Auto-switch to Trash tab on studies page when landing with ?deleted= params - Fix closeModalIcon CSS for button-wrapping-img pattern in newstudy.css and groupstudy.css
Reverts frontend editor, sidebar, and study block editor changes back to master. Also reverts unrelated GroupStudy, nav, study, groupstudy, and newstudy style changes. Restores the removed group_study invite route in Server.hs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New users landing on the studies page with no studies saw a blank table with column headers and nothing else — not a great first impression. Replace that with a centered, friendly call-to-action card that encourages them to create their first study. - Book emoji, welcoming headline, and short encouraging copy - Prominent "Start Your First Study" button that opens the new-study modal - Soft hint about solo vs. group study options - Light blue card background to make the section feel warm and distinct
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.
Adds a Trash tab to the studies page where deleted studies can be viewed and restored. After deleting a study, the user is redirected to the studies page with an undo banner that lets them restore immediately. Also polishes the studies page with an empty state, scroll layout fix, and several small bug fixes.
Q&A for Code Reviewers
Restore flow
?deleted=<id>&name=<encoded-name>so the studies page can show an undo banner without a round-trip — name is URL-encoded before being placed in the query string.restoreStudyre-fetchesgetDeletedDocsto verify ownership before restoring; no separate auth table needed since deleted docs already carry the editor relationship.Trash tab auto-open
deletedDocIdis in the query string, so the undo banner and the restored item are both visible in context.Scroll layout
overflow: hiddenon body + a flex scroll container (#studiesScroll) moves the scrollbar ownership to the inner div, keeping the nav fixed and the footer pinned to the bottom of the content.Bug fixes (incidental)
a&hoverwas malformed nested CSS; corrected to&:hover.class=attributes (HTML only honours the last one); merged into single class strings.<img>to<button><img></button>for keyboard accessibility.