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

Hashtag system #558

Merged
merged 1 commit into from
Jul 9, 2016
Merged

Hashtag system #558

merged 1 commit into from
Jul 9, 2016

Conversation

ArthurHoaro
Copy link
Member

@ArthurHoaro ArthurHoaro commented May 10, 2016

  • Hashtag are auto-linked with a filter search
  • Supports unicode
  • Compatible with markdown (excluded in code blocks)

Fixes #278

PS: it's a new search type, different from ?searchtag, which isn't really useful.

@ArthurHoaro ArthurHoaro self-assigned this May 10, 2016
@ArthurHoaro ArthurHoaro added this to the 0.7.0 milestone May 10, 2016
@nodiscc
Copy link
Member

nodiscc commented May 13, 2016

Thank you for the patch. I did not test it yet; just a few questions:

  • does this add a new hashtag search field in the toolbar?
  • how are hashtags different from original, "normal" tags?
  • does searching #sometag in full text or tags search fields return posts with hashtags #sometag ?

I think supporting hashtags is a nice change as it enables typing tags quickly in the description. However I'm concerned that this could make usage/search confusing and/or clutter the UI.

@ArthurHoaro
Copy link
Member Author

does this add a new hashtag search field in the toolbar?

No. I'm already not a big fan of the additional tag search field, I didn't want to add another one.

how are hashtags different from original, "normal" tags?

They're autolinked in descriptions, with ?hashtag=hash. Searching #hash will only return shaares with #hash in their description, not #hashstuff nor hash tag.

does searching #sometag in full text or tags search fields return posts with hashtags #sometag

Full text search will return shaares containing /.*#hash.*/ in any of their fields, I did not change this behaviour. Tag search will return nothing.


I didn't link hashtags to the tag search, as suggested in the related issue, because it would mean implicitly or explicitly adding hashtags to the tag list (i.e. ?searchtags=hash will return both #hash in description and hash in taglist). Which is, I think, not the behaviour we want.

I actually spent more time toying with the markdown plugin and the regex than thinking that through. Any opinion is welcome.

@ArthurHoaro ArthurHoaro modified the milestones: 0.7.0, 0.7.1 May 14, 2016
@nodiscc
Copy link
Member

nodiscc commented May 14, 2016

It looks good, one last question: what does a /?hashtag=hash query return?

I assume it should return all shaares containing #hash in their description? Anything else?

I didn't want to add another one.
They're autolinked in descriptions,

+1 +1

@alexisju
Copy link

I assume it should return all shaares containing #hash in their description? Anything else?

I hope/guess it returns also shares associated with tags which have the same keyword of the #hash.

@ArthurHoaro
Copy link
Member Author

No it doesn't, yet.

Searching #hash will only return shaares with #hash in their description, not #hashstuff nor hash tag.

But, it might be a good idea to do so.

@nodiscc
Copy link
Member

nodiscc commented May 31, 2016

I don't see the point of having an extra ?hashtag= parameter. Just link occurrences of #hash in descriptions to ?searchtags=hash, which does what you want, and does not introduce a new (confusing) parameter. Am I right?

@ArthurHoaro
Copy link
Member Author

I didn't link hashtags to the tag search, as suggested in the related issue, because it would mean implicitly or explicitly adding hashtags to the tag list (i.e. ?searchtags=hash would return both #hash in description and hash in taglist). Which is, I think, not the behavior we want.

But that might be the behavior we want actually.

  * Hashtag are auto-linked with a filter search
  * Supports unicode
  * Compatible with markdown (excluded in code blocks)
@ArthurHoaro
Copy link
Member Author

Updated! All hashtags now create a ?addtag=hash search, which will return shaares containing either #hash in their description, or hash in their taglist. Note that this doesn't affect tag autocompletion.

@ArthurHoaro ArthurHoaro merged commit 0c4c7ae into shaarli:master Jul 9, 2016
@ArthurHoaro ArthurHoaro deleted the hashtag4 branch July 9, 2016 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants