Commit graph

6 commits

Author SHA1 Message Date
Jared Deckard
7f6474b269 Restore comments lost when converting CoffeeScript to JavaScript 2016-09-08 12:23:12 -05:00
Douwe Maan
0afb960150 Autocomplete based on names and aliases 2016-08-12 20:20:07 -05:00
Douwe Maan
f48e898619 Disable slash commands on edit forms 2016-08-12 20:19:16 -05:00
Douwe Maan
5d4993d623 Only autocomplete commands at the beginning of a line 2016-08-12 18:16:36 -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
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
Renamed from app/assets/javascripts/gfm_auto_complete.js (Browse further)