Commit Graph

192 Commits

Author SHA1 Message Date
Fatih Acet b624e45126 Merge branch 'improve-build-scroll-controls-responsive-behaviour' into 'master'
Improved build page scroll UX

## What does this MR do?

This MR smoothes the UX of the builds page by more effectively affixing the scroll step buttons.

It also ensures the scroll step buttons are always in view, even if the sidemenu is open.

It also moves the autoscroll button into the same container as the scroll buttons.

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

## Why was this MR needed?

The build scroll buttons are always in unpredictable places and are often hidden behind sidemenus.

## Screenshots (if relevant)

![2016-09-08_17.43.58](/uploads/49cb9ad5ef2764453afaa405af7111b2/2016-09-08_17.43.58.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
- [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?

Contributes #21832

See merge request !6270
2016-11-08 21:41:48 +00:00
Fatih Acet 9eb9d05b45 Merge branch 'upgrade-timeago' into 'master'
Replace jQuery.timeago with timeago.js

## What does this MR do?
Replaces jQuery.timeago with [timeago.js](https://github.com/hustcc/timeago.js)

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

*  Check to make sure its working everywhere 😄 
*  Check to make sure the timeago wording matches what we have now (I think I've got this down but an extra pair of 👀 would help too)

## Why was this MR needed?

*  The jQuery.timeago version we have is outdated
*  timeago.js is smaller (7.19 KB => 4.52 KB)
* timeago.js has no jQuery dependency
* removes all inline javascript ⚔️  for timeago

## Screenshots (if relevant)
None

## 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 [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?
Closes #21793

See merge request !6274
2016-11-08 20:06:54 +00:00
Fatih Acet 5db9c791e5 Merge branch 'move-boards-interceptor' into 'master'
Move Ajax interceptor into describe block

## What does this MR do?

Move registering the Vue resource interceptor for issue board mock data into the corresponding `describe` blocks.

## Why was this MR needed?

Currently, the interceptor is registered for every test (which makes them at best fail for Ajax calls using Vue resource).

See merge request !7304
2016-11-08 14:00:34 +00:00
Clement Ho fa1ac47ef1 Replace jQuery.timeago with timeago.js 2016-11-07 14:49:00 -06:00
winniehell a09079219f Remove logging to console in diff_comments_store_spec 2016-11-05 12:41:36 +01:00
winniehell c16d5bcd48 Move Ajax interceptor into describe block (!7304) 2016-11-05 12:11:43 +01:00
Luke "Jared" Bennett 4f377364ad
Added new .eslintrc for jasmine tests and corrected build_spec 2016-11-04 15:25:22 +00:00
Jared Deckard dd45c5e11e
Add javascript unit tests for Build
Move comments to the correct location

Remove array extension usage

Move build options to fixture to match view
2016-11-04 15:07:51 +00:00
Alfredo Sumaran 055e2ac293 Move jquery.timeago to vendor directory 2016-11-03 16:13:35 -05:00
Bryce Johnson d939fbed09 Change show-gl-field-errors to gl-show-field-errors 2016-11-02 11:35:21 +01:00
Bryce Johnson 93bd3dd8a8 Upgrade gl_field_errors to support more use cases. 2016-11-01 16:48:37 +01:00
Bryce Johnson 5fb226a934 Remove leftover references to coffeescript from comments and docs. 2016-10-31 11:39:52 +01:00
Ido Leibovich 3acfbcaea0 Do not allow text input in dropdown while loading
While loading, the entire dropdown is greyed out. However, The focus is on the text input, so user can input text. Move the focus event to after loading finished to fix this.
2016-10-28 23:26:33 +03:00
Robert Speicher 144358e98e Merge branch 'issue-board-welcome-cookie-monster' into 'master'
Delete issue board welcome cookie

## What does this MR do?

This was seen in the idea to production demo, because the project had already existed on the exact same URL the cookie already existed which meant the blank state wasn't shown. 

This MR deletes the cookie on project create.

See merge request !6899
2016-10-28 14:16:53 +00:00
Phil Hughes 07e4ffd708 Fixed boards store spec 2016-10-28 13:54:36 +01:00
winniehell 0f060bf4fc Replace static issue fixtures by script (!6059) 2016-10-28 14:02:17 +02:00
winniehell 8afc287330 Clean up issue_spec.js 2016-10-28 14:02:17 +02:00
Luke Bennett 4efaeb5668
Replaced jquery.cookie with js.cookie 2016-10-27 21:33:16 +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
Clement Ho f610f69ab9 Add todo toggle event 2016-10-26 16:28:56 -05:00
winniehell 02f94cf038 disable ESLint for all JavaScript files 2016-10-26 10:02:58 +02: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
Mike Greiling f8520f5d09 remove manual Cookie.set "path" option in favor of global setting 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
Bryce Johnson 06564f9e04 Update gl_field_error tests for better input filtering. 2016-10-20 12:47:32 +02:00
Bryce Johnson 69f9c00cfb Add tests for gl_field_errors. 2016-10-15 08:28:52 +02:00
Bryce Johnson 1dd826d4aa Make UX upgrades to SignIn/Register views.
- Tab between register and sign in forms
- Add individual input validation error messages
- Validate username
- Update many styles for all login-box forms
2016-10-15 08:27:21 +02:00
Fatih Acet 05762f449e Merge branch 'mr-tabs-affix' into 'master'
Merge request tabs stick when scrolling page

## What does this MR do?

When scrolling merge requests this sticks the tabs to below the navigation for easy access.

## Screenshots (if relevant)

![sticky](/uploads/372a9889c50e9f85fef475cbee110ec1/sticky.gif)

## What are the relevant issue numbers?

Closes #20548

See merge request !6382
2016-10-14 20:57:21 +00:00
Luke Bennett 4b40027b50 Fixed conflict and corrected teaspoon test 2016-10-14 11:07:01 +02:00
Luke Bennett 58368fbc53 Moved ci_status environments logic to new action ci_envrionments_status and set up frontend polling 2016-10-14 11:07:01 +02:00
Z.J. van de Weg 6a4f710083 Show what time ago a MR was deployed 2016-10-14 11:07:00 +02:00
Phil Hughes 53b3c62e0f Fixed JS tests 2016-10-11 16:07:53 +01:00
Brennan Roberts f3c55164d2
Prevent conflict b/w search field and its dropdown
Stop the global search form's default "action" from fighting with
dropdown items when using the keyboard to navigate the dropdown.
`e.preventDefault()` is now called on the enter key when a dropdown item
is already selected.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-10 10:16:09 +02:00
Phil Hughes 8962a3359c Fixed merge request tab JS spec 2016-10-06 10:17:34 +01:00
Clement Ho b4d614bdbc Fix inconsistent highlighting of already selected activity nav-links 2016-10-05 15:38:18 -05:00
Bryce Johnson 4721766619 Fix test for SearchAutocomplete. 2016-10-05 11:25:04 +02:00
Phil Hughes b13213e6be Send ajax request for label update only if they are changed (#19472 !5071) 2016-09-27 10:23:15 -05:00
Robert Speicher 516100c55b Merge branch 'add-remember-option-u2f' into 'master'
Pass the remember_me option into the u2f form and support it while authenticating

## What does this MR do?

Adds remember me support in the u2f authentication, and makes sure the flag gets passed from the login form to the u2f form.

Based on the changes for the same thing done for regular 2fa: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4369

## Why was this MR needed?

The remember me option wasn't working for u2f devices (yubikey)

## What are the relevant issue numbers?

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

See merge request !5918
2016-09-09 18:42:11 +00:00
Jared Deckard 913857e577 Require comments must be included before code 2016-09-08 14:07:27 -05:00
Jared Deckard 7f6474b269 Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
Fatih Acet 13a91b560e Merge branch 'fix-textarea-expansion' into 'master'
Add textarea autoresize after comment

## What does this MR do?
Adds an autoresize after a comment is posted

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

## Why was this MR needed?
To keep the UI consistent (the same as if you were to refresh it)

## Screenshots (if relevant)
Before:
![IyCczzXfaf](/uploads/2229bad47e3f3821f1efaa6868a52025/IyCczzXfaf.gif)

After:
![E6O0kRBrJq](/uploads/4aec6b436ff172ba281c2c2a4481906d/E6O0kRBrJq.gif)

## 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 [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?
Closes #21667

See merge request !6152
2016-09-07 20:17:00 +00:00
Clement Ho d8d699ff17 Convert datetime coffeescript spec to ES6 2016-09-01 21:09:47 -05:00
DJ Mountney 9224f031cf Pass the remember_me option into the u2f form and support it while authenticating
Matches the changes done for non-u2f two-factor auth
2016-09-01 17:11:42 -07:00
Fatih Acet f90c6a24b4 Merge branch 'issue-boards-issues-total-count' into 'master'
Add the total number of issues in the JSON response in issue board lists

## What does this MR do?

Add the total number of issues in the JSON response in issue board lists

## Why was this MR needed?

The issue board lists should always show the total number of issues in the list, not the current amount fetched by endless scroll.

Closes #21327

See merge request !5904
2016-09-01 21:32:44 +00:00
Clement Ho e7b0334cfb Add textarea autoresize after comment 2016-09-01 13:57:07 -05:00
Fatih Acet 35bcf73413 Merge branch 'improve-application_spec' into 'master'
Check for existance of elements under test in application_spec.js

## What does this MR do?

Checks that the elements under test in `application_spec.js` actually exist.

## Why was this MR needed?

```
$ echo 'just garbage' > spec/javascripts/fixtures/application.html.haml 
$ bundle exec teaspoon spec/javascripts/application_spec.js 
2 examples, 0 failures
```

See merge request !6051
2016-08-31 20:19:08 +00:00
Phil Hughes 105c80b6be Shows count at bottom of list
Only visible when scrollable area is larger than height
2016-08-31 09:47:25 +01:00
Phil Hughes 19c9ee4752 Added search for all lists on issue boards
Closes #21139
2016-08-30 10:32:19 +01:00
winniehell bfd14f8763 Check for existence of elements under test in application_spec.js (!6051) 2016-08-26 10:57:59 +02:00