Tweaks to search UX (#92)

This commit is contained in:
Avi Flax 2022-12-03 21:47:09 -05:00 committed by GitHub
parent 98840e475d
commit 7a7907a6df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -13,7 +13,8 @@ class Search(FormView):
class form_class(forms.Form):
query = forms.CharField(
help_text="Search for a user by @username@domain or hashtag by #tagname"
help_text="Search for a user by @username@domain or hashtag by #tagname",
widget=forms.TextInput(attrs={"type": "search", "autofocus": "autofocus"}),
)
def search_identities(self, query: str):

View File

@ -26,4 +26,10 @@
{% endfor %}
</section>
{% endif %}
{% if not results.identities and not results.hashtags %}
<h2>No results (yet)</h2>
<p>No results found — not yet, at least. The search swamphens are still
rooting around behind the scenes and may yet turn something up. If you try your search
again after a moment, you might get lucky!</p>
{% endif %}
{% endblock %}