psybuzz / goldenconversations

0 stars 0 forks source link

Add choice modal to prompt user choice in conversation page #13

Closed nikilselvam closed 10 years ago

nikilselvam commented 10 years ago

I've added in a modal to make sure that the user wants to archive their conversation when they click the 'Archive conversation' option. This will allow us to perform the appropriate action based on the user's choice.

Here's a screenshot: archive modal

psybuzz commented 10 years ago

Looks nice. I wonder though, if we end up having a confirmation modal for deleting and leaving as well, it might benefit us to make a generic popup view if the only thing that changes is the question text inside and the callback action after clicking yes.

It might get messy if we eventually have:

new-creation-modal, #archive-modal, #leave-modal, #delete-modal in each CSS rule, and 4 very similar HTML forms.

What do you think? Would it make sense to have a function, say launchConfirmation that's like:

function launchPopup(question, callback){
   // set the text to question
   // after clicking yes, trigger the callback
}

??

nikilselvam commented 10 years ago

Yeah, that's a good idea. I'll take a look at creating that function.

nikilselvam commented 10 years ago

I've added a generic choice modal in the conversation page and customized it for leaving, archiving, and deleting the conversation. Like Erik suggested, this is a much cleaner way to do it and all of the modal options are tackled at once!

psybuzz commented 10 years ago

Yea, other than the comments above, I think it's a nice clean, functional modal. LGTM

nikilselvam commented 10 years ago

Great- I've made the changes suggested in the latest commit!