Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Advanced Search boolean types get deselected or cannot get reselected. #474

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

erinesullivan
Copy link
Contributor

@erinesullivan erinesullivan commented Aug 15, 2024

Overview

When adding multiple query options to search, when you start typing, the boolean type (AND, OR, NOT) disappears. You then cannot select AND. Two problems were discovered in the reducer:

  1. state[dsUid].fieldedSearches[index].booleanTypes does not exist, making booleanType return undefined.
  2. The booleanType ? ... ternary operator returns false when set to AND because the value of AND is 0, which is also equivalent to false. It now specifically checks if it is a number and is less than the number of available boolean types to prevent the use of a magic number that does not exist as a type.

Anything else?

Focusing on a radio button turned the button into a square. That is because of the :focus pseudo-class defining border-radius: 2px. Adding border-radius: 50%!important to the radio button resolves this style bug.

Testing

  • Make sure the PR is consistent in these browsers:
    • Chrome
    • Firefox
    • Safari
    • Edge
  • Run accessibility tests:
    • WAVE
    • ARC Toolkit
    • axe DevTools
  • Go to Advanced Search, and type in multiple queries.
    • Can you select all redio buttons? Even with keyboard?
    • Do any of the radio selections disappear when you start typing?
    • Does search successfully run the full query?

@erinesullivan erinesullivan self-assigned this Aug 15, 2024
@erinesullivan erinesullivan merged commit 3913c41 into master Aug 15, 2024
6 checks passed
@erinesullivan erinesullivan deleted the bug-advanced-search-boolean-types-selection branch August 15, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant