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

Improve search results page #557

Merged
merged 6 commits into from
Jul 29, 2024
Merged

Improve search results page #557

merged 6 commits into from
Jul 29, 2024

Conversation

dasGoogle
Copy link
Contributor

This is a PR to track some improvements to the search page. This includes proper sorting, a better content preview and maybe additional filters.

@dasGoogle
Copy link
Contributor Author

This whole PR is quite based on gut feeling of what could improve the search experience. I think that it does indeed improve quite a lot, but I am very much open to feature requests and ideas.

This is the current state:
image

@dasGoogle
Copy link
Contributor Author

Ping @jeriox @lukasrad02 for your suggestions

@jeriox
Copy link
Contributor

jeriox commented Jun 11, 2024

I think you dropped the date (#492), or is your example not a protocol? I think we should definetly include that.

Could you also provide a screenshot with multiple results? With the current layout I suspect that it could be hard to visually distinguish between different results as they are not as uniform as before

@dasGoogle
Copy link
Contributor Author

image

Indeed, the screenshot was from a page with minutes content, the date remains in there for minutes

@jeriox
Copy link
Contributor

jeriox commented Jul 29, 2024

I like it

@jeriox
Copy link
Contributor

jeriox commented Jul 29, 2024

another suggestion from #345: restrict search to specific areas of the page (pages/minutes/even specific minutes lists or respective groups?) -> can also be a separate issue if you don't want to implement it in this PR

@dasGoogle dasGoogle marked this pull request as ready for review July 29, 2024 17:37
@dasGoogle dasGoogle merged commit 5f956ec into main Jul 29, 2024
8 checks passed
@dasGoogle dasGoogle deleted the search-improvements branch July 29, 2024 17:41

@register.filter(name="highlight_query_markdown")
# select 3 lines around first match and highlight query match
def highlight_query(content, search_query, surrounding_lines=1):
Copy link
Contributor

Choose a reason for hiding this comment

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

This function seems quite complex, maybe it could be tested?

@jeriox jeriox mentioned this pull request Oct 22, 2024
frcroth pushed a commit to frcroth/myHPI that referenced this pull request Oct 24, 2024
* Order search results by date

* add a better preview for results

* Highlight matches in title as well

* Limit maximum number of lines if query is not in markdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants