I am writing a plugin for Keybase Proofs, and since it is my first attempt at writing a Discourse plugin, I am still trying to figure out the best way to integrate it with the product
The plugin itself needs just a couple UI components, and one of them is still a bit tricky for me to implement: the page that shows the association between the Discourse user and the Keybase user (see the screenshot here).
The easiest way for me to implement it is a full page, for example served at
/keybase-proofs/new-proof, but it seems like it is discouraged to have a plugin define their own full pages (@eviltrout I think I remember you writing about this somewhere, perhaps you can give me some hints?).
So what I am trying to do instead is having a modal dialog appear when the url to create the association is hit. So ideally I’d like to show the Discourse homepage with a modal on top, using an outlet. Would this be a better design? If so: how do I make the modal appear only when a specific url is hit, with the homepage in the background? The only way I see to make this happen is to use query parameters:
Here, I would use
new_keybase_proof=true to decide if I need to show the modal or not.
UPDATE: Perhaps I should do something like what happens for
/login? That is, do a redirect to the homepage in the route
beforeModel() method and then call the method that shows the modal?