feat: Add server-side column sorting to the workflows table. - #3717
Open
tristal wants to merge 1 commit into
Open
feat: Add server-side column sorting to the workflows table.#3717tristal wants to merge 1 commit into
tristal wants to merge 1 commit into
Conversation
|
@tristal is attempting to deploy a commit to the Temporal Team on Vercel. A member of the Team first needs to authorize it. |
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.
Description & motivation 💭
Workflows always come back in the server's default order (
CloseTime DESC NULLS FIRST, StartTime DESC). Filtering is the only way to narrow them down.Click a column header to sort: desc > asc > off. This goes to the server as an
ORDER BYclause onListWorkflowExecutions, so it sorts the whole result set and not just the visible page.?sort=StartTime&sort-order=desc), so it's shareable. Changing it resets pagination.TextandKeywordListare excluded since the server can't sort them. Custom attribute columns work, Parent Namespace and friends don't.order byis appended to the list query only, never the count query (which appends its ownGROUP BY), so the header counts stay correct.Off by default behind
workflowSortingEnabled/TEMPORAL_WORKFLOW_SORTING_ENABLED, because server support is thin:ORDER BYvisibilityDisableOrderByClausedefaults totruefalseGate is
workflowSortingEnabled && !isCloud && visibilityStore == elasticsearch. That last part also fixessupportsAdvancedVisibilityWithOrderBy, which OR'd inisCloud— backwards, Cloud doesn't support it.Screenshots (if applicable) 📸
Design Considerations 🎨
Chevrons stay hidden until you hover or focus a sortable header; the active one stays lit. Headers carry
aria-sortand the control is a real button.Testing 🧪
How was this tested 👻