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

[STAN-557] Search and Filter fixes #145

Merged
merged 7 commits into from
May 17, 2022
Merged

[STAN-557] Search and Filter fixes #145

merged 7 commits into from
May 17, 2022

Conversation

roc
Copy link
Collaborator

@roc roc commented May 17, 2022

  • Removing the router 'navigate' option from search broke search from the homepage
  • this adds it back in and also fixes an in issue in which passing a blank search from the homepage would cause a search for the string 'undefined' (now it searches for "", bringing back all results)

Filter updates

  • filter headings removed unless you have several selected and then select a Type (we write "in" for that)

Screenshot 2022-05-17 at 17 14 29

* expander icons aligned with headings

Screenshot 2022-05-17 at 17 37 29

* When clicking "mandated" alone we no longer get two lines across the filter summary section

before

Screenshot 2022-05-17 at 17 49 55

after

Screenshot 2022-05-17 at 17 49 47

@roc roc added the bug Something isn't working label May 17, 2022
@roc roc requested a review from lennym May 17, 2022 14:10
@roc roc self-assigned this May 17, 2022
@lennym
Copy link
Collaborator

lennym commented May 17, 2022

Maybe an integration test?

@roc
Copy link
Collaborator Author

roc commented May 17, 2022

Maybe an integration test?

Ugh that is so incredibly reasonable!

@lennym
Copy link
Collaborator

lennym commented May 17, 2022

The same bug also affects searching from the header bar on other pages too, so you may wish to also cover that.

@roc
Copy link
Collaborator Author

roc commented May 17, 2022

The same bug also affects searching from the header bar on other pages too, so you may wish to also cover that.

sigh

yes

.summary {
border: 10px solid yellow;
&:before {
border: 10px solid lime !important;
Copy link
Collaborator

Choose a reason for hiding this comment

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

ORLY?!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

😮‍💨

@roc roc changed the title allow searching from homepage, even with blank search [STAN-557] Search and Filter fixes May 17, 2022
// TODO: better sorting needed
const activeFilters = standard_category
? { ...chosenFilters, standard_category }
: chosenFilters;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rather than forcing the ordering so that category is at the end (but leaving care setting and topic potentially misordered), it feels probably better to just iterate over a fixed set of keys like we do (indirectly) here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree, leaving a TODO in my branch to pick this up after merge->deploy->demo etc

@roc roc merged commit fb050c6 into master May 17, 2022
@roc roc deleted the STAN-557-filter-and-search branch May 17, 2022 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants