Skip to content

Feat/filter list display#686

Open
kevinmdd wants to merge 6 commits into
masterfrom
feat/filter-list-display
Open

Feat/filter list display#686
kevinmdd wants to merge 6 commits into
masterfrom
feat/filter-list-display

Conversation

@kevinmdd

Copy link
Copy Markdown

Fixes #671

Summary: Replaced dropdown/button displays for enum filters with a new Filter List display mode that shows options as a compact vertical list, showing the first 4 with an "Expand All" toggle when there are 5 or more.

  • User experience
    • Enum filters (Language Authority, Modality, Languoid Type, Territory Type, ISO Language Status) now show as a vertical plain-text list instead of a dropdown or button group
    • Options are visible at a glance without needing to open a dropdown
    • Increased font bold size and spacing between labels for better visibility
    • "Expand All" / "Collapse" button appears when there are more than 4 options
  • Logical changes
    • Added FilterList to the SelectorDisplay enum
    • Selector now slices visible options to the first 4 when in FilterList mode and not expanded
    • FilterListMoreButton component added to Selector for the expand/collapse toggle
    • SelectorContainer renders as flex-column with full width for FilterList
    • useClickOutside guarded to not collapse FilterList state on outside click
  • Data
    • No data changes
  • Refactors
    • LanguageModalitySelector, LanguageScopeSelector, TerritoryScopeSelector, VitalitySelector updated to accept and forward a display prop
    • VitalitySelector.test updated to include FilterList in the SelectorDisplay mock and added "Expand All" click before checking all options are visible
    • Continued Refactors for: selectorbuttons, filterlist, and selectoroptions in controls.css

Out of scope/Future work: The dual meaning of expanded state (dropdown open vs filter list expanded) could be split into two separate state variables for clarity.

Test Plan and Screenshots

How to test the changes in this PR: Run npm run dev, open the Filter panel, then verify enum filters show as vertical lists and "Expand All" works.

Before After
before after

Checklist

Feel free to check off or just delete items in this section as you have completed them.

Summary

  • Clear description of what and why
  • Scope kept focused; note follow-ups if any
  • Set yourself as assignee
  • Mention the issue (usually by writing "Fixes #ISSUE_NUMBER" or "Closes #ISSUE_NUMBER")

Testing

  • npm run lint
  • npm run build
  • npm run test
  • Tests added or updated for changed logic
  • npm run dev -- tried out the website directly
  • Include screenshots as noted below
  • Write comments on manual testing

Changes

Visual changes

  • Add screenshots to the table template at the top of this file. You can include images inside the table
  • Drag and drop images in the GitHub PR comment box to upload screenshots
  • Since more views can be reproduced by just sharing the URL -- add links (eg. link) to the relevant page and/or conditions to reproduce the view.

Data changes

  • TSV, SVG, etc. edits in public/data/
  • Corresponding readmes updated in public/data/
  • Load/connect/compute updates in src/features/data/ including how we aggregate data or compute derived values

Internal changes

  • Logical changes
  • Refactors, moving files around
  • If you notice any changes that require explanations, make sure to include the explanations in the code as well.

Docs

  • Code is self-documenting, or if not, comments are added where needed.
  • Updated markdown readme files documenting how the code behaves or how to develop in case there are any relevant changes to make.

@kevinmdd kevinmdd requested a review from a team as a code owner June 25, 2026 03:44
@kevinmdd kevinmdd self-assigned this Jun 25, 2026
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Cloudflare Pages preview

kevinmdd added 2 commits June 24, 2026 20:45
…tion-Commons/lang-nav into feat/filter-list-display

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
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.

Filters: Show the nicely formatted buttons for the enum suggestions

1 participant