Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
932b94f9
Commit
932b94f9
authored
Jul 07, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed GFM references not being included when update issue inline
Closes
https://gitlab.com/gitlab-org/gitlab-ee/issues/2878
parent
1dab6403
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
app/assets/javascripts/gfm_auto_complete.js
app/assets/javascripts/gfm_auto_complete.js
+1
-0
changelogs/unreleased/issue-description-gfm.yml
changelogs/unreleased/issue-description-gfm.yml
+4
-0
spec/features/issues/gfm_autocomplete_spec.rb
spec/features/issues/gfm_autocomplete_spec.rb
+12
-0
No files found.
app/assets/javascripts/gfm_auto_complete.js
View file @
932b94f9
...
@@ -30,6 +30,7 @@ class GfmAutoComplete {
...
@@ -30,6 +30,7 @@ class GfmAutoComplete {
this
.
input
.
each
((
i
,
input
)
=>
{
this
.
input
.
each
((
i
,
input
)
=>
{
const
$input
=
$
(
input
);
const
$input
=
$
(
input
);
$input
.
off
(
'
focus.setupAtWho
'
).
on
(
'
focus.setupAtWho
'
,
this
.
setupAtWho
.
bind
(
this
,
$input
));
$input
.
off
(
'
focus.setupAtWho
'
).
on
(
'
focus.setupAtWho
'
,
this
.
setupAtWho
.
bind
(
this
,
$input
));
$input
.
on
(
'
change.atwho
'
,
()
=>
input
.
dispatchEvent
(
new
Event
(
'
input
'
)));
// This triggers at.js again
// This triggers at.js again
// Needed for quick actions with suffixes (ex: /label ~)
// Needed for quick actions with suffixes (ex: /label ~)
$input
.
on
(
'
inserted-commands.atwho
'
,
$input
.
trigger
.
bind
(
$input
,
'
keyup
'
));
$input
.
on
(
'
inserted-commands.atwho
'
,
$input
.
trigger
.
bind
(
$input
,
'
keyup
'
));
...
...
changelogs/unreleased/issue-description-gfm.yml
0 → 100644
View file @
932b94f9
---
title
:
Fixed GFM references not being included when updating issues inline
merge_request
:
author
:
spec/features/issues/gfm_autocomplete_spec.rb
View file @
932b94f9
...
@@ -14,6 +14,18 @@ feature 'GFM autocomplete', feature: true, js: true do
...
@@ -14,6 +14,18 @@ feature 'GFM autocomplete', feature: true, js: true do
wait_for_requests
wait_for_requests
end
end
it
'updates issue descripton with GFM reference'
do
find
(
'.issuable-edit'
).
click
find
(
'#issue-description'
).
native
.
send_keys
(
"@
#{
user
.
name
[
0
...
3
]
}
"
)
find
(
'.atwho-view .cur'
).
trigger
(
'click'
)
click_button
'Save changes'
expect
(
find
(
'.description'
)).
to
have_content
(
user
.
to_reference
)
end
it
'opens autocomplete menu when field starts with text'
do
it
'opens autocomplete menu when field starts with text'
do
page
.
within
'.timeline-content-form'
do
page
.
within
'.timeline-content-form'
do
find
(
'#note_note'
).
native
.
send_keys
(
''
)
find
(
'#note_note'
).
native
.
send_keys
(
''
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment