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

Make Themes easier to find / Search / Limited Display #119

Open
unseen-ninja opened this issue Sep 29, 2021 · 12 comments
Open

Make Themes easier to find / Search / Limited Display #119

unseen-ninja opened this issue Sep 29, 2021 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@unseen-ninja
Copy link
Collaborator

unseen-ninja commented Sep 29, 2021

With more and more themes being added to the list things get a little cluttered.

I've been thinking about maybe trying to implement a search system. Since the themes are stored in a json object it shouldn't be too hard to add a .filter function to limit the results. This would require to add a new field fo keywords, and some tagging of the already listed themes.
I do think that it's worth the effort tho because it makes it a easier for the user to find what they're looking for.

With this feature in place it could also be beneficial to limit the amount of results that are displayed upon the first page visit to the recently added X amount of themes instead of listing everything by default as this reducdes page loading time by a lot.

Edit: Instead of taking the latest themes to display on the front page we could also (finally) do a random sort as suggested in #30 .. :D

I'd be willing to tinker around with this and implement the features but that's something I can't just decide on my own. So feel free to tell me your thoughts and ideas. ^—^

@unseen-ninja unseen-ninja added the enhancement New feature or request label Sep 29, 2021
@unseen-ninja unseen-ninja self-assigned this Sep 29, 2021
@unseen-ninja
Copy link
Collaborator Author

unseen-ninja commented Sep 29, 2021

I've thrown together a little Proof of Concept.

This isn't perfect, but it is a good example of what i mean. The URL has a little GET-parameter ?search=#SEARCHTERM# added and it the script will filter the results by that. In this PoC I've just filtered through the title so with ?search=theme you'll get every entry listed that has [theme/Theme] in its title. Feel free to change it to something else like CSS (or cascade :b)

@unseen-ninja
Copy link
Collaborator Author

unseen-ninja commented Sep 30, 2021

Update: I've made the search work a little smoother. It reads both the theme title, as well as the newly added "tags" field in themes.json. For simplicity I've decided to just go with a string that is supposed to be formatted like "tags": "lorem, ipsum, dolor, sit, happens".

I've also implemented a randomly generated order to display themes on a standard visit (without a search query). Currently it lists all themes, but it's bound to a variable that I'd suggest to change to something like 20 once most/all themes are tagged.

Oh, and everything is pushed to the feature-search branch as well. c:

Demo

@BeyondMagic
Copy link
Collaborator

BeyondMagic commented Nov 13, 2021

I can't access any of the links, but I'm willing to help with anything you thought there! EDIT: Looking at the branch it actually works just fine, cool that you were able to do it with JSON, it's definitely not the easiest data type to work with search engines.

Instead of taking the latest themes to display on the front page we could also (finally) do a random sort as suggested in #30 ...

And sorry for that!

@unseen-ninja
Copy link
Collaborator Author

Yeah, the demo is offline by now. But good to know that there is a general issue with displaying the correct 404 document. I'll need to fix that. :'D

The feature itself works pretty well. With theme titles included for the search terms I guess it could be released, but I still think it would be better to pre-tag all the listed themes broadly. But right now I really can't be arsed to work on that as I have other stuff on my todo list. :/

@BeyondMagic
Copy link
Collaborator

I can do it tomorrow, if you're up then, give it a look.

@BeyondMagic BeyondMagic self-assigned this Nov 14, 2021
@BeyondMagic
Copy link
Collaborator

BeyondMagic commented Nov 14, 2021

@andreasgrafen Instead of reloading the page, could we just remove the cards of the page?

@BeyondMagic
Copy link
Collaborator

TODO: There's still many themes without any tags at all.

@BeyondMagic
Copy link
Collaborator

current_preview.mp4

@unseen-ninja
Copy link
Collaborator Author

Nice music! :b

Yeah. The most annoying part is tagging stuff for real. I see you have also merged your sorting changes with the search feature. If you could push at least your local themes.json from time to time we could work on this in parallel? c:

@BeyondMagic
Copy link
Collaborator

Nice music! :b

Unintentional!!!

If you could push at least your local themes.json from time to time we could work on this in parallel? c:

You mean, we both adding the tags? Yeah, maybe it is better we both set a mark of how many themes we will work with. If half/half is good for you, there is 48 themes left to add tags, I do 24, you do 24. What do you think?

@unseen-ninja
Copy link
Collaborator Author

Yeah, I figured. :D
And I'm totally not late on answering this.. but yeah, that's what I thought. It would be just half the work for both of us then. c:

@BeyondMagic
Copy link
Collaborator

Alright I'll do the last 24 Monday (got some things to do).

BeyondMagic added a commit that referenced this issue Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants