Skip to content

Time tracking front end

username-removed-408230 requested to merge fe-time-tracking into master

What does this MR do?

This MR is a 99% complete version of the front-end for the issuable timetracking feature.

Specifically, it:

  1. instantiates a new Vue component (<time-tracking>) in the issuable sidebar
  2. initializes polling for issuable data
  3. introduces an abstraction for pubsub against a vue resource (SubbableResource)
  4. introduces a class for configuring and controlling setInterval (SmartInterval)
  5. introduces a custom Vue directive for forcing Bootstrap tooltips to update dynamically

Other important notes for reviewers

This feature was written with future improvements to Issuable pages in mind. At this point, it will be fairly straightforward to:

  1. move the parent Vue instance to the top of the sidebar
  2. refactor Issuable sidebar blocks into Vue components
  3. update them automatically against a shared IssuableResource

Pre-compiled templates were avoided and initialization is still handled from the script tags in the DOM for the time being. It seemed to me that making such architectural improvements should happen with the rest of the sidebar blocks, which are not EE-specific.

A few notes on integration with the backend:

There are a number of pieces that were difficult to finalize without actual integration with the backend. There will be a new MR to work out integration issues soon.

At this point, I need feedback on the code, with the assumption that some things don't work yet. We'll need to do another round of review and testing once the backend has been merged in.

Items to resolve after integration with backend:

  • remove all mocking code
  • moving code for the parent Vue instance to a separate file, initializing from the DOM
  • subscribe to updates from successful gfm note submission
  • properly wire up Vue component unit test
  • properly instantiate time-tracking component props
  • ensure polling is configured for desired UX

Designs: https://gitlab.com/gitlab-org/gitlab-design/tree/master/progress/taurie/time-tracking

Demo: 2016-11-09_13.46.39

Merge request reports