gitlab-org--gitlab-foss/spec
Fatih Acet 77bfad1f4e Merge branch '18435-autocomplete-is-not-performant' into 'master'
Make autocomplete request performant

## What does this MR do?

Restricts the `autocomplete_sources`action to returning the `json`of one specific `at` type at a time.

Makes sure all commands start by immediately showing the `loading` dropdown.

If the `loading` dropdown is active, we will request and load in the data for that specific `at` type. We manually trigger the filter again. This time, if `loading` dropdown is not active, initiate default filter behaviour and use the correct data template.

Also fixes an issue where `setup` was called multiple times by only setting up and destroying atwho on a focused/blured input.

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

## Why was this MR needed?

`autocomplete_sources` was requested on page load and is large.

## Screenshots (if relevant)

3 requests for 3 different first-time references.

![Screen_Shot_2016-10-14_at_14.43.12](/uploads/0b04eab0d0bf3638d6d6e431036b8089/Screen_Shot_2016-10-14_at_14.43.12.png)

## Does this MR meet the acceptance criteria?

- [x] [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
  - [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 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?

Closes #22802

Closes #18435

See merge request !6856
2016-12-16 20:52:02 +00:00
..
bin
config
controllers Add a controller spec for personal access tokens. 2016-12-16 16:29:32 +05:30
db/production Allow users to seed the initial runner registration token using an environment variable 2016-12-01 17:21:21 -08:00
factories Add a `scopes` column to the `personal_access_tokens` table 2016-12-16 15:08:10 +05:30
features Merge branch '18435-autocomplete-is-not-performant' into 'master' 2016-12-16 20:52:02 +00:00
finders Merge branch 'jej-24637-move-issue-visible_to_user-to-finder' into 'security' 2016-12-15 11:41:04 -03:00
fixtures adds impersonator variable and makes sudo usage overall more clear 2016-12-07 14:42:51 +00:00
helpers Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
initializers
javascripts Merge branch 'abuse_report-fixture' into 'master' 2016-12-16 12:29:14 +00:00
lib Merge branch '20492-access-token-scopes' into 'master' 2016-12-16 17:38:41 +00:00
mailers Merge branch '24880-configurable-plaintext-emails' into 'master' 2016-11-29 12:05:23 +00:00
migrations Encode when migrating ProcessCommitWorker jobs 2016-12-13 16:52:49 +01:00
models Merge branch 'expose-deployment-variables' into 'master' 2016-12-16 18:01:28 +00:00
policies Add missing group policy spec 2016-12-15 21:30:35 +02:00
requests Modify `ApiHelpers` spec to adhere to the Four-Phase test style. 2016-12-16 16:29:32 +05:30
routing Changed autocomplete_sources into an action that returns a single 'at' type of sources at a time 2016-12-15 15:20:33 +00:00
serializers fix transient timing failure adding timecop 2016-12-14 14:49:10 +01:00
services Merge branch '20492-access-token-scopes' into 'master' 2016-12-16 17:38:41 +00:00
support Merge branch '25339-2-webhooks-fired-for-issue-closed-and-reopened' into 'master' 2016-12-16 17:00:43 +00:00
tasks/gitlab Don't allow to specify a repo or version when installing Workhorse 2016-12-01 19:22:46 +01:00
uploaders Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
views Fix test 2016-12-12 13:16:52 -06:00
workers Merge branch 'zj-guest-reads-public-builds' into 'master' 2016-12-06 13:54:16 +00:00
factories_spec.rb
rails_helper.rb
rake_helper.rb Move task helpers to a module 2016-11-30 12:20:21 +01:00
simplecov_env.rb
spec_helper.rb Pass commit data to ProcessCommitWorker 2016-12-01 13:36:06 +01:00
teaspoon_env.rb