Skip to content

Feat/proposal sorting controls#271

Merged
Mosas2000 merged 27 commits into
mainfrom
feat/proposal-sorting-controls
Apr 23, 2026
Merged

Feat/proposal sorting controls#271
Mosas2000 merged 27 commits into
mainfrom
feat/proposal-sorting-controls

Conversation

@Mosas2000

Copy link
Copy Markdown
Owner

Highlighted Features:
ending-soon Sorting: Prioritizes older active proposals (proxying for implicitly approaching deadlines) and naturally pushes executed proposals to the end of the list.
Robust Dropdown: SortDropdown.tsx now supports arrow-key navigation, ARIA listbox attributes, aria-activedescendant focus management, and aria-live descriptive updates for screen readers.
Comprehensive Tests: Tests in both proposal-params.test.ts and proposal-utils.test.ts are 100% green, validating serialization, filter counting, sorting logic, and edge cases. All 71 assertions pass.

Closes #257

Active proposals are sorted by ascending createdAt so the oldest
open proposals (closest to their implicit deadline) appear first.
Executed proposals are pushed to the end of the list.
Remove the locally duplicated type and use the canonical definition
from proposal-params to keep sort options in sync.
- Import SortOption from proposal-params instead of local type
- Move SORT_OPTIONS and SORT_DESCRIPTIONS to module-level constants
- Add ending-soon as a selectable sort option
- Show description for each option inside the dropdown menu
- Show active sort description beneath the trigger when not default
- Add Escape key listener to close and restore focus to trigger
- Add aria-haspopup, aria-expanded, role=listbox for screen readers
- Use useCallback to keep close reference stable across effects
@Mosas2000
Mosas2000 merged commit 86d4aec into main Apr 23, 2026
6 of 19 checks passed
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.

Feature: Add proposal sorting controls

1 participant