-
Notifications
You must be signed in to change notification settings - Fork 93
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
Validation message cut off at the last character. #126
Comments
Hi @henzeb, I'm unable to replicate this using Konsole on Fedora: I also don't see how it would be possible for this library to be the cause of this as terminals don't provide that level of control. Can you try a different font and see if that might be causing it? |
The default font is named Hack. Changing the font does have some effect. But it changes the overall appearance and most is just making things look ugly. Adding a space at the end of the message also seems to fix it. (hence it doesn't look ugly when you use a period at the end of the line) what's the font Fedora is using for Konsole? |
The default is set to "Monospace", which I assume just resolves to the system monospace default. I'm using Gnome, so I'm not sure what default it's using. I just installed Hack from https://sourcefoundry.org/hack/ and configured it in Konsole, but still can't replicate the issue: I also tried it with JetBrains Mono: I suspect this is an issue with font rendering on your system. Prompts has little control over the rendering other than specifying characters and basic styling of things like colours. In your screenshot, the warning symbol (Unicode U+26A0) looks like it's rendering wider than a single monospace character. That may be throwing off the way that your terminal calculates the width of the line, causing the cropping. You could try replicating this by running the following commands: echo "⚠ Invalid email address"
echo "Invalid email address" There's also the possibility that the colours trigger some weird behaviour, so you might like to try including them too: echo "\e[33m⚠ Invalid email address"
echo "\e[33mInvalid email address" I will close this for now, as I don't think it's an issue with Prompts. Feel free to re-open if you can confirm that Prompts is specifically causing it. We could look at removing the warning symbol if it's triggering terminal bugs, but I'd want to see widespread reports before going that far. |
It is indeed the symbol. But we don't have to remove it. A simple space or newline character would be a good workaround. |
Laravel Prompts Version
0.1.16
Laravel Version
0
PHP Version
8.2
Operating System & Version
Kubuntu 22.04
Terminal Application
Konsole, Yakuake
Description
See below. Any message below the box is cut off.
Steps To Reproduce
just create a test prompt in a script where composers autoload is loaded:
Just press enter.
I have not added a laravel version, but it is broken there as well.
The text was updated successfully, but these errors were encountered: