feat: support message dialogs with 3 buttons
closes #2640
Package Changes Through 355fc91f13a62faecb8139d5a8cdf7c7ff530a56
There are 4 changes which include dialog with minor, dialog-js with minor, updater with minor, updater-js with minor
Planned Package Versions
The following package releases are the planned based on the context of changes in this pull request.
| package | current | next |
|---|---|---|
| api-example | 2.0.35 | 2.0.36 |
| api-example-js | 2.0.31 | 2.0.32 |
| dialog | 2.3.3 | 2.4.0 |
| dialog-js | 2.3.3 | 2.4.0 |
| updater | 2.9.0 | 2.10.0 |
| updater-js | 2.9.0 | 2.10.0 |
Add another change file through the GitHub UI by following this link.
Read about change files or the docs at github.com/jbolda/covector
iOS is not tested ofc
Windows and Android are tested and works.
@FabianLars or @lucasfernog can you test the iOS stuff?
Can do but I'm kinda away over the weekend so please remind me on Monday if I or Lucas didn't get to it yet by then.
don't worry about it, enjoy your weekend
I started taking a look at it but got carried away to other things. I was trying to improve the return type but.. it's complicated
@lucasfernog
I was trying to improve the return type but.. it's complicated
Can you maybe expand on that so someone else can potentially take over?
i love this :D
i love this :D
:joy: :joy: omg it took me a minute to realize wtf is this
To be honest, although it's correct at the type level and it does error out if extra buttons are passed, this type makes it harder to follow to me
instead of
weird, i only ever got the second type of warning.. maybe we just go with the other way :|
i didn't really like using ok instead of yes because then it wouldn't match the rust side.. and ok / no / cancel is a weird trio IMO, but maybe that's just me
I feel like ok / no / cancel is ok because most of the time, 3 buttons will be 1 primary action 1 secondary action and cancel, it's not really yes / no / cancel
But this doesn't quite match the rfd's default YesNoCancel so...
I feel like as long as we put some examples in MessageDialogOptions.buttons so people can copy paste them, I think the error message wouldn't be a problem in that case
