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
display date of comments [FIX #1021] #1283
Conversation
js/components/discussions/thread.vue
Outdated
@@ -148,7 +151,11 @@ export default { | |||
} else { | |||
this.$scrollTo(this); | |||
} | |||
}, | |||
formatDate(val) { | |||
return moment(val).format('LL') |
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.
Unfortunately as far as I'm concerned, we're not using StandardJS conventions, so I think we need a ;
here.
Screenshots? 🙇 |
I have added some missing semicolons in the other part of the template. After some thought, this certainly could be a global filter. |
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.
If you made sure it works on mobile too, 👌 for me.
@abulte there is a legacy |
It's not too bad as is. |
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.
A question.
@@ -97,10 +100,10 @@ export default { | |||
return `discussion-${this.discussion.id}`; | |||
}, | |||
createdDate() { | |||
return moment(this.discussion.created).format('LL') | |||
return moment(this.discussion.created).format('LL'); |
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.
Was it intended to modify this line to add a semicolon while the function formatDate
is added below with a very similar code:
return moment(val).format('LL');
Is it to avoid an indirection that formatDate
isn't used here ?
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.
(it's minor, I marked it as "change requested" to make it visible because I'm not sure of the etiquette of this repository yet, maybe a "comment" would have been more appropriate)
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.
yep it was intended but only to comply with @abulte comment about not using StandardJS (which promote not using semi).
The best workaround for this case would be to implement a global filter but I am still a bit shy about code impact.
Sorry I forgot to use the in-github squash option. |
No description provided.