-
Notifications
You must be signed in to change notification settings - Fork 43
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
Circulars: Lucene Shortcuts and Archive Page Documentation #2589
base: main
Are you sure you want to change the base?
Conversation
this contains a basic accordion menu, following a similar implementation by @Courey in a seperate branch. Additional commits will add documentation, as well as a series of modals to automatically populate the search bar with common lucene search syntax
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2589 +/- ##
========================================
- Coverage 6.10% 6.07% -0.04%
========================================
Files 164 165 +1
Lines 4061 4082 +21
Branches 442 450 +8
========================================
Hits 248 248
- Misses 3811 3832 +21
Partials 2 2 ☔ View full report in Codecov by Sentry. |
to be added: quick action buttons
also submitted as a separate PR to ensure prompt correction
@@ -227,6 +228,7 @@ export default function () { | |||
name="query" | |||
type="search" | |||
defaultValue={inputQuery} | |||
value={inputQuery} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember where I read this, but I think it's considered a common mistake to have an input that, on change, updates a state variable, and whose value comes from a state variable. @dakota002, @Courey, have you heard that? Or am I misremembering?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure on that, I think it might be dependent on where in the general hierarchy of components those state values are used. Like if they need to affect a value in a child/parent component. And if they are basic inputs vs more complex components. But I think generally speaking your idea sounds correct
I think there was something going on here where, when the page reloads due to a form submission, the value was not updating correctly, like the defaultValue
would still show the previous value, even though the query string would update. @tylerbarna is this correct or am I thinking of another thing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dakota002 without setting value
the search bar won't update to reflect the current query string inside the search bar until the page is reloaded, so there's not visual feedback that one of the quick action buttons have been pressed until you reload the page; we don't want the page to reload every time a quick action button is pressed since the contents of the quick action button is likely not the exact term users are looking to search for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that this has been holding things up. I am still not sure if this is the right way to programmatically modify the search field. To unblock this, let's just not automatically fill in the search field right now.
Description
This adds a brief explanation of Lucene queries to the Circulars Archive page as well as shortcut buttons to populate the search bar with common Lucene search syntax
Related Issue(s)
Tracked by #2288
Testing