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

rfc(dialog): ability to specify renderer per open call #1713

Closed
bigopon opened this issue Mar 23, 2023 · 0 comments · Fixed by #1978
Closed

rfc(dialog): ability to specify renderer per open call #1713

bigopon opened this issue Mar 23, 2023 · 0 comments · Fixed by #1978

Comments

@bigopon
Copy link
Member

bigopon commented Mar 23, 2023

This is a formal issue to discuss the ideas in #1671

At the moment, each dialog service is associated with only a single dialog-dom-renderer. This means that applications may need to create multiple dialog services to produce different dialog dom structures. For example: one for notifications and one for modals, because notifications normally have a different DOM structure compared to modals.
This inflexibility is unnecessary, and it would be better if the dialog service could have different renderer for different occasions:

class MyApp {
  alert() {
    dialogService.open({
      renderer: modalRenderer, // render standard modal dom with overlay, host etc...
      ...
    })
  }

  notify() {
    dialogService.open({
      renderer: notificationRenderer, // no need overlay
      ...
    })
  }

cc @ekzobrain

@bigopon bigopon changed the title rfc(dialog): ability to have specify renderer per open call rfc(dialog): ability to specify renderer per open call May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant