# symbols in tags do not work in MakeAPI

RESOLVED FIXED

Status

Webmaker
MakeAPI
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: brett, Assigned: cade)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Users are now used to the # symbol when adding tags, however, these don't appear in searches.

Eg
https://brett.makes.org/thimble/hash-tag-test

I tagged this as #oprah, but a search for #oprah or oprah doesn't return this make
https://webmaker.org/en-US/search?type=all&q=%23oprah
(Assignee)

Comment 1

5 years ago
This is most definitely being caused by https://github.com/mozilla/webmaker.org/blob/136a8d6b38a0b6844f469e4c5548f281e11ef19f/routes/search.js#L51

I'm looping in Dale to get his perspective on why we strip the hashtag out.

The MakeAPI stores tags as they are, so "#oprah" will only match "#oprah" and not "oprah".

We need standardize what a tag is across Webmaker.

Are tags denoted by prefacing them with a "#" client side, and we store them without a hash in the makeAPI? this would mean all points of entry for a tag will need to strip the hash (a process not visible to the user) and add the hash back on when it's being displayed.
(Assignee)

Updated

5 years ago
Flags: needinfo?(dale)
Flags: needinfo?(cassie)
Flags: needinfo?(brett)
(Reporter)

Comment 2

5 years ago
yeah but search for #oprah.  you get nothing.

So at the very least, that should work.
Flags: needinfo?(brett)
(Assignee)

Comment 3

5 years ago
(In reply to Brett Gaylor [:brett] from comment #2)
> yeah but search for #oprah.  you get nothing.
> 
> So at the very least, that should work.

So at the very least, we should not strip hash tags?
(Reporter)

Comment 4

5 years ago
correct - unless i'm not thinking through the implications.

I know that we have set up search so you can use hashtags, ie webmaker.org/#oprah, and it will re-route.

What is best way to not fail when a users add hashtag themselves?

Comment 5

5 years ago
When a user searches for a tag (via the url search or on the /search page), I'm just sending the search keyword without the # symbol to the MakeAPI. To the user, the tag is #oprah but to the MakeAPI, it's just Oprah. This doesn't need to change from the user's perspective.
If I recall correctly, the apps also save the tags in the same way (stripping out the hashtag, making tagging transparent to the user). I could be wrong, and then a quick fix would resolve this?
Flags: needinfo?(dale)
(Assignee)

Comment 6

5 years ago
Created attachment 787078 [details] [review]
https://github.com/mozilla/webmaker.org/pull/321

This patch stops hash tag removal from search terms.
Attachment #787078 - Flags: review?(dale)
Flags: needinfo?(cassie)
(Assignee)

Comment 7

5 years ago
This branch is a simple solution that just opens the event info window after it is created.

https://github.com/cadecairos/webmaker-events/compare/bug901975-2
(Assignee)

Comment 8

5 years ago
(In reply to Chris DeCairos (:cade) from comment #7)
> This branch is a simple solution that just opens the event info window after
> it is created.
> 
> https://github.com/cadecairos/webmaker-events/compare/bug901975-2

wrong bug -.-
(Assignee)

Updated

5 years ago
Duplicate of this bug: 908303
(Assignee)

Updated

5 years ago
Attachment #787078 - Flags: review?(dale) → review?(schranz.m)
Attachment #787078 - Flags: review?(schranz.m) → review+

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.