#7542:show creator and created date in respective card#7650
Conversation
grnd-alt
left a comment
There was a problem hiding this comment.
I am not sure we want to add this feature tbh. The information is already accessible, the creation date of the card is always displayed in the card details and the creator can be found out through the activity tab. I'd be open to add the created by like this:

this uses NcUserBubble from @nextcloud/vue for reference
|
Hej All, hi grnd-alt, |
|
@grnd-alt, ill also apply ownership point we talked about here too in this task. |
2cac2ef to
7b31377
Compare
|
🐢 Performance warning. |
grnd-alt
left a comment
There was a problem hiding this comment.
works but would be nicer to use the formatting instead of the string concatenation
src/components/card/CardSidebar.vue
Outdated
| return t('deck', 'Modified') + ': ' + this.relativeDate(this.currentCard.lastModified * 1000) + ' ⸱ ' + t('deck', 'Created') + ': ' + this.relativeDate(this.currentCard.createdAt * 1000) | ||
| let subtitle = t('deck', 'Modified') + ': ' + this.relativeDate(this.currentCard.lastModified * 1000) + ' ⸱ ' + t('deck', 'Created') + ': ' + this.relativeDate(this.currentCard.createdAt * 1000) | ||
| if (this.cardOwnerDisplayName) { | ||
| subtitle += ' ⸱ ' + t('deck', 'by') + ': ' + this.cardOwnerDisplayName |
There was a problem hiding this comment.
we should use formatting inside translations here so that translators can change the order like: modified this at
here's an example on how to use the formatting: https://github.com/nextcloud/server/blob/master/apps/dashboard/src/DashboardApp.vue#L229
|
🐢 Performance warning. |
src/components/card/CardSidebar.vue
Outdated
| }, | ||
| subtitleTooltip() { | ||
| return t('deck', 'Modified') + ': ' + this.formatDate(this.currentCard.lastModified) + '\n' + t('deck', 'Created') + ': ' + this.formatDate(this.currentCard.createdAt) | ||
| return this.buildSubtitleTooltip() |
There was a problem hiding this comment.
why have this in an extra method and not just in the computed?
There was a problem hiding this comment.
because of the previous comment about using proper translation formatting, i extracted the logic into separate methods for better readability, with the new changes the logic simplified enough to be moved back into the computed properties.
src/components/card/CardSidebar.vue
Outdated
| }, | ||
| methods: { | ||
| buildSubtitle() { | ||
| const modifiedDate = this.relativeDate(this.currentCard.lastModified * 1000) |
There was a problem hiding this comment.
I think we should remove this entire building code and just use the subname as a slot and not as a prop, that way we can use NcUserBubble to display the user with actual profile picture etc.
with <template #subname> you can render components inside the subname
src/components/card/CardSidebar.vue
Outdated
| const createdDate = this.formatDate(this.currentCard.createdAt) | ||
| const owner = this.cardOwnerDisplayName | ||
| const cardMeta = { | ||
| generic: t('deck', '{modified}: {modifiedDate}\n{created}: {createdDate}', |
There was a problem hiding this comment.
these translation strings don't need to be that modular, only actual variables should be in the {}.
like
t('deck', 'Modified: {modifiedDate}', {modifiedDate: modifiedDate})
same applies for the subtitle itself.
|
🐢 Performance warning. |
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
Signed-off-by: samin-z <samin.zavarkesh@gmail.com>
a125c2f to
4419ca0
Compare
|
🐢 Performance warning. |
Summary
Show more info regarding card like creator and date the card was created
TODO
Checklist