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

feat: search template gallery #922

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

Eric-Song-Nop
Copy link
Collaborator

@Eric-Song-Nop Eric-Song-Nop commented Dec 2, 2024

Basic search template gallery by name.

Will update with fuzzy finder, and search by description later.

Might also be nice to have search and insert universe for packages also.

@Myriad-Dreamin
Copy link
Owner

I reimplemented it by using minisearch and indexing fields: ["name", "description", "authors", "keywords", "categories"]. The next missing feature is highlighting search terms in page. For example, when the input is "stu", the "students" word is highlighted in the description "All-in-one template for students and theses".

image

@Eric-Song-Nop Eric-Song-Nop changed the title feat: search gallery by name feat: search template gallery Dec 2, 2024
@Eric-Song-Nop
Copy link
Collaborator Author

I have accomplished the highlight in desc and title, with a yellow bg. While, it seems that matches in keywords/authors are hard to highlight(maybe not needed for now

@Myriad-Dreamin
Copy link
Owner

Wow, you made it like a flash.

I have accomplished the highlight in desc and title, with a yellow bg.

The yellow bg looks not 100% fit the dark themes, but should be already pretty nice.

While, it seems that matches in keywords/authors are hard to highlight(maybe not needed for now

We might highlight the whole boxes for them. For example, with entering "pres" page will show the "presentation" keyword box with a different foreground and background color at the same time.

image

@Myriad-Dreamin Myriad-Dreamin merged commit 672a95c into Myriad-Dreamin:main Dec 3, 2024
14 checks passed
@Eric-Song-Nop Eric-Song-Nop deleted the search_template branch December 3, 2024 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants