Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordering relations ui #951

Open
gabestein opened this issue Feb 10, 2025 · 2 comments
Open

Ordering relations ui #951

gabestein opened this issue Feb 10, 2025 · 2 comments
Assignees
Labels

Comments

@gabestein
Copy link
Member

gabestein commented Feb 10, 2025

Motivation

So users can specify the order of relations they've added to specific fields

So developers can make use of relation orders in front-ends

Requirements

  • Ability to sort relationships on a per-field basis via drag-and-drop handle
  • If no order is specified in relationship creation, default to last

Acceptance Criteria

Mockups (if available)

https://www.figma.com/design/SqOTMElJn7fuPljfQL1gIY/PubPub-Platform?node-id=1711-73388

@3mcd
Copy link
Member

3mcd commented Feb 10, 2025

We may want to consider re-using our strategy (or similar) in legacy for user-defined ordering of elements: https://github.com/pubpub/pubpub/blob/78b6e47e06396f9c1f545f77f1af05405a3a76fa/utils/rank.ts

But perhaps there is a more modern/postgres-native solution that would do the trick

@allisonking
Copy link
Contributor

Adding link to the designs for ordering in the form fill page: https://www.figma.com/design/SqOTMElJn7fuPljfQL1gIY/PubPub-Platform?node-id=1711-73388&m=dev

might make sense to break this into two parts:

  • db/api support for adding an 'order' field to relations
  • ui for reordering relations (should use drag-n-drop lib we use for the form builder)

@gabestein gabestein changed the title Ordering relations Ordering relations ui Feb 10, 2025
@gabestein gabestein moved this from Ready to In Progress in PubPub Legacy & Platform Combined Workstreams Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

4 participants