-
Notifications
You must be signed in to change notification settings - Fork 0
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
Styling the Forum Vote Buttons #388
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are changes bringing machina changes into our templates. The code and the buttons looks good to me!
4f029a4
to
675ba5f
Compare
675ba5f
to
4e1f6c9
Compare
…ote-buttons-css Need to style the correct buttons
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Report
I like the stylings! Just implement the styles based on the user vote then resubmit!
value="like"> | ||
<i class="fas fa-thumbs-up"></i> Like | ||
</button> | ||
<span class="like-count fas">{{ post.rating }}</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Color like button text
As noted by @joshuamonroe mentioned here, we should have some color indicator based the user's vote.
The colors used here are the same colors from the buttons:
#3579F6 // blue
#CB444A // red
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To add onto this, the deselecting when the other one is selected is not completely working. It works from like --> unlike but not the opposite way, but this can be a minor PR.
…like button stylings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better!
FYI, the placement of the buttons shifts depending on the width of the current vote count:
Screen.Recording.2023-12-05.at.6.41.00.PM.mov
This is not a problem for this PR, something you might want to make a separate issue if this behaviour is not desired.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great and everything seems to be working as intended on my end. One very small housekeeping request in the code comments and then I'll be happy to approve it.
src/templates/forum/board_base.html
Outdated
@@ -19,7 +19,7 @@ | |||
<link rel="stylesheet" href="{% static 'machina/custom-styling.css' %}" /> | |||
{% endblock css %} | |||
{% block body %} | |||
<div class="my-5 container" id="main_container"> | |||
<div class="my-5 container " id="main_container"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor, but lets get rid of this extra space to keep the PR clean.
c1d83ff
to
d2968ce
Compare
d2968ce
to
6b50ffc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning that up, good to go now. Approved!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The buttons look great to me! I added a min-width
to the buttons at the end to make sure changing the vote count doesn't move the buttons around until the vote count is ridiculously large (>100,000)
Closing commentWe added styles to the barebones like buttons, and ensured they behaved properly when toggling and switching between button clicks. Detailed notesWe faced some issues with the voting icons not appearing for Firefox, but that was solved by using FA5 class names for those icons, i.e. We made sure the user's vote was clear by choosing to fill an icon instead of solely changing the icon's color. This helped with accessibility. (credits: @giomhern ) We added a bit of extra space around the vote counter so the button placement would shift so much with every vote. (credits: @majorsylvie) Thank you to @joshuamonroe and @majorsylvie for reviewing, and @giomhern for spear-heading this! |
Issue Score: Excellent |
Purpose
Fix the rather clunky looking visuals of the forum like and dislike buttons. The intended result is to have buttons that fit the theme of the machina forum.