You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Timeago component is already being used elsewhere in the package (specifically in the GitHub PR timeline) so I've added a displayStyle prop that we can use to toggle which format is used. I've also changed it to localize the short diffs in a custom locale derived from en rather than configuring Moment globally (shakes fist at global state) and added tests for both styles.
Thanks for getting this started and doing the legwork for customizing Moment there 😄
The Timeago component is already being used elsewhere in the package (specifically in the GitHub PR timeline) so I've added a displayStyle prop that we can use to toggle which format is used.
👍 Awesome. Yeah, in the pane, with more space, the longer form is nicer.
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.
Description of the Change
This shortens the "time ago". E.g.
2 hours agoto just2h.Mis used to differentiate from minutes.Alternate Designs
We could also use twitter or short date formatter plugin. These only have a short form under 1 week.
Benefits
Less space for the time ago, more space for the message + status icon or maybe refs.
Possible Drawbacks
Might not be too obvious what the short form means. But maybe still fine, Twitter and other apps use it too.
Applicable Issues
This PR is on top of #1322.