Skip to content

Add custom field orderin with field_dynamic#670

Draft
zimakki wants to merge 4 commits into
woylie:mainfrom
zimakki:add-field-dynamic-ordering
Draft

Add custom field orderin with field_dynamic#670
zimakki wants to merge 4 commits into
woylie:mainfrom
zimakki:add-field-dynamic-ordering

Conversation

@zimakki

@zimakki zimakki commented Jul 22, 2026

Copy link
Copy Markdown

Firstly, thank you for all your efforts and for looking into this.

What this does

This adds support for ordering by custom fields through a new field_dynamic option. It’s a smaller, ordering-only version of the work discussed in #511 and drafted in #662.

I’ve kept the scope fairly narrow: filtering still uses filter, and custom fields remain unsupported for cursor pagination (#623). Named bindings continue to work, and runtime extra_opts are merged with the field’s configured options. If the same key appears in both, the configured value wins.

Docs and regression tests are included as well.

Verification

  • mix format --check-formatted
  • mix credo --strict
  • mix compile --warnings-as-errors
  • mix test --warnings-as-errors — 360 passed
  • mix test.postgres --warnings-as-errors — 197 passed
  • mix dialyzer — 0 errors

I also tested it in the downstream app that prompted this work. It has 27 calculated sortable fields, and both its focused ordering tests and full test suite pass with this branch.

I’m happy to adjust the API shape, naming, or anything else to fit Flop better.

@zimakki
zimakki requested a review from woylie as a code owner July 22, 2026 18:01
@zimakki
zimakki marked this pull request as draft July 22, 2026 18:02
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.

1 participant