Conversation
- Update search boxes to use site search
- Remvoe results count from askcfpb see-all pages
-Add translation
There was a problem hiding this comment.
@mistergone I added a few comments about possibilities for simplifying some of the Ask search templating now that it's being migrated to site search.
I'm also wondering if we could remove the answer-search-results.html template and the Ask autocomplete functionality? I don't think we need to load the autocomplete.js file anymore, and there's related django autocomplete code in several places in the Ask app.
| </section> | ||
|
|
||
| {% for block in page.content %} | ||
| {% if block.block_type != 'notification' %} |
There was a problem hiding this comment.
I don't remember -- is it possible to add a notification block to this page's content section in the admin?
| {% endfor %} | ||
| </div> | ||
|
|
||
| <div class="m-notification |
There was a problem hiding this comment.
I wonder if we could add a new type (help?) to the notification molecule template so that could be used to output the notification content here:
{{- notification.render(
'help',
true,
_('Can\'t find what you\'re looking for?'),
'',
[{
'text': _('Search all of consumerfinance.gov'),
'url': _('/search/')
}]
) -}}
(And/or pull this notification out into a template so it can be reused on the see-all page?)
| is_subsection=True, | ||
| max_length=75 | ||
| ) %} | ||
|
|
There was a problem hiding this comment.
I wonder if this still needs to be a separate macro with various options if the search input is only being used on the answer page. Could we pull in the search bar from the searchgov page instead in the answer-page.html template, and just include the h3 header from here?
|
I'm currently working on a web component search input that supports an autocomplete (for the Ask use case). This might be handy to have in general, but sounds like autocomplete might completely go away? |
I wasn't involved in that decision, so it's probably a question for @ajbush or @schaferjh ? |
|
@mistergone I think the typeahead you're removing here is the Ask-specific typeahead since this search box will now be site-wide search and should not return typeahead results for Ask questions only in the way it used to. I don't think we've made a decision about general auto-complete functionality. |
This PR changes Ask CFPB's search functions to using sitewide search. It also alters some styles, removes some old functions of Ask's Search, and adds Spanish translations where necessary.
Additions
Removals
How to test this PR
Note: This PR can be difficult to fully test if you don't have access to Search.gov API key, so please reach out if I can help you test it.