-
Notifications
You must be signed in to change notification settings - Fork 65
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
Adds option to collapse comments #820
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.
Bellow are a couple of recommendations:
button alignment
The button isn't properly aligned. I'd suggest we use something like:
.comments-toggle {
align-items: center;
display: flex;
justify-content: center;
}
And remove position and top from .comments-toggle svg
.
button hover/focus
There's no hover state. Maybe we could use the primary colour for the focus state?
6b4522c
to
6c10f3c
Compare
Thanks Thomas! I've updated the toggle styles to use flexbox to vertically align the SVG. I've also updated the focus/hover states to use the primary colour and a transparent background -- it should pick up the blue by default, or use your custom colour if it contrasts sufficiently against white. Otherwise it'll go from very dark grey to medium grey. Just let me know if anything else needs adjustment! |
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 Thomas!
I've updated the toggle styles to use flexbox to vertically align the SVG.
I've also updated the focus/hover states to use the primary colour and a transparent background -- it should pick up the blue by default, or use your custom colour if it contrasts sufficiently against white. Otherwise it'll go from very dark grey to medium grey.
Just let me know if anything else needs adjustment!
This is much better! Thanks @laurelfulford
🚢
Thanks! |
# [1.4.0](v1.3.0...v1.4.0) (2020-04-01) ### Bug Fixes * correct menu name when checking for it in header ([#859](#859)) ([b560b28](b560b28)) * CSS changed by release process ([abb4bf0](abb4bf0)) * editor color palettes and secondary color by adding full, 6-digits, hex codes ([#857](#857)) ([0c800a1](0c800a1)) * make related posts styles more consistent between formats ([#761](#761)) ([b55746d](b55746d)) * make sure social links block doesn't inherit link color ([#846](#846)) ([66c927c](66c927c)) * only apply RSS icon to /feed ([#851](#851)) ([ce884ac](ce884ac)) ### Features * add a desktop slideout widget area ([#816](#816)) ([3ed6c77](3ed6c77)) * add option to collapse comments ([#820](#820)) ([f67ab51](f67ab51)) * add telephone icon to social menu ([#849](#849)) ([9812b28](9812b28))
🎉 This PR is included in version 1.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Docs have been completed on this feature. |
All Submissions:
Changes proposed in this Pull Request:
This PR adds an option to collapse comments to the Customizer.
The way WordPress handles comments makes this a bit tricky -- I had to do some hacky stuff to work around making sure a new comment, for example, wasn't hidden when added, or to make sure users saw the 'awaiting moderation' message.
I'm sure there are still some issues with this approach; I tried to be extensive in my testing steps, but please, hammer it has hard as you can.
Closes #804 .
How to test the changes in this Pull Request:
Apply the PR and run
npm run build
.Navigate to Customize > Comment Options, and turn on 'Collapse Comments'.
If it's not already, turn AMP mode to standard.
As a logged in user, view a post with one -- the comments should not be collapsed with only one comment:
cpage
orcomment-page-
, depending on your permalinks settings, when you add a comment:Note: At this point you may see a double title, which is unrelated to these changes, and can be recreated on
master
by toggling the search. This will be fixed when #821 lands:Other information: