Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color code thumbs up/down on hover in evaluation #3484

Closed
wants to merge 5 commits into from
Closed

Color code thumbs up/down on hover in evaluation #3484

wants to merge 5 commits into from

Conversation

BTWS2
Copy link
Contributor

@BTWS2 BTWS2 commented Mar 16, 2022

This pull request closes #2715.

I don't have strong opinions on the order of thumbs up or down, but I'm in favor of color coding (thumbs up = green, thumbs down = red) to nudge towards the correct button as @rien suggested. I can switch the order if needed:
https://github.com/dodona-edu/dodona/blob/develop/app/views/feedbacks/_feedback_actions.html.erb
https://github.com/dodona-edu/dodona/blob/develop/app/views/feedbacks/_score_actions.html.erb

image
image
image
image

@BTWS2 BTWS2 requested a review from a team as a code owner March 16, 2022 19:31
@BTWS2 BTWS2 requested review from niknetniko and chvp and removed request for a team March 16, 2022 19:31
@jorg-vr jorg-vr added deploy mestra Request a deployment on mestra feature New feature or request and removed deploy mestra Request a deployment on mestra labels Mar 17, 2022
@jorg-vr jorg-vr changed the title Color code thumbs up/down in evaluation Color code thumbs up/down on hover in evaluation Mar 17, 2022
@jorg-vr
Copy link
Contributor

jorg-vr commented Mar 17, 2022

Peek 2022-03-17 10-54

I prefer to update the icon color instead of background color. (But this is just a matter of taste)

Overall I approve of the change

@BTWS2
Copy link
Contributor Author

BTWS2 commented Mar 17, 2022

My goal with this approach is to add a visual confirmation the teacher pressed the right button. This shows the color after pressing the button. When the teacher hovers over the wrong button, a glimpse of the wrong color is shown with the previous approach. I agree with @jorg-vr that changing the color of the icon looks cleaner.

It's based on https://css-tricks.com/different-transitions-for-hover-on-hover-off/.

2022-03-17-23-26-21.mp4

@bmesuere
Copy link
Member

Why not combine both behaviours? Color on mouse over + a slight delay after clicking?

@BTWS2
Copy link
Contributor Author

BTWS2 commented Mar 23, 2022

@bmesuere A color change on mouse over (without animation) and visual feedback after clicking would indeed be better. If I had to choose I prefer the visual feedback after clicking, but both is better.

@BTWS2
Copy link
Contributor Author

BTWS2 commented Mar 23, 2022

Changing the color property in both states wasn't possible without javascript. This is the new proposal using pure CSS: small color change on hover and clicking shows more green/red for clear visual feedback.

Light mode:

2022-03-23-19-17-54.mp4

Dark mode:

2022-03-23-20-45-31.mp4

Copy link
Member

@chvp chvp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The background color is still quite harsh, I think. The end of the animation also looks a little strange to me. Maybe a fade-out would make it less jarring?

app/assets/stylesheets/components/btn.css.scss Outdated Show resolved Hide resolved
app/assets/stylesheets/components/btn.css.scss Outdated Show resolved Hide resolved
@BTWS2
Copy link
Contributor Author

BTWS2 commented Apr 2, 2022

I changed the background to lighter shade of the color. The end of the animation is cut off at the end, because the button is updated when the loading is done (visible at the end of the screen recording of dark mode below). I made the animation shorter and used ease-out to mitigate this partly. I added a space before the brackets and added a newline at the end.

At first I chose a lighter color ($danger-100), but it resulted in even more harsh colors in dark mode (e.g. $danger-100: $red-800 !global;), so I used opacity instead.

Light mode:

2022-04-02-21-01-25.mp4

Dark mode:

2022-04-02-21-02-11.mp4

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch order of thumbs up/down buttons in grading panel
4 participants