Open cuserox opened 2 weeks ago
@cuserox I have a fix for this available in six7/fix-mentions
. It turns out a recent change we did to mentions was causing this. Removing this again makes everything work, except that the extra space at the end of the input is added. It's the split=""
that was the issue.
Perhaps we could adjust this so after applying it strips out the extra space?
For example if you have a token like {fontsize-small}rem
and you replace fontsize-small with something else, it adds an extra space. But it no longer adds the } after, which is a great improvement but the space is a bit of an issue (which we attempted to solve with that split="" but the sideeffects are worse with that.
@cuserox I have a fix for this available in
six7/fix-mentions
. It turns out a recent change we did to mentions was causing this. Removing this again makes everything work, except that the extra space at the end of the input is added. It's thesplit=""
that was the issue.Perhaps we could adjust this so after applying it strips out the extra space?
For example if you have a token like
{fontsize-small}rem
and you replace fontsize-small with something else, it adds an extra space. But it no longer adds the } after, which is a great improvement but the space is a bit of an issue (which we attempted to solve with that split="" but the sideeffects are worse with that.
@six7 makes sense. All in all, this fix should be for no side effects to occur when a user searches tokens 🔨
@six7 @macintoshhelper @robinhoodie0823
I have created a Draft MR here, merely because it needs more testing. I believe it works well with my fix, but I wouldn't want to merge it and cause more trouble for V2 (and I'm off this Friday & Monday) 😇
Therefore if it's a pressing fix that needs to go out, please feel free to tweak, test & merge if needed!
Describe the bug Tweaking the extra space when token search is used (https://github.com/tokens-studio/figma-plugin/pull/2789) the way that search results are populated has been slightly broken!
To Reproduce Steps to reproduce the behavior:
{}
added randomly on the inputExpected behavior No extra bracket nor spaces should be added when a token name is clicked on after searching.
Screenshots or Screencasts https://github.com/tokens-studio/figma-plugin/assets/114073780/335dd67b-6bf2-484f-b528-03733e1a3d50