Closed orlando closed 5 years ago
Are we sure we need this for launch? This will not be doable before October 1st at our current velocity.
Yeah this is not a blocker for the Release, and this can work by asking the admins to go to the Discourse message for now. I'll move it to low priority for now
I've been tossing around ideas for this in my head and have come up with three possibilities for us to consider, I think they each have trade offs that are relatively clear, but I'm having a hard time deciding which route we should take and would like some input.
system
user we use to make api requests for SSOOff the cuff, the first two require us to basically recreate the thread view Discourse already has but in the tools. We'd do this using Vue and could make it it's own little Vue app and be very clean. If we wanted admins to be able to respond, we'd have to embed a visual editor, etc. Basically like I said, recreating the thread view Discourse already has, but in our own stuff. The second option (retrieving the messages from the backend) also runs into the rate limiting issues we had before. The first option wouldn't have that problem (operating like the embedded header).
The third is probably the most interesting to me. It requires the least amount of work and we would get a lot of things for free. The problems there are that we would probably want to disable Discourse's header from showing within the iframe, but we can do that with the theme plugin, query parameters (or iframe options) and some css trickery. There are probably other things we'd want to disable, but it would along those lines.
What do you think @orlando?
@marcondag yeah 3 sounds good, but we will need to have control on how we render the messages. We need to display all messages (including admin notes from the tools) chronologically, so the approach we should take is 2. Something like:
To reply to a message, admins need to go to Discourse. Implementing this with all the features in the tools will be hard (attachments, markdown, mentions etc etc etc). We may take admins to a specific message in Discourse if they click on top of it in the tools, but no more than that.
About the style, we can use the same style we have, maybe increasing the width of the modal for more readability.
Okay, that sounds good. I think we actually wouldn't be able to do 1 or 3 anyway because only admins assigned to the dispute (either via a group they are in or directly) would be able to see the PM. If we pull the messages from the back-end that will not be a problem.
But that brings up another question, currently if you're just a dispute_pro
and you go to a dispute in the backoffice that you're not assigned to a click the "Open Discourse Thread" button, you'll be denied access to the PM, right? I can't test it right now but it just dawned on me, if you could check that. We should let the organizers know. The workaround is just that you'd have to assign yourself to the dispute causing you to get added to the thread in Discourse.
Option 2 at least makes it possible for any admin to read the thread for a dispute, but the problem of being able to reply will still exist.
Given that it doesn't need to be interactive or reactive, returning the rendered HTML from that endpoint with an ajax request makes sense, might be the fastest approach instead of using Vue & the cost it will inevitably incur.
@marcondag cool I'll check. If non assigned admins can't see the PM in Discourse then I think it's fine, is a way to enforce that only people related to the dispute is able to message the user.
Closing this as we are leaving the current dispute-tools repo in maintenance mode
Since we are moving the Dispute user communication to Discourse, we need a way to quickly see the messages in Discourse from the back office.
We currently have this view with a list of messages
The idea is to list both the comments in the Discourse PM and the admin notes in chronological order.
Also, while working on this, is a good time to display the actual admin name when creating notes instead of The Debt Collective
Tasks
Acceptance criteria