Deprecation of ActionView's time_ago_in_words
What does this MR do?
Replaces ActionView's time_ago_in_words with GitLab's homemade time_ago_with_tooltip as possible.
Are there points in the code the reviewer needs to double check?
How can we warn developers it when they add time_ago_in_words
?
Note: there are still four occurrences of time_ago_in_words
:
$ git grep -n time_ago_in_words -- app
app/helpers/milestones_helper.rb:124: time_ago = time_ago_in_words(date)
app/helpers/runners_helper.rb:13: title: "Runner is #{status}, last contact was #{time_ago_in_words(runner.contacted_at)} ago"
app/serializers/entity_date_helper.rb:8: distance_of_time_in_words(Time.now, diff, scope: 'datetime.time_ago_in_words')
app/serializers/entity_date_helper.rb:52: time_ago = time_ago_in_words(entity.due_date)
Why was this MR needed?
This can improve performance as time_ago_in_words
prevents caching components.
Screenshots (if relevant)
Too many to show here.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary - [n/a] Documentation created/updated
- [n/a] API support added
-
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend - [n/a] Has been reviewed by Backend
- [n/a] Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered - [n/a] End-to-end tests pass (
package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #45761 (closed)