Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Global Search, Tags, Markdown Editor and more #551
Big changes in this branch related to keywords and search. First, I personally thought the search experience was confusing (as did others) and needed some changes to reflect both how it works behind the scenes and also better match user expectations.
Behind the scenes results are returned based on an exact match on a keyword and does not check against the title or description of the listing. This is completely fine and we can work with it as is, but when the search input says something like, "Enter a keyword", you expect to get results back when you type in something generic like "Rolex". When nothing came back for "Rolex", it felt like search was broken, instead of it feeling like nobody used that keyword yet.
How do we do solve this problem without having to re-engineer everything? It's pretty simple. To solve these issues, I simply changed the entire concept of keywords to tags, everywhere. Tags are something like #theme, #natureTheme or #rolexWatch, where as keywords are "Nature Theme" or "Rolex Watch".
Tags are hugely popular on Twitter, Instagram and other social networks and our users should catch on quickly to the idea. Instagram uses tags to power discovery and search, like so https://www.instagram.com/explore/tags/crystals/ and almost everyone tags their photos these days (like so https://www.instagram.com/p/BAw-fh1QEBf/?tagged=crystals) so that they can be discovered. The same will be true with OpenBazaar.
So now, it is much much more clear that you're searching for things tagged to certain word(s), and if no results come back, you'll understand more clearly that the reason is because nobody used the tag yet.
It also opens up more opportunities for vendors to tag listings to current trends. For example #superbowl2016 could become a popular tag and people could use it to find and discoer awesome superbowl merch or tickets.
Lastly, give it a try and let me know how you feel about it after playing around with it a bit. It takes a little getting use to, but quickly becomes useful in time.
Changing <%- to <%= would be the simpler way to get it to parse the tags.
We switched to using <%- in most places to prevent malicious code. That's still an issue, so whichever way we inject the content, it needs to go through the HTML sanitizer first, since someone could be using their own client that allows them to put dangerous content in.