Three.js: Examples: add tags support to search

Created on 21 Feb 2020  路  25Comments  路  Source: mrdoob/three.js

e.g. rename webgl_postprocessing_unreal_bloom_selective.html to webgl_postprocessing_glow_unreal_bloom_selective.html, and the other one too.

because people typing "glow" in examples search box get nothing.

Examples Suggestion

Most helpful comment

That was what happened, yes.

All 25 comments

This suggestion does make sense. It's just a bit unfortunate how long the file names are now.

Do we really need the bit unreal in these names? Exchanging unreal with glow seems a nice tradeoff.

I don't think we need unreal, but I don't know how to solve glow vs bloom.

well unless you are going to implement some tags syste, it has to be file names, right?

We could implement some internal query replacement code.

Pseudo code:

if ( search === 'glow' ) search = 'bloom';

@mrdoob then there will be no results until full word is typed. what if someone types glo and, seeing there is nothing, stops typing?

With the current code that is correct. We could make the code a bit smarter too.

Just trying not to end with webgl_postprocessing_glow_bloom_shine_foo_bar_selective.html.

so the tag system then? such that every example would have a number of tags
attached to them, and these tags would be searchable as well

So in https://github.com/mrdoob/three.js/blob/dev/examples/files.js we could add:

var tags = {
    "webgl_postprocessing_unreal_bloom_selective": [ "glow" ]
};

@makc I make draft PR #18773, can you finish it using this reference?
It is ok that I am added tags into a file definition?

@munrocket Im not sure how do I finish somebody elses PR. or do you mean forking your fork and then submitting PR into your fork?
馃槰

You can copypaste it and make it as your on PR and I will close draft.

I don鈥檛 want to wipe all the history in this file by myself. So help me please.

ok np, I will take a look tonight, let me know what does not work there as of now

Run git cherry-pick 68f1ee6 to grab all changes in your repo.

bump!
Screen Shot 2020-04-27 at 20 49 49

I am thinking about:

  • adding a bigger list
  • adding a new section "searched by tags" in UI, now some of the examples appearing silently

Sorry, but still not fixed, sometimes we can鈥檛 find anything in documentation and examples. Searching filter is too basic and also we need thumbnails.

One girl said that searched one example 1 hour, it鈥檚 exactly the same that we all doing when forgot proper name. Even experienced programmers sometimes forgot something.

Probably additional DOM lines that I added in 芦searched by tags禄 was too laggy, but I am thought about users when I done it. This changes in a proper direction.

I'm fine with improving the example search as long as no over-engineering happens 馃槆 . Please keep it simple even if the search has to forgo a few advanced features.

Ok, but searching algos sometime not an easy task. This operation is O(N) in general.
That's why double sized DOM was laggy little bit, if you about this.

ha, @munrocket looks really pissed that you guys did not like his commits. look, munrocket, my code did not make it either - mrdoob ended up committing his own version - and guess how upset I am?
not at all
take notes, and keep adding them tags.

Kek, the chad contributor here.
He don't care about his commits and dump dumbest version.
MrDoob take it and ended up committing edited version.

That was what happened, yes.

That issue was not fixed for 2 month. It's happening.

@munrocket I remember firefox had issues not fixed in 20 years, so it is not that bad yet

here is an example

Mozilla should support the scrollbar-(blah)-color properties implemented in IE5.5

lol, they achieved IE5.5 level.

Was this page helpful?
0 / 5 - 0 ratings