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

Multiple tags are added as one huge tag #55

Open
immanuelfodor opened this issue Nov 22, 2020 · 11 comments
Open

Multiple tags are added as one huge tag #55

immanuelfodor opened this issue Nov 22, 2020 · 11 comments
Labels
Milestone

Comments

@immanuelfodor
Copy link

immanuelfodor commented Nov 22, 2020

Sorry for troubling you again after the previous two issues but there is another annoying bug. It can be that this is an issue with the Shaarli API (cc @ArthurHoaro), but only Shaarlier makes it happen for me. My Shaarli is at the latest upstream master and I have the default space as tag separator. When I add several tags to a link, it's being created as one huge tag. The only way to get the tags separated is to edit the link and just hit save, then the tags are broken up just as they should. There is no change in the use case of how I share a link, I've always used spaces to share both in the webapp and in Shaarlier. Please look into this issue, it's rather difficult for me to type commas instead of spaces on mobile with lots of tags (commas are the only way now to circumvent this issue meanwhile using the Shaarlier app share).

Huge tags also show up in the tag search after a share is created:

Screenshot_20201122-195827__01

The web is also displaying the one huge tag:

Screenshot_20201122-195850

After hitting save, the tags are separated fine:

Screenshot_20201122-200207

If I use commas as in the link edit in Shaarlier, the tags are created fine on the first shot.

@ArthurHoaro
Copy link

I can reproduce your issue using the Python client. Can you report this on the main Shaarli repo?

@immanuelfodor
Copy link
Author

Wow, thanks for the test, of course, closing this one.

@immanuelfodor
Copy link
Author

@dimtion Based on Arthur's comment at shaarli/Shaarli#1651 (comment) , please use an array instead of a string when sending the tags to Shaarli, it should fix the bug described in the opening post.

@immanuelfodor immanuelfodor reopened this Dec 29, 2020
@PubliusTX
Copy link

For what it's worth, I started experiencing this problem after I upgraded shaarli on my site to v 0.12.1 (from one of the 0.11 releases)

If I insert commas using the shaarlier android app, no problem. But I never had to do that before.

@sokai
Copy link

sokai commented May 14, 2021

Hey there!

I had the same problem, saw the new feature "support any tag separator, not just whitespaces", since Shaarlier v0.12.1 and then I came over issue "Multiple tags are added as one huge tag #1651" to here.

So I solved it (for me) by changing the new option tags_separator to , and everything is fine now (, again). :-)

KR

@dimtion dimtion added the bug label Jun 12, 2022
@bttrx
Copy link

bttrx commented Nov 6, 2022

@dimtion Same here. When will this be fixed finally?

@amadeous
Copy link

amadeous commented Dec 24, 2022

Hello!

I also encountered this issue.. After digging a bit, it seems that there's an inconsistency between the code and the UI. According to the code, tags should be separated by ", " (cf here) but the UI instruct to separate by spaces (here and in the translations).

In order to make it consistent and prevent future confusions, I would suggest to either:

  • Edit the UI to instruct to use ", " as separator OR
  • Change the code to split tags by spaces and not coma-space.

I can provide a pull request but am unsure about which change to operate. I have a feeling that keeping the UI as it is (so using spaces) is easier since otherwise, we would need to change multiple files, re-do screenshots, manage translations,.. What behavior would you rather use?

Please vote using 🚀 for ", " and 👀 for " "

I will do the corresponding action in 7 days so that we have a fresh build for next year! 😃
Cheers!

@immanuelfodor
Copy link
Author

UX-wise, using spaces as separator when entering and modifying tags on mobile are much easier, so I vote for spaces 👀

@bttrx
Copy link

bttrx commented Dec 25, 2022

I'd like to add the following: In Shaarli UI at Tools -> "Manage tags" -> "Change tags separator" reads "Note that hashtags won't fully work with a non-whitespace separator."

So, for me I solved this Shaarlier issue by changing the Shaarli tags separator from comma to space.

@dimtion
Copy link
Owner

dimtion commented Mar 18, 2023

Hi all,

Sorry for the late response, I don't have a lot of bandwidth to manage Shaarlier these days.

@amadeous your assesment is correct the UI and the api accessor don't have a matching tag separator. The reason is that for older Shaarli instances <v0.12.1 the default Shaarli separator was a space. As of this version, it seems that Shaarli did a breaking change.

Thank you for the PR, I will look at it, however note that if we are to merge it, it would be a breaking change for users of older version of Shaarli. A proper fix would be to match on the Shaarli version before sending the api call.

This would also be a breaking change for users who kept the old space separator in newer versions of shaarli.

As of today I don't have enough data to know if it would affect more users to migrate to comma unilateral than keeping current behavior, add a piece of documentation in the Readme, or have a more complex logic that matches Shaarli version + tag_separator field.

@dimtion dimtion added this to the 1.8.1 milestone Mar 18, 2023
@amadeous
Copy link

amadeous commented May 4, 2023

No problem! I have some free time ahead, I could make a smooth PR for you to review and validate.

If I understood correctly, the default tag separator was ',' until v0.12.1 (according to this commit) and it changed to ' ' for v0.12.1 and later.
I can match the Shaarli version to have the correct default separator that we can use for now. I will also try to edit the UX so that the correct default separator used is displayed in the tag placeholder.

Ultimately, now that the tags_separator field can be customized in Shaarli (ref), it would be nice to have this information exposed by the Shaarli API via the info endpoint. I will suggest the modification on Matrix and propose a PR on Shaarli. With this information, we could have a consistent tag separator used on Shaarlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants