nathank
(Nathan Kershaw)
Novembre 6, 2023, 9:25
9
J’ai compris que la modale que cela appelait a été refactorisée conformément à ceci :
If you’re implementing a new Modal, check out the main docs here . This topic describes how to migrate an existing controller-based Modal to the new Component-based API.
In the past, Discourse used an Ember-Controller-based API for rendering modals. To invoke the modal, you would pass a string with the name of the controller to showModal(). Under the covers, this made use of Ember’s Route#renderTemplate API, which is deprecated in Ember 3.x and will be removed in Ember 4.x…
Cependant, je ne parviens pas à comprendre comment interagir avec cela via l’API. Le nouveau fichier de modale est ici :
https://github.com/discourse/discourse/blob/main/plugins/poll/assets/javascripts/discourse/components/modal/poll-ui-builder.js
Je ne parviens pas à comprendre comment appeler cela maintenant, car la manière de le faire n’est pas couverte par la documentation, d’après ce que je peux dire. Quelqu’un peut-il m’aider ?
1 « J'aime »