Commit graph

15 commits

Author SHA1 Message Date
Douwe Maan
6b35c4ad65 Revert "Merge branch '22680-unlabel-limit-autocomplete-to-selected-items' into 'master'"
This reverts merge request !6796
2016-11-17 09:39:23 +00:00
Akram FARES
d54b88260c Limit autocomplete to currently selected items 2016-11-15 21:41:40 +00:00
Douglas Barbosa Alexandre
398ab263fd Allow users to apply group labels on Issues/MRs 2016-10-19 14:58:24 -02:00
Douwe Maan
8b8a4626c6 Fix specs and implement fixes based on failing specs 2016-08-17 17:54:24 -05:00
Douwe Maan
5a07b760df Refactor slash command definition 2016-08-12 20:17:18 -05:00
Rémy Coutable
f393f2dde0
Simplify the slash commands DSL to store action blocks instead of creating methods
Other improvements:
- Ensure slash commands autocomplete doesn't break when noteable_type is not given
- Slash commands: improve autocomplete behavior and /due command
- We don't display slash commands for note edit forms.
- Add tests for reply by email with slash commands
- Be sure to execute slash commands after the note creation in Notes::CreateService

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:36:47 +02:00
Rémy Coutable
65349c2212 Make slash commands contextual
- Return only slash commands that make sense for the current noteable
- Allow slash commands decription to be dynamic

Other improvements:

- Add permission checks in slash commands definition
- Use IssuesFinder and MergeRequestsFinder
- Use next if instead of a unless block, and use splat operator instead of flatten

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:06:12 +02:00
Rémy Coutable
0eea8c8857 Support slash commands in noteable description and notes
Some important things to note:

- commands are removed from noteable.description / note.note
- commands are translated to params so that they are treated as normal
  params in noteable Creation services
- the logic is not in the models but in the Creation services, which is
  the right place for advanced logic that has nothing to do with what
  models should be responsible of!
- UI/JS needs to be updated to handle notes which consist of commands
  only
- the `/merge` command is not handled yet

Other improvements:

- Don't process commands in commit notes and display a flash is note is only commands
- Add autocomplete for slash commands
- Add description and params to slash command DSL methods
- Ensure replying by email with a commands-only note works
- Use :subscription_event instead of calling noteable.subscribe
- Support :todo_event in IssuableBaseService

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:05:57 +02:00
Fatih Acet
046b5735bc Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into add_autocomplete_for_labels
# Conflicts:
#	app/assets/javascripts/gfm_auto_complete.js.coffee
2016-06-14 00:56:59 +03:00
Arinde Eniola
14964308dc add gfm autocomplete for labels 2016-05-03 12:07:06 +01:00
Alejandro Rodríguez
ec71edfedd Sorting Milestones on the auto complete list by due date and title 2016-04-20 22:12:43 -03:00
Alejandro Rodríguez
4cab66e3e2 Implementing autocomplete for GFM milestone references 2016-04-20 22:12:43 -03:00
Douglas Barbosa Alexandre
7ee528336a Restrict access for confidential issues on autocomplete 2016-03-17 20:55:59 -03:00
Dmitriy Zaporozhets
a42d84eca3 Faster autocomplete without unused description 2015-01-23 14:38:20 -08:00
Dmitriy Zaporozhets
1511999d88 Faster autocomplete for users/issues/emojiis
Instead of loading all issues and merge requests we load only open one.
This will reduce time load for autocomplete resources significantly
2015-01-22 17:51:35 -08:00