Commit Graph

3040 Commits

Author SHA1 Message Date
Sean McGivern f4fed44f67 Merge branch '22392-add-x-of-y-tasks-completed-on-issuable' into 'master'
add "x of y tasks completed" on issuable

Closes #22392

See merge request !6527
2016-10-28 17:55:18 +00:00
Guilherme Salazar 32913b74b8 add "x of y tasks completed" on issuable
fix issues pointed out in !6527

add task completion status feature to CHANGELOG
2016-10-28 14:01:36 -02:00
Phil Hughes a2e9bc3584 Delete issue board welcome cookie when project is new 2016-10-28 13:54:36 +01:00
winniehell 4060807719 Enable linting for ES6 files 2016-10-27 21:35:07 +02:00
Fatih Acet f879319840 Merge branch 'add-todo-toggle-event' into 'master'
Add todo toggle event

## What does this MR do?
Adds a custom jQuery event `todo:toggle` to detect when a new todo is added so that the respective todo counters (header navigation and sidebar) can update as needed

## Are there points in the code the reviewer needs to double check?

*  I wasn't sure whether each `spec` should be modularized based on the html templates or whether they should be separated based on function. There are some crossovers between the `dashboard_spec` and the `header_spec`.
* The naming conventions for `sidebar` and `right_sidebar` were a little confusing since they were named the opposite in their `specs`. I made a few assumptions and named a few files based on what I thought they should be named. I'd be happy to change it to something else though 😄  

## Why was this MR needed?
This resolves an existing issue where the todo count on the sidebar would not update (until refresh) and refactors the existing methods that are used to update the todo counters (header navigation and sidebar)

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

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] Added for this feature/bug
  - [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 !5724
2016-10-27 13:28:40 +00:00
Phil Hughes daec00a753 Create new list dropdown stays open after new list
Closes #22852
2016-10-27 12:01:05 +01:00
Clement Ho f610f69ab9 Add todo toggle event 2016-10-26 16:28:56 -05:00
Fatih Acet dd5e46ab69 Merge branch 'eslint' into 'master'
Add ESLint

## What does this MR do?

- create `package.json`
- add ESLint dependencies to `package.json`
- add JavaScript linting to CI
- add Rake task `lint:javascript`as alias for `eslint` (which itself is an alias for `npm run eslint`)

## Are there points in the code the reviewer needs to double check?

Probably not.

## Why was this MR needed?

My hovercraft was full of eels.

## What are the relevant issue numbers?

- https://gitlab.com/gitlab-org/gitlab-ce/issues/13224#note_12537431
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5006#note_13255658


See merge request !5445
2016-10-26 16:31:08 +00:00
Jack Davison 728f1f71a5 Refactored less readable existance checks
CoffeeScript generated JavaScript contains some unreadable
expressions. This refactoring addresses complex uses of
the exestential operator that produced unreadable Javascript.
2016-10-26 14:22:53 +01:00
Fatih Acet a66a3c7449 Merge branch 'issue-board-sidebar' into 'master'
Issue board sidebar

## What does this MR do?

Adds a sidebar when clicking an issue in the issue boards lists. This allows user to easily update other parts of the issue details without having to visit the issue itself. Same functionality as on issue page.

When creating a new issue the sidebar automatically opens.

## Screenshots (if relevant)

![Screen_Shot_2016-10-07_at_13.10.16](/uploads/ad08785f407d8ac3fe9cb078868a7839/Screen_Shot_2016-10-07_at_13.10.16.png)

## What are the relevant issue numbers?

Closes #21219

See merge request !6690
2016-10-26 12:31:09 +00:00
Fatih Acet b0e6fc1265 Merge branch '21248-wrong-urlencoding-when-switching-branch-in-graphs-contributers' into 'master'
Fix refs dropdown selection with special characters

## What does this MR do?

Remove unneeded encode from the project-refs-dropdown renderRow method.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

## Screenshots (if relevant)

![2016-10-23_01.20.19](/uploads/1f176b2aa633093851799ae9f70f116b/2016-10-23_01.20.19.gif)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


Closes #21248

See merge request !7061
2016-10-26 12:12:10 +00:00
Airat Shigapov 45bfff3d66 Escape quotes in gl_dropdown values to prevent exceptions 2016-10-26 12:09:04 +01:00
winniehell 02f94cf038 disable ESLint for all JavaScript files 2016-10-26 10:02:58 +02:00
Phil Hughes a2eff1a8e5 Merge branch 'master' into issue-board-sidebar 2016-10-26 08:47:09 +01:00
Alfredo Sumaran 052480ae53 Merge branch 'replace-jquery-cookie-plugin' into 'master'
Replace jquery-cookie plugin with js-cookie

## What does this MR do?

Removes an outdated and unmaintained dependency [jquery.cookie](https://github.com/carhartl/jquery-cookie) with its successor [js.cookie](https://github.com/js-cookie/js-cookie) which is not dependent on jQuery.

Also this MR adds a global default cookie `path` setting which defaults to the GitLab root directory.  Now, setting a cookie to any path other than `gon.relative_url_root` requires an explicit opt-out.  This is a sensible default and should prevent accidental omission going forward.

## Are there points in the code the reviewer needs to double check?

Double check that all instances of `$.cookie(x)` have been replaced by `Cookies.get(x)` and all instances of `$.cookie(x, y, z)` are replaced with `Cookies.set(x, y, z)`.  All javascripts which set or retrieve cookie values should function just as before.

## Why was this MR needed?

One more step toward shaking off jQuery as a dependency (#23022), also [jquery.cookie](https://github.com/carhartl/jquery-cookie) is no longer maintained and hasn't seen an update in 2+ years.

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- Tests
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

#23022

See merge request !7085
2016-10-26 01:28:10 +00:00
Fatih Acet 74c0e75866 Merge branch 'itchy-trigger-finger-on-issues-search' into 'master'
Make issues search less finicky

## What does this MR do?

1. Tracks issues search pristine-ness, to ignore non-mutating keyups.
2. Increase debounce wait on issues search execution from 500ms to 1000ms.
3. Ensures issues search retains focus after search execution

Note: Issues search is being overhauled (https://gitlab.com/gitlab-org/gitlab-ce/issues/21747), so most (if not all) of these changes will no longer be used. But given that the overhaul has been pushed back a release (8.14?), it makes sense to do some quick fixes to improve UX in the meantime.

## Are there points in the code the reviewer needs to double check?

Will adding autofocus to the search input create unforeseen problems?

## Why was this MR needed?

- At the moment, issues search is run on any keyup, even if search terms remain the same. This is an oversight that is both a tax on servers and an annoyance to users. 

- Searches are executed pretty quickly after a gap in keyups. It's too fast according to internal and enterprise customer feedback.

- Focus is lost when a search is conducted, so you have to either tab to (any sane person would not do this, given our tab order) or reach for the mouse and select the input again. 

These are all pretty heavily complained about issues that are, to quote community users, "rage-inducing" and "major accessibility issue[s]".

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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)

## What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/21503
https://gitlab.com/gitlab-org/gitlab-ce/issues/21984
https://gitlab.com/gitlab-org/gitlab-ce/issues/21597

See merge request !6735
2016-10-25 18:34:52 +00:00
Alfredo Sumaran 739cb05228 Merge branch 'temporarily-revert-appending-templates-before-long-term-ux-fix' into 'master'
Stop appending templates - Temporary fix

## What does this MR do?

This is the temporary fix for #23315. This stops the templates appending to any existing text.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

Temporary fix for #23315.

## Screenshots (if relevant)

![2016-10-21_21.58.55](/uploads/ba54d89fcb2fb9cf99ff24c8623ae413/2016-10-21_21.58.55.gif)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request !7050
2016-10-25 15:28:59 +00:00
Alfredo Sumaran 926b2fb730 Merge branch 'tidy-up-pipeline-js' into 'master'
Tidied up pipelines.js.es6 and removed jQuery where acceptable.

## What does this MR do?

A week or so ago, I made some changes to `pipeline.js` as it was a single function and we now needed to expand on the JS logic for pipelines. I decided to turn it into `class Pipelines` of `pipelines.js.es6`. To avoid review confusion I held back from changing the pre-existing function so it dealt with instance members. Every time you click the button it would re-query all the elements it needed, now its a class it doesn't need that as we can store the required elements on construction.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request !6950
2016-10-25 15:23:35 +00:00
Phil Hughes 079d146278 Fixed users profile link in sidebar
Fixed new labels not being created

Fixed scrolling issues
2016-10-25 13:16:22 +01:00
Linus G Thiel cc8ebae527 Merge branch 'master' into 22743-issue-tooltip-will-not-disappear-going-back-to-previous-page 2016-10-25 13:14:16 +02:00
Bryce Johnson f1bb7ddfa7 Ensure search val is defined. 2016-10-25 12:46:28 +02:00
Bryce Johnson 995d4df151 Ensure cursor is applied to end of issues search input. 2016-10-25 11:11:11 +02:00
Bryce Johnson e0a79ab4e8 Increase debounce wait on issues search execution. 2016-10-25 11:11:11 +02:00
Fatih Acet 2f470a6262 Merge branch 'scope-input-errors' into 'master'
Stop injecting field errors where they won't be used.

## What does this MR do?

Filters the form elements which gl_field_errors validates, excluding input types button, submit and checkbox.

## Why was this MR needed?

This won't make a difference in UX, but I just noticed that we are currently validating and injecting errors into the DOM for all non-hidden inputs. Doing so is unnecessary, and could introduce performance problems on forms with larger numbers of inputs.

## Does this MR meet the acceptance criteria?

- [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !6929
2016-10-25 08:42:10 +00:00
Mike Greiling f8520f5d09 remove manual Cookie.set "path" option in favor of global setting 2016-10-24 18:09:00 -05:00
Mike Greiling 1c0213f28e set default path for all calls to Cookies.set() 2016-10-24 18:09:00 -05:00
Mike Greiling 67d2b2acb3 replace jquery.cookie vendor script with js.cookie 2016-10-24 18:09:00 -05:00
Alfredo Sumaran c99d12e5b3 Merge branch '23325-pipeline-graph-hidden' into 'master'
Fix pipeline graph hidden on commit and mr pages

## What does this MR do?

Dynamically invokes `new gl.Pipelines();` when an MR `builds` tab is clicked.

Dispatches `new gl.Pipelines();` on a `commit#builds` page.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

The pipeline graph was hidden on commit and mr pages

## Screenshots (if relevant)

Commit page:
![Screen_Shot_2016-10-14_at_18.16.18](/uploads/ee11dea0825d1489dc167292e16c8f41/Screen_Shot_2016-10-14_at_18.16.18.png)

MR:
![Screen_Shot_2016-10-14_at_18.16.39](/uploads/602c2fce2397c799bedb757bfd3010af/Screen_Shot_2016-10-14_at_18.16.39.png)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


Closes #23325

See merge request !6895
2016-10-24 19:27:18 +00:00
Luke Bennett 3ea3a6a152 invoked the pipelines class when builds are dynamically loaded and dispatched for commit builds page 2016-10-24 13:20:37 -05:00
Luke Bennett b4a9247f7e Replaced deprecated use of document.body.scrollTop 2016-10-24 12:56:22 -05:00
Dmitriy Zaporozhets bedbb7b744 Refactor js that disable form submit if no members selected
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-10-24 13:14:00 +03:00
Linus G Thiel 036fac06d1 Gracefully handle adding of no users to projects and groups
- Disable {project, group} members submit button if no users

  If no users are selected, the submit button should be disabled.

- Alert user when no users were added to {project, group}.

  When no users were selected for adding, an alert message is
  flashed that no users were added.

- Also, this commit adds a feedback when users were actually added to a
  project, in symmetry with how group members are handled.

Closes #22967, #23270.
2016-10-24 13:14:00 +03:00
Luke Bennett eed4b2c5c4
Remove encode from the project-refs-dropdown renderRow method 2016-10-23 01:22:03 +01:00
Fatih Acet 7dd21a8bfd Merge branch '22892-cycle-analytics-date-filter-is-not-working' into 'master'
Resolve "Cycle analytics date filter is not working"

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22892

See merge request !6906
2016-10-22 09:39:55 +00:00
Luke Bennett 7664c76a16
Removed append logic
Updated test
2016-10-21 21:53:10 +01:00
Alfredo Sumaran 1a53511a34 Fix object data to be sent to fetch analytics data 2016-10-21 15:46:59 +03:00
Luke Bennett 599f1cb023
converted last method to jQuery 2016-10-20 22:18:39 +01:00
Luke "Jared" Bennett c1be12d0fc
Tidied up pipelines.js.es6 and removed jQuery where acceptable. 2016-10-20 21:09:44 +01:00
Linus G Thiel 1ff140ea38 Close any open tooltips before page:fetch 2016-10-20 21:01:37 +02:00
Phil Hughes a28371dbe3 Fixed issue when images are loading it would push off the tabs 2016-10-20 19:34:35 +01:00
Phil Hughes 4e03f4c406 Fixed issues with sticky mr tabs & sidebar
Closes #23504
2016-10-20 19:34:35 +01:00
Alfredo Sumaran 3bace66970 Create protected branches bundle 2016-10-20 12:03:30 -05:00
Bryce Johnson 5f0b7fe429 Stop injecting field errors where they won't be used. 2016-10-20 11:31:03 +02:00
Phil Hughes 29645f06e7 Hides/shows the boards sidebar
Rather than constructing & then deconstructing, we know just hide & show
the sidebar. This is done so we dont' have a memory leak on the frontend
with objects getting created.
2016-10-20 08:54:33 +01:00
Phil Hughes fcf0a4a12d Merge branch 'master' into issue-board-sidebar 2016-10-19 22:33:34 +01:00
Phil Hughes cd5e83b6d6 Scroll board into view when clicking issue
Changed return statement instead of if
Delete objects after issue is closed
2016-10-19 22:26:51 +01:00
Fatih Acet 4deafb9e2e Merge branch '23375-filtering-on-any-label-or-no-label-does-not-work' into 'master'
Fix 'No label' and 'Any label' filters

## What does this MR do?

Returns the `title`as the `id` for `No label`.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

Label filters not working as expected

## Screenshots (if relevant)

![2016-10-19_04.58.08](/uploads/3b079bf28299c1155e0243171ac008f6/2016-10-19_04.58.08.gif)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


Closes #23375

See merge request !6974
2016-10-19 21:18:19 +00:00
Douglas Barbosa Alexandre 52e0c3b565 Add CRUD for Group Labels 2016-10-19 14:57:15 -02:00
Rémy Coutable f0c7e6713f Merge branch '22191-delete-dynamic-envs-mr' into 'master'
Delete dynamic environments

- Adds "close environment" action to a merge request
- Adds tabs to environments list
- Adds close button to each environment row in environments list
- Replaces Destroy button with Close button inside an environment
- Adds close button to builds list inside an environment

#### Configuration

In order to enable stopping environments a valid `.gitlab-ci.yml` syntax has to be used:

```
review:
  environment:
    name: review/$app
    on_stop: stop_review

stop_review:
  script: echo Delete My App
  when: manual
  environment:
    name: review/$app
    action: stop
```

This MR requires that `stop_review` has to have: `when`, `environment:name` and `environment:action` defined.
The next MR after this one will verify that and enforce that these settings are configured.

It will also implicitly configure these settings, making it possible to define it like this:

```
review:
  environment:
    name: review/$app
    on_stop: stop_review

stop_review:
  script: echo Delete My App
```

Closes #22191 

See merge request !6669
2016-10-19 07:53:05 +00:00
Phil Hughes f1350a5c82 Merge branch 'master' into issue-board-sidebar 2016-10-19 08:44:55 +01:00