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

Style Fixes for _comment.html.erb Partial #9079

Merged
merged 5 commits into from Jan 27, 2021

Conversation

noi5e
Copy link
Contributor

@noi5e noi5e commented Jan 26, 2021

  • Removes the weird grey bar that Jeffrey noticed in this comment
    • Fixed by assigning unique ID to edit comment form wrapper, and toggling on that
  • Removes extra padding-top and padding-top around emoji reaction buttons (also mentioned in that comment)
  • Increase margin space between comments
  • Add tooltips for Edit Comment and Emoji Reaction
  • Add user-select: none; to Reply to comment link (makes it un-highlight-able by the user)
  • Change hover style on emojis
  • Opening Edit Comment form now toggles to hide emoji reactions bar

Will leave detailed notes in the code review, and screenshots!


(This issue is part of the larger Comment Editor Overhaul Project with Outreachy. Refer to Planning Issue #9069 for more context)

@gitpod-io
Copy link

gitpod-io bot commented Jan 26, 2021

<div class="card card-body bg-light">
<form method="post" id="c<%= comment.id %>edit" style="display:none;" class="well" <% if comment.is_a?Answer %> action= "/answers/update/<%= comment.id %>" <% else %> action="/comment/update/<%= comment.id %>" <% end %>>
<div id="edit-comment-form-wrapper-<%= comment.id %>" class="card card-body bg-light comment-form-wrapper" style="display: none;">
<form method="post" id="c<%= comment.id %>edit" style="display:none;" class="well" <% if comment.is_a?Answer %> action= "/answers/update/<%= comment.id %>" <% else %> action="/comment/update/<%= comment.id %>" <% end %>>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the fix for the weird superfluous grey bar mentioned here. The edit comment form, when opened, was only toggling on <form>, not <form>'s container.

Before: (grey bar below comment)
Screen Shot 2021-01-25 at 9 16 25 PM

After: (no grey bar)
Screen Shot 2021-01-25 at 9 17 51 PM

@codecov
Copy link

codecov bot commented Jan 26, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@2590128). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #9079   +/-   ##
=======================================
  Coverage        ?   82.04%           
=======================================
  Files           ?      100           
  Lines           ?     5936           
  Branches        ?        0           
=======================================
  Hits            ?     4870           
  Misses          ?     1066           
  Partials        ?        0           

</button>
<a aria-label="Leave an Emoji Reaction" rel="tooltip" title="Leave an Emoji Reaction" class="btn btn-outline-secondary btn-sm dropdown" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class='far fa-heart'></i>
</a>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the icon for emoji reactions:

Before: (button slightly bigger than the other buttons, two icons squashed inside button, smiley face)
Screen Shot 2021-01-25 at 9 22 36 PM

After: (button same size as other buttons, single heart icon)
Screen Shot 2021-01-25 at 9 20 06 PM

onClick="
$('#edit-comment-form-wrapper-<%= comment.id %>').toggle();
$('#<%= comment.id %>-like-emojis').toggle();
$('#c<%= comment.id %>edit').toggle();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also made a change here to toggle the comment's emoji reactions when opening an Edit Comment form. I think it's a lot less confusing.

Before: (emoji heart reaction is still present):
https://user-images.githubusercontent.com/4361605/105804161-f1e25b80-5f53-11eb-97c7-cccbba252114.mov

After:
https://user-images.githubusercontent.com/4361605/105804185-00307780-5f54-11eb-98f7-db9e6540767e.mov

Copy link
Member

@jywarren jywarren left a comment

Choose a reason for hiding this comment

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

Looks great!!!! Thanks @noi5e for all this fine tuning! It's really starting to shine!

@codeclimate
Copy link

codeclimate bot commented Jan 26, 2021

Code Climate has analyzed commit 41637f8 and detected 0 issues on this pull request.

View more on Code Climate.

@jywarren jywarren merged commit b300979 into publiclab:main Jan 27, 2021
@noi5e noi5e deleted the comment-form-style-fixes branch January 27, 2021 01:39
manchere pushed a commit to manchere/plots2 that referenced this pull request Feb 13, 2021
* add unique ID to edit comment form wrapper

* style fixes

* update test selector
lagunasmel pushed a commit to lagunasmel/plots2 that referenced this pull request Mar 2, 2021
* add unique ID to edit comment form wrapper

* style fixes

* update test selector
reginaalyssa pushed a commit to reginaalyssa/plots2 that referenced this pull request Oct 16, 2021
* add unique ID to edit comment form wrapper

* style fixes

* update test selector
billymoroney1 pushed a commit to billymoroney1/plots2 that referenced this pull request Dec 28, 2021
* add unique ID to edit comment form wrapper

* style fixes

* update test selector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants