Color code thumbs up/down on hover in evaluation #3725
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I closed #3484 accidentally.
My goal with this approach is to add a visual confirmation the teacher pressed the right button.
Changing the
color
property in both states wasn't possible without javascript. This is the proposal using pure CSS: small color change on hover and clicking shows more green/red for clear visual feedback. When the teacher hovers over the wrong button, a glimpse of the wrong color is shown.he 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
Closes #2715.