Skip to content

feat: add native dialog - #482

Open
manuel-rw wants to merge 1 commit into
blazorblueprintui:developfrom
manuel-rw:feat/native-dialog
Open

feat: add native dialog#482
manuel-rw wants to merge 1 commit into
blazorblueprintui:developfrom
manuel-rw:feat/native-dialog

Conversation

@manuel-rw

Copy link
Copy Markdown

As outlined in #376 , there are some design limitations of the current dialog component. It requires to have a BbPortalHost within the same circuit. This makes it not possible to render the portal host in SSR but show a dialog within a WebAssembly component. Additionally, due to the network latency and the roundtrip required by a InteractiveServer call for a dialog, they can feel sluggish.

This PR implements the support for the native dialog with a fallback to the interactive dialog if the browser does not support it. The native dialog is nowadays well implemented across many browsers. This change also adds an example for opening the dialog using OpenAsync and points out the limitation of the DialogRef, since I ran into this limitation in my own app.

The change should be backward compatible but I only verified using the Sample project and my own project.

Note

For the sake of transparency, this PR was partially generated by AI. I used it to refactor, organize and write tests. Smoke tests were conducted manually.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

Testing Checklist

  • Blazor Server
  • Blazor WebAssembly
  • Blazor Hybrid (MAUI)
  • Keyboard navigation / accessibility
  • Dark mode

Related Issues

#479
#376

@manuel-rw

Copy link
Copy Markdown
Author

I don't use MAUI or native desktop apps. So we may need to organize with #478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant