Skip to content

Add state to filter categories, if present#291

Open
dektar wants to merge 1 commit intomasterfrom
stateFilter
Open

Add state to filter categories, if present#291
dektar wants to merge 1 commit intomasterfrom
stateFilter

Conversation

@dektar
Copy link
Collaborator

@dektar dektar commented Feb 16, 2026

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization

Description

If state-level issues are present, adds the state to the list of items to filter by. Moves state name getting logic from IssuesAdapter to Issue.java so it can be reused; adds unit tests.

Also refactors common lines into helper in IssuesAdapterTest.

Were the changes tested?

  • Yes, automated tests in issuetest and issuesadaptertest
  • Yes, manually tested: pixel 9 emulator, with location with and without state issues
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

@dektar dektar requested a review from scottpeterson February 16, 2026 14:59
// Add state items filter.
String state = issue.getStateName();
if (!TextUtils.isEmpty(state) && !topics.contains(state)) {
topics.add(state);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we good co-mingling states and categories in the same alphabetically sorted filters list?

e.g. "Texas, ICE, Maryland, Healthcare" could appear.

I dunno what the better UX would be....don't want to have separate filters. Could have "state: " and "category: " prefixes on each filter item?

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.

2 participants

Comments