FirefoxCSS-Store.github.io icon indicating copy to clipboard operation
FirefoxCSS-Store.github.io copied to clipboard

Make Themes easier to find / Search / Limited Display

Open unseen-ninja opened this issue 4 years ago • 12 comments

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 avatar Sep 29 '21 12:09 unseen-ninja

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 avatar Sep 29 '21 20:09 unseen-ninja

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

unseen-ninja avatar Sep 30 '21 19:09 unseen-ninja

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!

BeyondMagic avatar Nov 13 '21 06:11 BeyondMagic

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. :/

unseen-ninja avatar Nov 14 '21 02:11 unseen-ninja

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

BeyondMagic avatar Nov 14 '21 02:11 BeyondMagic

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

BeyondMagic avatar Nov 14 '21 17:11 BeyondMagic

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

BeyondMagic avatar Nov 14 '21 20:11 BeyondMagic

https://user-images.githubusercontent.com/51831435/141697494-1c9d0ce1-5362-4827-b75a-2fe0e5baae3d.mp4

BeyondMagic avatar Nov 14 '21 20:11 BeyondMagic

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:

unseen-ninja avatar Nov 15 '21 02:11 unseen-ninja

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?

BeyondMagic avatar Nov 15 '21 02:11 BeyondMagic

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:

unseen-ninja avatar Nov 17 '21 04:11 unseen-ninja

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

BeyondMagic avatar Nov 17 '21 22:11 BeyondMagic