-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add a Latest Comments block #1931
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
Closed
danielbachhuber
wants to merge
15
commits into
WordPress:master
from
danielbachhuber:add/latest-comments-block
Closed
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
681b479
First pass at a basic Latest Comments block
danielbachhuber dcbebc4
Add fixtures for latest comments block
danielbachhuber 33b2571
Add controls for toggling avatar, excerpt and timestamp
danielbachhuber b6c3340
Render timestamp when `displayTimestamp=true`
danielbachhuber 74cc5f3
Use the actual post title in the comment summary
danielbachhuber 526b864
Render avatar when `displayAvatar=true`
danielbachhuber ccf0694
Render excerpt when `displayExcerpt=true`
danielbachhuber f792e24
Put controls in display order
danielbachhuber 16b8160
Fall back to 'Untitled' when no title is present
danielbachhuber f829b5a
Use currying function for de-duplicating toggling handlers
westonruter 798b04e
Eliminate latency when decrementing comment count
westonruter 4e416fb
Fix avatar floating and improve reliability of obtaining avatar size
westonruter 829b3f8
Add initial server-side rendering of Latest Comments block
westonruter 611dec0
Add author name to comment list
westonruter e0e9088
Fix tests for latest-comments attributes
westonruter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fall back to 'Untitled' when no title is present
- Loading branch information
commit 16b8160a144696454a749a7589e39eada188af6e
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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 timestamp format seems like it should be user-configurable. Maybe we need a JS implementation of
human_time_diff()with a filterable format.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.
Moment.js does support relative time: https://momentjs.com/docs/#/displaying/fromnow/
It could be a nice block attribute to decide whether the dates are shown in relative time or absolute time, according to the site's datetime format.
See also #1992 (comment) and #1992 (comment)
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.
Should we get a new issue going about respecting the site's datetime format?
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.
@danielbachhuber done: #2013
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.
Yes, it affects latest posts as well.