question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Message Box Rune Support Erroneous

See original GitHub issue

Describe the bug As of version 1.5.0, the MessageBox still seems to take issues with runes. Something similar was recently report in issue #1657 (with a PR to solve this in PR #1658). Then again there was also issue #1665 (context menu width) which subsequently got solved in PR #1666. I think a similar bug fix is required for the MessageBox class.

Here’s a summary of the current state of message box:

language -usc result
en_US false works as expected
en_US true invisible message box
ja_JP false works but the alignment of the message box message is off
ja_JP true invisible message box

To Reproduce I noticed this behavior on the application I am currently working on (https://github.com/StefanGreve/dtui/tree/chatview). To reproduce this bug you can run this application with dtui.exe run --langauge [en_US|ja_JP] -usc. Try to log in (login method is not implemented yet, so any combinations of strings would do the trick) and cancel the process by clicking on the [ cancel ] button to trigger the message box.

Expected behavior The message box should be visible (notice that it is still possible to exit the message box form with the now invisible ok button). Also the Japanese text (and likely any other text which contains runes) should not be cut off. In the GIF below, the text is not really centered when the language profile is set to Japanese.

Screenshots

2022-04-18-15-43-34

Desktop (please complete the following information):

  • OS: 10
  • Version 10.0.19044

Additional context This behavior was observed on CMD, PowerShell and Windows Terminal with always the same outcome. The example in the GIF was run on Windows PowerShell.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
StefanGrevecommented, Apr 26, 2022

In your gif it sort of looks like your MessageBox is popping under the main UI. Also according to your table en_US with -usc manifests the problem which makes it seem like its not to do with the language and instead to do with -usc?

Correct, the -usc parameter (which enables Application.UseSystemConsole) is meant to be a workaround for Windows Terminal where the TUI wouldn’t look correct if it were not for that. But even without -usc flag there is still the issue with the text alignment in the message box looking cut off on Windows PowerShell if there are any rune characters (see also: attached screenshot).

.\dtui.exe run --language ja_JP
image

Just for reference, this is the same table but for Windows terminal:

language -usc result
en_US false works as expected
en_US true invisible message box
ja_JP false see also issue #1661 (explained here
ja_JP true invisible message box
0reactions
BDispcommented, Apr 26, 2022

@tznind is really a bug, but related to several factors, since TextFormatter, NetDriver and more, related with wide runes. I almost have a fix ready.

Read more comments on GitHub >

github_iconTop Results From Across the Web

On error in RunE, do not display usage #340 - spf13/cobra
Hey! When an error is triggered by RunE, usage is displayed. This is a bit odd at this point, the usage is likely...
Read more >
Strange error message: mismatched types rune and string
The error message indicates that the map is not a map[string]string, but a map[string]rune. · my declaration said nothing about a "rune". ·...
Read more >
There was an error setting your rune pages.
This is a really annoying message I keep getting every time I want to update my rune page in champ select. This thread ......
Read more >
Common connection solutions
Sometimes connectivity issues stem from a corrupt network configuration. Resetting your system back to its default configuration can help restore connectivity.
Read more >
Client issues
These troubleshooting steps may resolve the following issues: Client won't open; Client is stuck on 'Loading resources'; Error message: "The RuneScape client ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found