Button with Checkmark should be hidden to users who can't unmark correct answers


#1

Hi Discourse-solved team,

Suggesting UX changes, button with Checkmark should be hidden to users who can’t unmark correct answers.

02%20AM

The word SOLUTION should be the only one visible.

Thanks.


Needs help regarding badges for discourse-solve code
(Kane York) #2

I disagree - I think the filled box is an important part of the styling highlighting the post.


#3

@riking

Having a checkbox tells users that I can uncheck it. If I am not the OP or admin, I shouldn’t see the checkbox. Only OP or admin should see checkbox because that action is only for them.

For everyone else, they should only see the word “SOLUTION”.

We can add additional highlights by making the background of the post ‘Green’ or have additional highlights around it. But not using the checkbox.

UX wise, having a checkbox for the readers is not the proper way.

To the discourse-solved developers, i’m not a ruby dev, but how can i modify this in code in case I want to remove the checkbox in my site for readers not OP/Admin? What part of the code handles this?

Thank you. :slight_smile:


(Bart) #4

You can hide it by adding the following line of CSS to your theme:

.actions button.accepted {display:none;}

PS: this does show there’s a slight alignment issue with the ‘Solution’ text:

image


#5

Thanks @bartv for the suggestion.

But the problem with that solution is it also hides the checkmark to OP or admin who should have the ability to uncheck it.


(Bart) #6

Ah true. Perhaps you could dig into the CSS a bit more to make the selector more specific and avoid this.


#7

I was trying to do that and realize that this isn’t possible because you can’t add any conditions (if/else) in the CSS. The only way to make it work is editing it directly thru the plugin code.


#8

To everyone that helped, thanks.

I was able to modify the plugin code already:

Here’s what I did:

For OP:
Instead of just the checkmark, I added this button - “This solved my question” which is more visible to the OP or readers.
24%20AM

Also, if OP wants to change his/her answer, this is what he/she sees:

42%20AM

Now, if I am not OP or admin. Here is what I see:

57%20AM

Again, thanks for those who have created this plugin. :slight_smile: