Commit Graph

167 Commits

Author SHA1 Message Date
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
Jacob Schatz 1bf2fe276f Merge branch 'reduce-contributions-calendar-payload' into 'master'
Reduce contributions calendar data payload

## What does this MR do?
Reduces the contributions calendar data payload by only passing contribution dates and counts

## Are there points in the code the reviewer needs to double check?
Please double check my javascript code 😃 

## Why was this MR needed?

Reduce user's bandwidth and decrease website loading time

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

## Screenshots (if relevant)
Before:
![Screen_Shot_2016-08-11_at_3.55.55_PM](/uploads/382842b3c889978bb302bd9057701ec3/Screen_Shot_2016-08-11_at_3.55.55_PM.png)
```
new Calendar(
  {"1439269200":0,"1439355600":0,"1439442000":0,"1439528400":0,"1439614800":0,"1439701200":0,"1439787600":0,"1439874000":0,"1439960400":0,"1440046800":0,"1440133200":0,"1440219600":0,"1440306000":0,"1440392400":0,"1440478800":0,"1440565200":0,"1440651600":0,"1440738000":0,"1440824400":0,"1440910800":0,"1440997200":0,"1441083600":0,"1441170000":0,"1441256400":0,"1441342800":0,"1441429200":0,"1441515600":0,"1441602000":0,"1441688400":0,"1441774800":0,"1441861200":0,"1441947600":0,"1442034000":0,"1442120400":0,"1442206800":0,"1442293200":0,"1442379600":0,"1442466000":0,"1442552400":0,"1442638800":0,"1442725200":0,"1442811600":0,"1442898000":0,"1442984400":0,"1443070800":0,"1443157200":0,"1443243600":0,"1443330000":0,"1443416400":0,"1443502800":0,"1443589200":0,"1443675600":0,"1443762000":0,"1443848400":0,"1443934800":0,"1444021200":0,"1444107600":0,"1444194000":0,"1444280400":0,"1444366800":0,"1444453200":0,"1444539600":0,"1444626000":0,"1444712400":0,"1444798800":0,"1444885200":0,"1444971600":0,"1445058000":0,"1445144400":0,"1445230800":0,"1445317200":0,"1445403600":0,"1445490000":0,"1445576400":0,"1445662800":0,"1445749200":0,"1445835600":0,"1445922000":0,"1446008400":0,"1446094800":0,"1446181200":0,"1446267600":0,"1446354000":0,"1446444000":0,"1446530400":0,"1446616800":0,"1446703200":0,"1446789600":0,"1446876000":0,"1446962400":0,"1447048800":0,"1447135200":0,"1447221600":0,"1447308000":0,"1447394400":0,"1447480800":0,"1447567200":0,"1447653600":0,"1447740000":0,"1447826400":0,"1447912800":0,"1447999200":0,"1448085600":0,"1448172000":0,"1448258400":0,"1448344800":0,"1448431200":0,"1448517600":0,"1448604000":0,"1448690400":0,"1448776800":0,"1448863200":0,"1448949600":0,"1449036000":0,"1449122400":0,"1449208800":0,"1449295200":0,"1449381600":0,"1449468000":0,"1449554400":0,"1449640800":0,"1449727200":0,"1449813600":0,"1449900000":0,"1449986400":0,"1450072800":0,"1450159200":0,"1450245600":0,"1450332000":0,"1450418400":0,"1450504800":0,"1450591200":0,"1450677600":0,"1450764000":0,"1450850400":0,"1450936800":0,"1451023200":0,"1451109600":0,"1451196000":0,"1451282400":0,"1451368800":0,"1451455200":0,"1451541600":0,"1451628000":0,"1451714400":0,"1451800800":0,"1451887200":0,"1451973600":0,"1452060000":0,"1452146400":0,"1452232800":0,"1452319200":0,"1452405600":0,"1452492000":0,"1452578400":0,"1452664800":0,"1452751200":0,"1452837600":0,"1452924000":0,"1453010400":0,"1453096800":0,"1453183200":0,"1453269600":0,"1453356000":0,"1453442400":0,"1453528800":0,"1453615200":0,"1453701600":0,"1453788000":0,"1453874400":0,"1453960800":0,"1454047200":0,"1454133600":0,"1454220000":0,"1454306400":0,"1454392800":0,"1454479200":0,"1454565600":0,"1454652000":0,"1454738400":0,"1454824800":0,"1454911200":0,"1454997600":0,"1455084000":0,"1455170400":0,"1455256800":0,"1455343200":0,"1455429600":0,"1455516000":0,"1455602400":0,"1455688800":0,"1455775200":0,"1455861600":0,"1455948000":0,"1456034400":0,"1456120800":0,"1456207200":0,"1456293600":0,"1456380000":0,"1456466400":0,"1456552800":0,"1456639200":0,"1456725600":0,"1456812000":0,"1456898400":0,"1456984800":0,"1457071200":0,"1457157600":0,"1457244000":0,"1457330400":0,"1457416800":0,"1457503200":0,"1457589600":0,"1457676000":0,"1457762400":0,"1457848800":0,"1457931600":0,"1458018000":0,"1458104400":0,"1458190800":0,"1458277200":0,"1458363600":0,"1458450000":0,"1458536400":0,"1458622800":0,"1458709200":0,"1458795600":0,"1458882000":0,"1458968400":0,"1459054800":0,"1459141200":0,"1459227600":0,"1459314000":0,"1459400400":0,"1459486800":0,"1459573200":0,"1459659600":0,"1459746000":0,"1459832400":0,"1459918800":0,"1460005200":0,"1460091600":0,"1460178000":0,"1460264400":0,"1460350800":0,"1460437200":0,"1460523600":0,"1460610000":0,"1460696400":0,"1460782800":0,"1460869200":0,"1460955600":0,"1461042000":0,"1461128400":0,"1461214800":0,"1461301200":0,"1461387600":0,"1461474000":0,"1461560400":0,"1461646800":0,"1461733200":0,"1461819600":0,"1461906000":0,"1461992400":0,"1462078800":0,"1462165200":0,"1462251600":0,"1462338000":0,"1462424400":0,"1462510800":0,"1462597200":0,"1462683600":0,"1462770000":0,"1462856400":0,"1462942800":0,"1463029200":0,"1463115600":0,"1463202000":0,"1463288400":0,"1463374800":0,"1463461200":0,"1463547600":0,"1463634000":0,"1463720400":0,"1463806800":0,"1463893200":0,"1463979600":0,"1464066000":0,"1464152400":0,"1464238800":0,"1464325200":0,"1464411600":0,"1464498000":0,"1464584400":0,"1464670800":0,"1464757200":0,"1464843600":0,"1464930000":0,"1465016400":0,"1465102800":0,"1465189200":0,"1465275600":0,"1465362000":0,"1465448400":0,"1465534800":0,"1465621200":0,"1465707600":0,"1465794000":0,"1465880400":0,"1465966800":0,"1466053200":0,"1466139600":0,"1466226000":0,"1466312400":0,"1466398800":0,"1466485200":0,"1466571600":0,"1466658000":0,"1466744400":0,"1466830800":0,"1466917200":0,"1467003600":0,"1467090000":0,"1467176400":0,"1467262800":0,"1467349200":0,"1467435600":0,"1467522000":0,"1467608400":0,"1467694800":0,"1467781200":0,"1467867600":0,"1467954000":0,"1468040400":0,"1468126800":0,"1468213200":0,"1468299600":0,"1468386000":0,"1468472400":0,"1468558800":0,"1468645200":0,"1468731600":0,"1468818000":0,"1468904400":0,"1468990800":0,"1469077200":0,"1469163600":17,"1469250000":0,"1469336400":0,"1469422800":3,"1469509200":14,"1469595600":54,"1469682000":0,"1469768400":4,"1469854800":1,"1469941200":0,"1470027600":0,"1470114000":0,"1470200400":1,"1470286800":0,"1470373200":1,"1470459600":0,"1470546000":0,"1470632400":0,"1470718800":0,"1470805200":0,"1470891600":2},
  '/u/root/calendar_activities'
);
```


After:
![Screen_Shot_2016-08-11_at_3.56.36_PM](/uploads/9325cdb8c0271075abee2a838c1a0787/Screen_Shot_2016-08-11_at_3.56.36_PM.png)

```
new Calendar(
  {"1469163600":17,"1469422800":3,"1469509200":14,"1469595600":54,"1469768400":4,"1469854800":1,"1470200400":1,"1470373200":1,"1470891600":2},
  '/u/root/calendar_activities'
);
```
## 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 !5784
2016-08-26 02:19:40 +00:00
Clement Ho a15e9f02b8 Reduce contributions calendar data payload 2016-08-25 16:00:39 -05:00
Clement Ho 82302b04fc Add hover color to emoji icon 2016-08-25 12:21:37 -05:00
Mike Greiling 33694a5a64 use gitlab global root url as canonical base url for all javascript set cookies (closes #20435) 2016-08-24 22:11:28 -05:00
Marc Dequènes (Duck) 31b2c1ef88 expose 'only_allow_merge_if_build_succeeds' project setting in the API 2016-08-24 17:11:48 +09:00
Jacob Schatz b06f9211b0 Merge branch 'lbennett/gitlab-ce-17465-search-for-project-with-cursor-keys' into 'master'
17465 Fixed dropdown cursor key navigation

## What does this MR do?
This MR fixes the use of cursor/arrow/enter key events with search dropdowns, allowing a user to navigate up and down the list with the arrow keys and then select their item with the enter key.
It also applies some *minor* scroll user experience fixes, such as resetting the selected dropdown item every time it opens/closes (also stops multiple dropdowns conflicting) and forcing the dropdown scroll to scroll right to the top or bottom depending on whether they have selected the first or last item, respectively.

## Are there points in the code the reviewer needs to double check?
I would like someone with GitLab experience to check over whether this would harm any unique implementations of the GitLabDropdown or SearchAutocomplete.

## Why was this MR needed?
The current version has incorrectly behaving search dropdowns in the navbar, they either do not navigate using the keyboard or do not use the enter keystroke to select a highlighted item.

## What are the relevant issue numbers?
Fixes #17465.
Closes #20752.
Closes #21014.
**Contributes** to #20754.

## Screenshots (if relevant)
![17465.mp4](/uploads/1145abec226036abbaaa4aa46020f52b/17465.mp4)

See merge request !4781
2016-08-19 19:36:47 +00:00
Phil Hughes d1b987fd05 Changed file name
Updated spec HAML
2016-08-19 15:36:49 +01:00
Phil Hughes bcf304b04a Changed tests to use JS tests 2016-08-19 15:27:18 +01:00
Luke Bennett 2f8fada6c0
Fixed conflicts 2016-08-18 23:46:23 +01:00
Douwe Maan 8b05e8c2d1 Merge branch 'master' into diff-line-comment-vuejs
# Conflicts:
#	db/schema.rb
2016-08-18 16:43:26 -05:00
Jacob Schatz 07989af1ef Merge branch '13664-abuse-report-page-should-have-a-maximum-width' into 'master'
Abuse Reports message truncation

## What does this MR do?

Adds dynamic message truncation to abuse reports

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

Is the new UI OK?

## Why was this MR needed?

Admin UX

## What are the relevant issue numbers?

Closes #13664.

## Screenshots (if relevant)

**UPDATED:**

![Screen_Shot_2016-07-07_at_03.02.43](/uploads/2e1a1122e0194f8ffa48054c18523ccd/Screen_Shot_2016-07-07_at_03.02.43.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
- [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)
Closes #13664

See merge request !5032
2016-08-18 20:24:28 +00:00
Jacob Schatz 2b487edc98 Merge branch '18334-truncate-award-emoji-users' into 'master'
Truncated long user lists in award emoji tooltips

## What does this MR do?
Truncates award emoji tooltips so that they only show 10 users maximum.

Further users are indicated by appending "and X more."

## Are there points in the code the reviewer needs to double check?
Is 10 too little, should it be raised?

My test cases rely on join() to build the expected output.
This feels a little iffy is it alright?

## Why was this MR needed?
Some issues have a large number of thumbs causing tooltips to be very large.

## What are the relevant issue numbers?
closes #18334, closes #19542

## Screenshots (if relevant)
##### Before
![Screenshot_from_2016-06-20_19-49-12](/uploads/d7a14dd87bb3da2acd7c0818de99852b/Screenshot_from_2016-06-20_19-49-12.png)

##### After
![Screenshot_from_2016-06-20_19-50-58](/uploads/f7f05c44594bfe8cec7dfd48802753a6/Screenshot_from_2016-06-20_19-50-58.png)

Truncation point modified for purposes of screenshot

## 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
- [x] 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 !4780
2016-08-18 20:04:18 +00:00
Luke Bennett 3e1e9b670f
Fixed specs 2016-08-18 18:17:56 +01:00
Luke Bennett 49c7ca2a27
Fixed spec and improved formatting 2016-08-18 18:17:56 +01:00
Luke Bennett f91fd18f25
Improved spec, waiting on sprockets-es6 to work with rspec.... 2016-08-18 18:17:56 +01:00
Luke Bennett dcf09a532b
Moved changes across to es5 and changed spec to es6 2016-08-18 18:17:56 +01:00
Luke "Jared" Bennett 1ac5f764ce
Fixed test turbolink condition 2016-08-18 18:17:56 +01:00
Luke Bennett b4398de5c5
Added new non-selectable selector exclusions to fix arrow key events, fixed the simulated clicking of a row and fixed the conflict between enter key form submit and enter key row selection
Added bootstrap dropdown event triggers to invoke the open and close methods of the dropdown, allowing for the binding of array key events

Added #17465 fix entry to CHANGELOG

Fixed multi-dropdown selected row index conflict

Fixed whitespace diff

Added padding to the dropdown content iterative scroll as well as new conditional scrolls to scroll all the way to the top when the first item of a list is selected and to scroll all the way to the bottom when the last item of a list is selected

Added conditionals to the enable and disable autocomplete methods to stop multiple invocations without any enabled/disabled state change

Fixes some incorrect firing of requests. The dropdown box was invoking a new query every time it closed and the GitLabDropdownRemote callback was invoking a new query which was causing the dropdown double render issue.

Added .selectable css class to dropdown list items that are not dividers or headers and altered selectors to account for that. Moved scroll padding Number to variable.

Removed unused method

Started Dropdown tests

Added fixture and began first test

Almost finished, navigation done, action and close needed

YAY. TESTS DONE.

Altered test and fixed click

started removing selectable class use

Fixed as reviewed

altered selection method

Fixed autocomplete shutting dropdown on arrow key use

patched XSS vulns

updated tests

f

Added click fixes
2016-08-18 18:17:56 +01:00
Jack Davison 6c1ed00afc Award tooltips refer to current user as "You" 2016-08-17 21:25:39 +01:00
Jack Davison 1fc17a8a43 Switch to using to_sentence to construct tooltips
* Code in ruby now uses Array#to_sentence to construct award tooltips

* Coffeescript uses a combination of regexes for the same result
2016-08-17 21:25:39 +01:00
Connor Shea d8654744cd
Merge branch 'master' into diff-line-comment-vuejs 2016-08-17 12:10:09 -06:00
Phil Hughes 7e4c70ec4c Fixed bug when moving list 2016-08-17 17:17:39 +01:00
Phil Hughes d0a49a6f3c Updated teaspoon mock tests endpoints 2016-08-17 17:17:39 +01:00
Phil Hughes 8d0ddbdb36 Updated rspec to not use sleep when dragging
Fixed JS tests
2016-08-17 17:17:39 +01:00
Phil Hughes d4387bd317 Fixed removing items from list 2016-08-17 17:17:39 +01:00