Skip to content
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

Fix relative time indication for submission history #4498

Merged
merged 2 commits into from
Mar 21, 2023

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Mar 21, 2023

This pull request fixes the relative time indication shown on the submission detail page.

The goal of this more custom version of time_ago_in_words was to avoid to many different groupings for recent submissions.
But I grouped to many times under today. Introducing yesterday fixes this.

image

  • Tests were added

Closes #4490

@jorg-vr jorg-vr added the bug Something isn't working label Mar 21, 2023
@jorg-vr jorg-vr self-assigned this Mar 21, 2023
t 'time.yesterday'
else
# need to use I18n.t here because the minitest helper dos not support kwargs yet for t
I18n.t 'time.ago', time: time_ago_in_words(time)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a pr on minitest-utils to fix the need for this: fnando/minitest-utils#15

@jorg-vr jorg-vr marked this pull request as ready for review March 21, 2023 09:51
@jorg-vr jorg-vr requested a review from a team as a code owner March 21, 2023 09:51
@jorg-vr jorg-vr requested review from bmesuere and niknetniko and removed request for a team March 21, 2023 09:51
@jorg-vr jorg-vr merged commit 51f29e7 into develop Mar 21, 2023
@jorg-vr jorg-vr deleted the fix/submission-time-indication branch March 21, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confusing time indication on submission page
3 participants