Skip to content

Conversation

@Isoscelestial
Copy link
Contributor

Overview

  • Adds displayOrder column to contacts and officers tables
    • Integer, can be null
  • Modified contacts and officers club edit procedures to handle display orders
    • Adds order field to editContactSchema and editCollaboratorSchema input schemas
  • Modified various procedures that return contacts and officers to order by display order
    • I think this would also be done client-side, but I don't see any reason it wouldn't hurt to sort server-side as well
  • Updated Contacts and Listed Officers forms to be sortable using drag handles
    • Uses dnd kit package
    • Mobile friendly (tested on responsive design mode and iOS)
    • Keyboard accessible: tab into the grab handle, select it, and use arrow keys to reorder

Notes

The displayOrder column is only set whenever the user creates a new item or reorders the items. The check for reordering items is forgiving, as it becomes positive whenever the user has moved an item using the grab handle. There is a rudimentary client-side check for if the items are ordered identically to the start, but this will not catch every case due to the complexity involved.

When this PR is merged, existing contacts and officers will have a null displayOrder, which means their contacts and officers will be unordered by default. To fix this, each club will need to trigger the order flag by reordering their contacts or officers, saving, then undoing their changes.

Database people, please review this and see if there are better ways to do the things I did.

Preview

Desktop

desktop.mp4

Mobile

mobile.mp4

@vercel
Copy link

vercel bot commented Dec 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
clubs Ready Ready Preview, Comment Jan 5, 2026 10:13pm

Copy link
Member

@TyHil TyHil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! I can't say I completely understand all of it so a review from @BK2004 or @nl32 would be good too. Some more comments may help as well since this will be an unfamiliar library for anyone maintaining it in the future.

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.

Listed officer and contact ordering

3 participants