Display selected tags in tag cloud (#307)

* Add links to remove tags from current query

* Display selected tags in tag cloud

* Add tag cloud tests

* Fix tag cloud in archive

* Add tests for bookmark views

* Expose parse query string

* Improve tag cloud tests

* Cleanup

* Fix rebase issues

* Ignore casing when removing tags from query

Co-authored-by: Jon Hauris <jonp@hauris.org>
This commit is contained in:
Sascha Ißbrücker
2022-08-04 20:31:24 +02:00
committed by GitHub
parent fec966f687
commit dd5e65ecd7
14 changed files with 271 additions and 66 deletions

View File

@@ -47,7 +47,7 @@ def _base_bookmarks_query(user: Optional[User], query_string: str) -> QuerySet:
query_set = query_set.filter(owner=user)
# Split query into search terms and tags
query = _parse_query_string(query_string)
query = parse_query_string(query_string)
# Filter for search terms and tags
for term in query['search_terms']:
@@ -117,7 +117,7 @@ def get_user_tags(user: User):
return Tag.objects.filter(owner=user).all()
def _parse_query_string(query_string):
def parse_query_string(query_string):
# Sanitize query params
if not query_string:
query_string = ''