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

[Wasm] MessageDialog does not show the Title or support Command customization #678

Closed
jeromelaban opened this issue Mar 13, 2019 · 3 comments
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform project/navigation-lifecycle 🧬 Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)

Comments

@jeromelaban
Copy link
Member

jeromelaban commented Mar 13, 2019

I'm submitting a...

  • Bug report

Current behavior

  • A MessageDialog created with a title does not appear in the browser.
  • A MessageDialog with more than one command does not appear in the browser.
  • A MessageDialog with a customized command label does not appear the browser.

Expected behavior

  • The title should appear.
  • More than one command should be possible.
  • The label of a command should be customizable.

Minimal reproduction of the problem with instructions

See https://github.com/nventive/Uno/blob/aaa4238952fca2a23e5b3f95ea22c5d933133e0e/src/Uno.UWP/UI/Popups/MessageDialog.wasm.cs#L19 and https://docs.microsoft.com/en-us/uwp/api/windows.ui.popups.messagedialog

Environment

Nuget Package: 1.43.1

Package Version(s): 

Affected platform(s):
- [ ] iOS
- [ ] Android
- [ ] WebAssembly
- [ ] Windows
- [ ] Build tasks

Visual Studio
- [ ] 2017 (version: )
- [ ] 2017 Preview (version: )
- [ ] for Mac (version: )

Relevant plugins
- [ ] Resharper (version: )
@jeromelaban jeromelaban added kind/enhancement New feature or request platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform labels Mar 13, 2019
@ghuntley ghuntley added kind/bug Something isn't working priority/backlog and removed kind/enhancement New feature or request labels May 22, 2019
@ghuntley ghuntley self-assigned this May 27, 2019
@ghuntley
Copy link
Member

As per https://developer.mozilla.org/en-US/docs/Web/API/Window/alert and

As per https://docs.microsoft.com/en-us/uwp/api/windows.ui.popups.messagedialog

MesssageDialog is meant to be blocking of user interaction, have an optional title and can support up to 3 commands in desktop apps, or 2 commands in mobile apps. If no commands are specified, then a default command is added to close the dialog.

The current WASM implementation is a window.alert which does not allow for custom commands or a title thus I'm increasing the scope of this issue past title, to include custom commands.

Resolving this will mean either implementing ContentDialog first and making the experience similar to UWP or pushing this responsibility to shell or browser that's executing WASI.

@ghuntley ghuntley changed the title [Wasm] MessageDialog does not show the Title [Wasm] MessageDialog does not show the Title or support custom commands May 28, 2019
@ghuntley ghuntley changed the title [Wasm] MessageDialog does not show the Title or support custom commands [Wasm] MessageDialog does not show the Title or support Command customization May 28, 2019
@ghuntley ghuntley removed their assignment Aug 23, 2019
@jeromelaban
Copy link
Member Author

This feature can now be implemented using ContentDialog.

@agneszitte agneszitte added project/navigation-lifecycle 🧬 Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...) and removed priority/backlog labels Sep 21, 2020
@jeromelaban jeromelaban added the difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. label Feb 15, 2021
@MartinZikmund
Copy link
Member

MartinZikmund commented May 31, 2021

As MessageDialog use is discouraged by Microsoft (see https://docs.microsoft.com/en-us/uwp/api/Windows.UI.Popups.MessageDialog?view=winrt-20348), and ContentDialog is now fully supported, closing this issue.

Represents a dialog for showing messages to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform project/navigation-lifecycle 🧬 Categorizes an issue or PR as relevant to the navigation and lifecycle (NavigationView, AppBar, ...)
Projects
None yet
Development

No branches or pull requests

4 participants