Commit 46b5fc2c authored by Fatih Acet's avatar Fatih Acet

Merge branch 'remove-redundant-js-timeago-pending' into 'master'

Remove redundant js-timeago-pending from user activity log

## What does this MR do?
Enables the `skip_js` feature of `time_ago_with_tooltip()` since the frontend was already re-initializing `timeago` on all the elements after it received the data from the backend.

## Are there points in the code the reviewer needs to double check?
Shouldn't be

## Why was this MR needed?

*  Reduces bandwidth usage (Reduced by ~3.1kb)
*  Removes redundant code
*  Happy DOM 🎈 

## What are the relevant issue numbers?
Closes #21063 

## Screenshots (if relevant)
Before (DOM):
![Screen_Shot_2016-08-18_at_11.14.18_AM](/uploads/8be02cff27e452670988db8ff54bd57c/Screen_Shot_2016-08-18_at_11.14.18_AM.png)

After (DOM):
![Screen_Shot_2016-08-18_at_11.26.51_AM](/uploads/a0c5cbcd4c7b8e524a848b50dbd88c55/Screen_Shot_2016-08-18_at_11.26.51_AM.png)

Before (Bandwidth):
![Screen_Shot_2016-08-18_at_11.28.24_AM](/uploads/c37de0b398d7c66770f1def1777ca11a/Screen_Shot_2016-08-18_at_11.28.24_AM.png)

After (Bandwidth):
![Screen_Shot_2016-08-18_at_11.29.49_AM](/uploads/dc21719b965df1e73c868470447a1b20/Screen_Shot_2016-08-18_at_11.29.49_AM.png)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5871
parents bfdfd3ec eba02436
...@@ -31,6 +31,7 @@ v 8.12.0 (unreleased) ...@@ -31,6 +31,7 @@ v 8.12.0 (unreleased)
- Add last commit time to repo view (ClemMakesApps) - Add last commit time to repo view (ClemMakesApps)
- Added project specific enable/disable setting for LFS !5997 - Added project specific enable/disable setting for LFS !5997
- Don't expose a user's token in the `/api/v3/user` API (!6047) - Don't expose a user's token in the `/api/v3/user` API (!6047)
- Remove redundant js-timeago-pending from user activity log (ClemMakesApps)
- Added tests for diff notes - Added tests for diff notes
- Add a button to download latest successful artifacts for branches and tags !5142 - Add a button to download latest successful artifacts for branches and tags !5142
- Remove redundant pipeline tooltips (ClemMakesApps) - Remove redundant pipeline tooltips (ClemMakesApps)
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
} }
Activities.prototype.updateTooltips = function() { Activities.prototype.updateTooltips = function() {
return gl.utils.localTimeAgo($('.js-timeago', '#activity')); return gl.utils.localTimeAgo($('.js-timeago', '.content_list'));
}; };
Activities.prototype.reloadActivities = function() { Activities.prototype.reloadActivities = function() {
......
- if event.visible_to_user?(current_user) - if event.visible_to_user?(current_user)
.event-item{ class: event_row_class(event) } .event-item{ class: event_row_class(event) }
.event-item-timestamp .event-item-timestamp
#{time_ago_with_tooltip(event.created_at)} #{time_ago_with_tooltip(event.created_at, skip_js: true)}
= cache [event, current_application_settings, "v2.2"] do = cache [event, current_application_settings, "v2.2"] do
= author_avatar(event, size: 40) = author_avatar(event, size: 40)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment