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

Extra spaces keep getting added to tag list, repeats forever #52

Open
luckman212 opened this issue May 25, 2019 · 3 comments
Open

Extra spaces keep getting added to tag list, repeats forever #52

luckman212 opened this issue May 25, 2019 · 3 comments

Comments

@luckman212
Copy link

luckman212 commented May 25, 2019

  • Chrome (Mac) v74.0.3729.169
  • Exten v2.12.3

Almost perfect Pinboard extension! So far my only nitpick is:

The Tags field gets extra spaces appended to the taglist every time the extension is activated. I believe the problem could be solved by adding a .trim() function to the code that concatenates the taglist. see PR below

image

luckman212 added a commit to luckman212/Pinboard-Plus that referenced this issue May 26, 2019
luckman212 added a commit to luckman212/Pinboard-Plus that referenced this issue May 26, 2019
@luckman212
Copy link
Author

luckman212 commented May 26, 2019

I created a PR: #53
Not sure if it is correct, please take a look

@clvrobj
Copy link
Owner

clvrobj commented May 28, 2019

Hi @luckman212 , thanks for raising and fixing this!
The extra space at the end of the tags list is added intentionally, for saving a space user need to typing. User can input the tag immediately after open the popup window without input the space after the tags list.
The problem is actually it should not add the extra space incrementally. IMO adding a .trim() function before adding the space might be the best solution. I'll also comment in your PR #53 about this.
Thanks.

@luckman212
Copy link
Author

Thank you @clvrobj

Right now, when clicking on the suggested tag, a space is prepended to the tag, e.g. 'twitter' becomes ' twitter' so the automatic extra space is not needed at the end of the taglist.

But, I think it might be better if clicking on the tag instead added 'twitter ' (space at the end) since right now, if taglist is empty, clicking on a suggestion puts an unneeded space at the beginning of the field. I will try to look more closely at the code to see if I can make the adjustment.

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

No branches or pull requests

2 participants