Commit Graph

55 Commits

Author SHA1 Message Date
winniehell 0f060bf4fc Replace static issue fixtures by script (!6059) 2016-10-28 14:02:17 +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
Bryce Johnson 69f9c00cfb Add tests for gl_field_errors. 2016-10-15 08:28:52 +02:00
Clement Ho b4d614bdbc Fix inconsistent highlighting of already selected activity nav-links 2016-10-05 15:38:18 -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
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
Clement Ho e7b0334cfb Add textarea autoresize after comment 2016-09-01 13:57:07 -05:00
Clement Ho 82302b04fc Add hover color to emoji icon 2016-08-25 12:21:37 -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 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
Luke Bennett 673806a29e
Some more styling tweaks and added jasmine test 2016-08-14 00:54:18 +01:00
Fatih Acet aaa9509d12 ES6ify all the things! 2016-07-24 23:45:11 +03:00
winniehell 2886ebfb13 Remove `pinTo` from `Flash` and make inline flash messages look nicer (!4854) 2016-06-30 23:53:22 +02:00
Phil Hughes 3e058a9f09 Fixed award emoji tests 2016-06-20 14:49:20 +01:00
Fatih Acet fe125f8dc9 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into category-search-dropdown
# Conflicts:
#	app/assets/javascripts/lib/common_utils.js.coffee
2016-06-16 02:04:09 +03:00
Fatih Acet 415b032ba1 Prevent default disabled buttons and links. 2016-06-15 11:37:45 -04:00
Timothy Andrew d8a531687c Fix teaspoon spec.
- We added a `current_user.two_factor_via_otp?` check to the view. When
  rendering the view via the teaspoon fixture, `current_user` is `nil`.
2016-06-15 08:16:57 +05:30
Fatih Acet 50b3b8ce80 Added tests for categorised search autocomplete. 2016-06-07 17:54:29 +03:00
Douwe Maan 4d4a9b7c8a Merge branch 'notes-are-awardables' into 'master'
Notes are awardables

## What does this MR do?

Makes sure we can :thunder_cloud_rain: comments/notes.

## What are the relevant issue numbers?
Follows up upon !2901, depends on !3785

Closes #3655 

## Screenshots (if relevant)
TODO



See merge request !4291
2016-06-06 16:48:35 +00:00
Fatih Acet c1e2b02e34 Added tests for award emoji feature. 2016-06-06 11:10:10 +02:00
Timothy Andrew 86b07caa59 Implement authentication (login) using a U2F device.
- Move the `authenticate_with_two_factor` method from
  `ApplicationController` to the `AuthenticatesWithTwoFactor` module,
  where it should be.
2016-06-06 12:50:31 +05:30
Timothy Andrew 128549f10b Implement U2F registration.
- Move the `TwoFactorAuthsController`'s `new` action to `show`, since
  the page is not used to create a single "two factor auth" anymore. We
  can have a single 2FA authenticator app, along with any number of U2F
  devices, in any combination, so the page will be accessed after the
  first "two factor auth" is created.
- Add the `u2f` javascript library, which provides an API to the
  browser's U2F implementation.
- Add tests for the JS components
2016-06-06 12:50:31 +05:30
Fatih Acet b99471ca5d Added specs for right sidebar. 2016-05-12 00:38:01 +03:00
Phil Hughes 6416f8eab1 Updated based on Ruby feedback 2016-04-12 13:10:43 -04:00
Phil Hughes 14b124faca Tests update 2016-04-12 13:10:43 -04:00
Phil Hughes 29f414aa5a Tests update 2016-04-04 10:48:49 +01:00
Robert Speicher 76ed2afcfc Change `js-quick-submit` behavior to expect the class on the form
Now it will work on any field inside that form, and it's easier to scope
new behavior, which is what we're adding next!
2016-03-02 15:11:15 -05:00
Phil Hughes b724f0871a Project dropdown test span -> i 2016-02-05 20:08:28 +00:00
Phil Hughes 0a094cb1df Changed the project switcher dropdown toggle
Moved the positioning of the dropdown to be more aligned with the title

Closes #13219 and #13214
2016-02-05 18:56:37 +00:00
Phil Hughes 56b0c46bf6 added tests 2016-01-30 16:01:50 +00:00
Robert Speicher 89ca4f04f6 Refactor ZenMode
- No longer depends on the "hidden checkbox".
- No longer depends on manually storing/restoring the scroll position.
  Instead, we take advantage of jquery.scrollTo.
- Event-based.
- Simplifies the state-based styling.
2016-01-08 23:36:09 -05:00
Robert Speicher 98f77d2edc Merge branch 'close-open-ajax-issue' into 'master'
open and close issue via ajax request. With tests

Close and Reopen issues with ajax request.

See merge request !2164
2015-12-25 21:00:16 +00:00
Jacob Schatz 00e967a07f removes unused `alert` from issue spec. Requires flash in the *implementation* instead of the spec. 2015-12-23 20:57:16 -05:00
Jacob Schatz e11ee5ff01 adds test for issue close/reopen failure 2015-12-23 17:41:05 -05:00
Jacob Schatz 7e43fa6709 fixes tests to work with jasmine/jquery 2015-12-23 16:56:36 -05:00
Jacob Schatz 70dfa3a721 open and close issue via ajax request. With tests 2015-12-21 13:06:09 -05:00
Douglas Barbosa Alexandre 4163eb56d9 Add specs for JS validation for invalid characters in branch name 2015-12-17 19:45:43 -02:00
Douwe Maan 79c90821ac Rename .issuable-details to .detail-page (and -header and -description) 2015-12-16 16:13:22 +01:00
Robert Speicher ebee5077f2 Make tab target selectors less naive
Prior, any of the specified IDs could have been hijacked by a table of
contents header, breaking the tab functionality. For example, a `##
Notes` header would get the id `notes` and prevent the Discussion tab
from being activated.

Closes #3908
2015-12-08 14:47:28 -05:00
Dmitriy Zaporozhets a0a488ed13
Apply new design to files page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-10-13 16:41:48 +02:00
Robert Speicher 01d0926bc1 Add "Quick Submit" JS behavior 2015-10-07 15:23:41 -04:00
Robert Speicher dd6daf4656 Add test case for clicking line number anchor icon 2015-07-17 20:40:56 -04:00
Robert Speicher e4472cee78 Add "Requires Input" JS behavior 2015-06-26 22:06:42 -04:00
Dmitriy Zaporozhets b9fa82daee
Update tests and use js-issuable class for context form
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-06-26 15:05:30 +02:00
Dmitriy Zaporozhets 29b6d465a7 Merge branch 'rs-dev-issue-2355' into 'master'
MergeRequest#show performance improvements

This is a first pass on improving the performance of the `MergeRequests#show` page. Notable changes:

- The "Commits" tab is loaded lazily, so the initial page load should be much faster for MRs with many commits.
- Relative timestamps via `timeago` are only initialized once per load instead of `O(n^2)`. This greatly improves frontend rendering times for a large number of commits.
- Refactored `User.find_for_commit` to use a single ARel-generated SQL query instead of the old method which resulted in one query, and could result in up to three.

See merge request !838
2015-06-22 09:48:49 +00:00