Rework invite flow with callout cards and modal flow#109
Open
hendriebeats wants to merge 6 commits into
Open
Conversation
Contributor
Author
|
@boxyoman I think you'll like this one. It's better than the last designs I showed you and solves the problem of people not knowing they can link a document or create a new one intuitively. |
- Replace flat invite table with blue callout cards showing owner name and study details - Add multi-step modal: document selection (existing vs new) with reject option - Add layered confirmation dialog for rejecting invites - Modernize p-select component: white bg, border styling, fixed-position dropdown with smart viewport-aware positioning - Add ownerName and created fields to GetMyShareData with owner join - Sort invites by created date ascending - Add lighter hover shade (--blue-35) for lightBlue buttons Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
586daf0 to
df0f75a
Compare
- Replace clickable <img> close icons with <button> elements (keyboard accessible) - Add type="button" to remove buttons inside forms to prevent accidental submit - Add ariaLabel_ helper to Lucid.Htmx and apply aria-label to close/remove buttons - Add keyboard support (Enter/Space) and ARIA roles to p-select custom element - Fix partial head on gdoc.editors — wrap with for_/listToMaybe to avoid crash on empty list - Replace length == 0 check with Prelude.null - Fix StopListenToDoc sending new docId instead of currentDocId when switching docs - Remove debug logInfoSH/logInfo calls left in ownershipMemberDoc - Fix CSS typo a&hover → &:hover on study row hover rule - Update .closeModalIcon CSS rules for button wrapper in groupstudy/newstudy/studies CSS
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.
Replaces the flat invite table on the studies page with callout cards and a multi-step modal flow (review → accept/reject → select or create document). Also pulls the owner's name into the invite query so it can be shown to invitees.
Reviewer notes
Invite flow — new modal steps
reviewShareModal/confirmRejectModal/selectDocumentModalare three new HTMX endpoints that render successive steps inside a single<dialog>element; each step swaps the dialog's innerHTML rather than navigating.selectDocumentModalfilters to "ungrouped" documents (those not already in a group study) because linking a document to two studies simultaneously would be incoherent.Owner name on invite cards
GetMyShareDatanow includesownerName(shown on the invite card: "Alice has invited you to join…"). The join is aleftJoin_'ongroupStudyOwner → user; it's nullable because a study might theoretically have no owner row yet.getSharesForUsernow deduplicates by token after mapping. The query already filtered byshare.email = user.emailso the set is small.createdascending so the oldest invite appears first.p-select"modern" variantvariant="modern"style to the custom<p-select>element for use inside the accept-invite modal, where the default inline style doesn't fit. It positions the dropdown withposition: fixedso it escapes anyoverflow: hiddenancestors in the modal.Safety fixes (tidy pass)
head gdoc.editors→for_ (listToMaybe gdoc.editors):headis partial and would crash if a doc had no editors; silently skipping is correct behavior here.StopListenToDocwas sendingdocId(the new doc) instead ofcurrentDocId(the doc being left), which would have caused the server to stop the wrong subscription on doc switch.<img>close icons replaced with<button type="button">wrappers; the "Remove" button in the invite form giventype="button"to prevent accidental form submission.logInfoSH/logInfodebug calls removed fromownershipMemberDoc.a&hover→&:hoveron study row hover rule.Closes #101