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
feat: add textWidth option to dialog.showMessageBox() #30474
Conversation
e13bf38
to
67f67ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this is a problem worth addressing, but my mild concern here is that this solution is a bit narrow and might prevent us from addressing other similar issues in a more robust way in the future.
For example - with this users can specify a custom width, but would they ever experience issues with height? Would it perhaps make more sense to specify x, y, width, height
as a gfx::Rect
here? If that's a potential i'd definitely want to avoid adding more one-off properties than necessary 🤔
@codebytere It's only possible to specify width. I am using a dummy https://developer.apple.com/documentation/appkit/nsalert/1530575-accessoryview?language=objc, which has specified width and zero height. There does not seem to be any other good way to make the dialog wider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API looks good to me.
f8dbc11
to
114bf2c
Compare
Release Notes Persisted
|
I have automatically backported this PR to "15-x-y", please check out #31088 |
I have automatically backported this PR to "16-x-y", please check out #31089 |
Description of Change
This allows working around the overly narrow
NSAlert
dialogs on macOS Big Sur. Default:textWidth = 420:
Checklist
npm test
passesRelease Notes
Notes: Added
textWidth
option todialog.showMessageBox()
/dialog.showMessageBoxSync()
.