Skip to content

fix: do not count up seconds in relative times - #8786

Open
jancborchardt wants to merge 1 commit into
mainfrom
fix/relative-time-no-seconds
Open

jancborchardt wants to merge 1 commit into
mainfrom
fix/relative-time-no-seconds

Conversation

@jancborchardt

Copy link
Copy Markdown
Member
  • Resolves: #
  • Target version: main

Summary

Feedback from Elias: "When a card is marked as done, the status counts up the seconds since it was completed. This feels stressful."

Having seconds be counted does not look or feel the best. Like on Android, it now shows:

  • "seconds ago" for the first minute
  • "x min. ago" within the first hour
  • then "x hr. ago"

It only updates once per minute instead of every second. This uses the ignoreSeconds and relativeTime: 'short' options of useFormatRelativeTime from @nextcloud/vue, for the card badge, the sidebar created/modified times, comments and attachments.

Before After
Before, light After, light
Before, dark After, dark

TODO

  • Do not count up seconds in relative times

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
@benjaminfrueh

Copy link
Copy Markdown
Contributor

@jancborchardt the changes looks good to me, but the cypress test failure seems to be related to this change.
With relativeTime: 'short' the due date badge now shows "in 21 hr." instead of "in 21 hours". So the assertion here fails:

cy.get(`.card:contains("${newCardTitle}")`).find('[data-due-state="Now"]').should('be.visible').should('contain', '21 hours')

I think we need to change it to:

cy.get(`.card:contains("${newCardTitle}")`).find('[data-due-state="Now"]').should('be.visible').should('contain', '21 hr.')

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 🏗️ At engineering

Development

Successfully merging this pull request may close these issues.

4 participants