Frontend: Remove `mixins/timeago.js` and move its logic to pipelines_list/time_ago.vue

Problem

Screen_Shot_2021-02-04_at_12.25.00_PM

The logic of our duration/"started at" column in the pipelines list is spread over two files:

  • app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue
  • app/assets/javascripts/vue_shared/mixins/timeago.js

Note: mixins/timeago.js is not used anywhere else. Actually this is widely used.

Proposal

Move the logic of the mixin into the component.

Bonus: durationFormatted() could be moved to datetime_utility.js to improve its testability and use a more functional approach.

Edited by Mark Nuzzo