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

Rendering whitespace influences bidi layout #99589

Closed
saeedhei opened this issue Jun 8, 2020 · 13 comments · Fixed by #144242
Closed

Rendering whitespace influences bidi layout #99589

saeedhei opened this issue Jun 8, 2020 · 13 comments · Fixed by #144242
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release editor-RTL Editor Right-To-Left or Bi-Di issues regression Something that used to work is now broken verified Verification succeeded

Comments

@saeedhei
Copy link

saeedhei commented Jun 8, 2020

  • VSCode Version: 1.45.1
  • OS Version: 10 64

I have a json file in my project, emojies is ok in note pad ++ but in vs code is not good UI,
photo:

jsonUI

json:

{
 "invoice_vip":[
    ["🖨️ چاپ فاکتور","🎨 تنظیمات"]
  ]
}
@alexdima alexdima changed the title emoji UI problem in json file Rendering problem with RTL text which contains emojis Jun 9, 2020
@alexdima
Copy link
Member

alexdima commented Jun 9, 2020

I think this is not a complaint about the emojis being rendered colourful, but with the bidi text layout, where the second emoji probably belongs to the second JSON string.

@alexdima alexdima added editor-rendering Editor rendering issues feature-request Request for new features or functionality labels Jun 9, 2020
@saeedhei
Copy link
Author

saeedhei commented Jun 9, 2020

Yes @alexdima , the output is ok, just in UI, I can't recognize which emoji should I select.

@baharteam
Copy link

Hello.
I have also has problem such as dear Saeedhei.
I have a JSON file in my project that vs code is not good UI.

@baharteam
Copy link

Please help and check it out.
Thanks

@alexdima alexdima modified the milestones: Backlog Candidates, Backlog Aug 5, 2020
@alexdima alexdima added the editor-RTL Editor Right-To-Left or Bi-Di issues label Aug 5, 2020
@NotWearingPants
Copy link
Contributor

Looks like a duplicate of #83365. The problem in both are the direction-neutral symbols, they both want direction-neutral to be forced LTR. Although this is only useful for structured text (i.e. json), and not for writing an RTL sentence with punctuation.

@alexdima
Copy link
Member

alexdima commented Mar 2, 2022

Our new rendering will be:

image

@alexdima alexdima added the verification-needed Verification of issue is requested label Mar 21, 2022
@hediet hediet added verified Verification succeeded verification-found Issue verification failed and removed verified Verification succeeded labels Mar 23, 2022
@hediet
Copy link
Member

hediet commented Mar 23, 2022

Selection seems to have issues now:
recording

@hediet hediet reopened this Mar 23, 2022
@alexdima
Copy link
Member

Interesting, I think this might be caused by using render whitespace in selection, which influences the rendered line parts.

@alexdima alexdima modified the milestones: March 2022, Backlog Mar 24, 2022
@alexdima alexdima removed verification-found Issue verification failed verification-needed Verification of issue is requested labels Mar 24, 2022
@alexdima alexdima changed the title Rendering problem with RTL text which contains emojis Rendering whitespace influences bidi layout with RTL text which contains spaces and emojis Mar 24, 2022
@alexdima
Copy link
Member

alexdima commented Apr 5, 2022

To verify, configure "editor.renderWhitespace": "selection" and open a JSON file with the content:

{
  "invoice_vip":[
    ["🖨️ چاپ فاکتور","🎨 تنظیمات"]
  ]
}

Expected: the text doesn't "jump around" when selecting it.

Actual:

Kapture.2022-04-05.at.18.53.47.mp4

To clarify, the fix will avoid rendering whitespace at all inside RTL tokens. This is not ideal, but better than the jumping the rendering of whitespace causes.

@Trandung5698

This comment was marked as off-topic.

@alexdima alexdima reopened this Apr 5, 2022
alexdima added a commit that referenced this issue Apr 5, 2022
…t (except for line leading and trailing whitespace)
@alexdima alexdima closed this as completed Apr 6, 2022
@alexr00 alexr00 added the verified Verification succeeded label Apr 6, 2022
@tinyCoder32
Copy link

Is this gonna be fixed soon? I still see the issue in 1.67

@github-actions github-actions bot locked and limited conversation to collaborators May 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release editor-RTL Editor Right-To-Left or Bi-Di issues regression Something that used to work is now broken verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants