-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Reader: move post comments to Redux #4817
Conversation
ac673f7
to
eb9374d
Compare
To do:
|
I think we should just show replies when there's less than 5. Having to click a thing to get in when there's only a couple replies is really a bummer. post that bummed me out: http://calypso.localhost:3000/read/blogs/24928942/posts/5639#comments |
Clicking on the Comments icon in a post card doesn't scroll you down to the comments any more |
@mtias Meta-question: can |
+1 Can "Cancel reply" be moved to the right instead of in between Reply and Like? The root comments are ordered chronologically (oldest -> newest), but the nested replies are in an odd order: |
c789fb6
to
e3e1d5f
Compare
More todo from @jancavan:
|
Nested replies are now shown in chronological order, which matches the behaviour of the existing Reader comments. |
|
The downside of ordering the nested replies chronologically is that, when you post a new comment on a thread, it appears at the bottom. This might mean it's out of view - see https://cloudup.com/ccyrBzfU4y8 We fudge this on the existing Flux comments by always putting the new comment at the top of the replies. This often isn't its final position - it moves downwards after a reload if there's more than one reply. Three possible solutions here:
|
What we're doing now - where we slide your new comment in topmost (and it just shows up at the bottom after a refresh) is actually good. Only reason I brought it up thought was I noticed that the nested replies were neither in chronological/reverse chronological order. It somehow was arbitrary, but I'm unable to reproduce the issue :/ |
Could it have been that the replies weren't all at the same depth, but they were flattened out by the indentation limit (so they all appeared at the same indent)? That caught me out a couple of times yesterday :) |
a843c13
to
a7bc448
Compare
Great - happy to stick with that. I've made the change in a7bc448. |
2cfa682
to
6a4828a
Compare
@bluefuton the nested replies beginning 3rd level become really confusing with the blue bar. Let me play around with the styling. |
@jancavan maybe we collapse the commenting levels based on viewport width? Desktop browsers with lots of room see the full nesting and folks on narrower viewports see less and less? |
I think that's a good idea to allow more nesting on desktop, but we should still set a limit. Infinite nesting doesn't really work anymore after several levels deep. I've made changes here (d21884d) which helps, but could be made better if we changed the show/hide icon: https://cloudup.com/cA4DzdYEWCV This isn't great, however, since after 3rd-level indentation, the hierarchy is still off: http://calypso.dev:3000/read/feeds/23059853/posts/939824593#comments Another solution (but is out of scope): Just allow comments to be expandable, but not collapsible. This also allows for proper hierarchy. Sidenote: I believe this is old code, but I poked at this branch and the gravatar is positioned |
d21884d
to
7bade48
Compare
rebased this and force pushed it |
7bade48
to
096ff14
Compare
- Removed CommentStore and CommentLikeStore - Should validate refs before accessing them - Validate post prop - Refactored form component to handle auto growth a bit better - Fix the click on reply issue when another reply box is active - Fixed style - Simplified the replay click fix - Remove all remaining comment store and comment like store files, and turn off associated tests - humanDate: show "just now" for times less than a minute ago - If a comment has 5 or fewer replies, show all replies (no hide/show controls) - Remove isRequired on props that may be null before provided by a Redux selector - Full post: check if we need to scroll to comments when receiving new shouldShowComments prop - Move 'cancel reply' link to right hand side - Order nested replies in chronological order - Return comment form to bottom after reply posted - When adding a new comment from the current user, skip the date sort so that it appears at the top of the current branch - Remove handleBlur in comment form. Component was unmounting before delay() completed, resulting in setState warnings
096ff14
to
b84af5a
Compare
This moved to #5236 |
This PR moves post comments in the Reader to use Redux state instead of Flux stores.
It builds on the work done by @samuelclemens in #3528.
Fixes #967 and #2839.