Skip to content

feat(view): show and toggle the sort direction in View options - #11086

Open
MichaelUray wants to merge 1 commit into
hcengineering:developfrom
MichaelUray:feat/sort-direction-indicator
Open

MichaelUray wants to merge 1 commit into
hcengineering:developfrom
MichaelUray:feat/sort-direction-indicator

Conversation

@MichaelUray

Copy link
Copy Markdown
Contributor

Fixes #7346

Problem

Since #9926 the sort direction can be reversed by picking the already-selected "Ordering" entry again, but nothing shows the current direction, so the feature is neither visible nor discoverable.

Changes

  • View options: a small icon button next to the Ordering dropdown shows the current direction (same up/down icon as table column headers) with an "Ascending"/"Descending" tooltip and toggles it. It uses the same persistence path as before; re-selecting the active entry still toggles too.
  • Manual (rank) ordering has no direction: the button is hidden there (space kept so the dropdown does not move), and re-selecting "Manual" no longer stores a reversed rank order.
  • The button is only offered when the editor receives a single order option.
  • Selection logic moved into orderDirection.ts; new strings Ascending/Descending in all view-assets locales.

Tests

orderDirection.test.ts (6 cases). Manual: Tracker → Issues → View options → click the direction button → order reverses and persists after reload; "Manual" ordering hides the button.

Since hcengineering#9926 the sort direction could only be reversed by choosing the
already selected Ordering entry again, with nothing showing the current
direction, so users could neither see nor discover it.

Add a small direction button next to the Ordering dropdown in the View
options popup. It reuses the table header sort icon, shows an
Ascending/Descending tooltip and reverses the order when clicked. Choosing
the active entry again still reverses the order. Manual (rank) ordering
follows the drag-and-drop order, so the button is hidden for it and
choosing Manual again no longer stores a reversed manual order. The
selection logic moved into a small helper with unit tests and no longer
mutates the configured default order option.

Fixes hcengineering#7346

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

Add reverse order in sorting UI

1 participant