Skip to content
Snippets Groups Projects

Time tracking front end

Closed 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Added 5 commits:

    • d13ace13 - Prefer plain JS to abbreviate-time filter.
    • 003385cb - Add stopwatch svg and clean up icon use.
    • 5292f0c0 - Temporarily remove loading flags.
    • c480584c - Add stopwatch svg file.
    • 95ff5a33 - Remove mock data and wrapper until backend is clear.

    Compare with previous version

  • Added 1 commit:

    • 574b2f22 - Follow SRP, move SmartInterval out of SubbableResource.

    Compare with previous version

  • Added 1 commit:

    • 687959b6 - Bind time-tracking props to real values.

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading