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
Tatuya Kamada
gitlab-ce
Commits
f947972d
Commit
f947972d
authored
Sep 30, 2016
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve diff view switching and components
parent
cebad0fb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
61 deletions
+54
-61
app/views/projects/merge_requests/conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+15
-2
app/views/projects/merge_requests/conflicts/_inline_view.html.haml
.../projects/merge_requests/conflicts/_inline_view.html.haml
+0
-29
app/views/projects/merge_requests/conflicts/_parallel_view.html.haml
...rojects/merge_requests/conflicts/_parallel_view.html.haml
+0
-25
app/views/projects/merge_requests/conflicts/_resolve_mode_interactive_inline.html.haml
...ests/conflicts/_resolve_mode_interactive_inline.html.haml
+17
-0
app/views/projects/merge_requests/conflicts/_resolve_mode_interactive_parallel.html.haml
...ts/conflicts/_resolve_mode_interactive_parallel.html.haml
+17
-0
spec/features/merge_requests/conflicts_spec.rb
spec/features/merge_requests/conflicts_spec.rb
+5
-5
No files found.
app/views/projects/merge_requests/conflicts.html.haml
View file @
f947972d
...
...
@@ -27,9 +27,22 @@
=
render
partial:
"projects/merge_requests/conflicts/commit_stats"
.files-wrapper
{
"v-if"
=>
"!isLoading && !hasError"
}
=
render
partial:
"projects/merge_requests/conflicts/inline_view"
,
locals:
{
class_bindings:
class_bindings
}
=
render
partial:
"projects/merge_requests/conflicts/parallel_view"
,
locals:
{
class_bindings:
class_bindings
}
.files
.diff-file.file-holder.conflict
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%i
.fa.fa-fw
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
=
render
partial:
'projects/merge_requests/conflicts/file_actions'
.diff-content.diff-wrap-lines
%div
{
"v-show"
=>
"!isParallel && file.resolveMode === 'interactive' && file.type === 'text'"
}
=
render
partial:
"projects/merge_requests/conflicts/resolve_mode_interactive_inline"
,
locals:
{
class_bindings:
class_bindings
}
%div
{
"v-show"
=>
"isParallel && file.resolveMode === 'interactive' && file.type === 'text'"
}
=
render
partial:
"projects/merge_requests/conflicts/resolve_mode_interactive_parallel"
,
locals:
{
class_bindings:
class_bindings
}
%div
{
"v-show"
=>
" file.resolveMode === 'edit' || file.type === 'text-editor'"
}
=
render
partial:
'projects/merge_requests/conflicts/diff_file_editor'
,
locals:
{
if_condition:
"file.loadFile && isParallel"
}
=
render
partial:
"projects/merge_requests/conflicts/submit_form"
-# Components
=
render
partial:
'projects/merge_requests/conflicts/components/diff_file_editor'
\ No newline at end of file
app/views/projects/merge_requests/conflicts/_inline_view.html.haml
deleted
100644 → 0
View file @
cebad0fb
.files
{
"v-show"
=>
"!isParallel"
}
.diff-file.file-holder.conflict.inline-view
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%i
.fa.fa-fw
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
=
render
partial:
'projects/merge_requests/conflicts/file_actions'
%template
{
"v-if"
=>
"file.type === 'text'"
}
.diff-content.diff-wrap-lines
.diff-wrap-lines.code.file-content.js-syntax-highlight
{
'v-show'
=>
"file.resolveMode === 'interactive'"
}
%table
%tr
.line_holder.diff-inline
{
"v-for"
=>
"line in file.inlineLines"
}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.new_line
{
":class"
=>
class_bindings
}
%a
{{line.new_line}}
%td
.diff-line-num.old_line
{
":class"
=>
class_bindings
}
%a
{{line.old_line}}
%td
.line_content
{
":class"
=>
class_bindings
}
{{{line.richText}}}
%template
{
"v-if"
=>
"line.isHeader"
}
%td
.diff-line-num.header
{
":class"
=>
class_bindings
}
%td
.diff-line-num.header
{
":class"
=>
class_bindings
}
%td
.line_content.header
{
":class"
=>
class_bindings
}
%strong
{{{line.richText}}}
%button
.btn
{
"@click"
=>
"handleSelected(file, line.id, line.section)"
}
{{line.buttonTitle}}
=
render
partial:
'projects/merge_requests/conflicts/diff_file_editor'
%template
{
"v-else"
=>
true
}
=
render
partial:
'projects/merge_requests/conflicts/diff_file_editor'
app/views/projects/merge_requests/conflicts/_parallel_view.html.haml
deleted
100644 → 0
View file @
cebad0fb
.files
{
"v-show"
=>
"isParallel"
}
.diff-file.file-holder.conflict.parallel-view
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
%i
.fa.fa-fw
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
=
render
partial:
'projects/merge_requests/conflicts/file_actions'
.diff-content.diff-wrap-lines
.diff-wrap-lines.code.file-content.js-syntax-highlight
{
'v-show'
=>
"file.resolveMode === 'interactive'"
}
%table
%tr
.line_holder.parallel
{
"v-for"
=>
"section in file.parallelLines"
}
%template
{
"v-for"
=>
"line in section"
}
%template
{
"v-if"
=>
"line.isHeader"
}
%td
.diff-line-num.header
{
":class"
=>
class_bindings
}
%td
.line_content.header
{
":class"
=>
class_bindings
}
%strong
{{line.richText}}
%button
.btn
{
"@click"
=>
"handleSelected(file, line.id, line.section)"
}
{{line.buttonTitle}}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.old_line
{
":class"
=>
class_bindings
}
{{line.lineNumber}}
%td
.line_content.parallel
{
":class"
=>
class_bindings
}
{{{line.richText}}}
=
render
partial:
'projects/merge_requests/conflicts/diff_file_editor'
,
locals:
{
if_condition:
"file.loadFile && isParallel"
}
app/views/projects/merge_requests/conflicts/_resolve_mode_interactive_inline.html.haml
0 → 100644
View file @
f947972d
.diff-wrap-lines.code.file-content.js-syntax-highlight
%table
%tr
.line_holder.diff-inline
{
"v-for"
=>
"line in file.inlineLines"
}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.new_line
{
":class"
=>
class_bindings
}
%a
{{line.new_line}}
%td
.diff-line-num.old_line
{
":class"
=>
class_bindings
}
%a
{{line.old_line}}
%td
.line_content
{
":class"
=>
class_bindings
}
{{{line.richText}}}
%template
{
"v-if"
=>
"line.isHeader"
}
%td
.diff-line-num.header
{
":class"
=>
class_bindings
}
%td
.diff-line-num.header
{
":class"
=>
class_bindings
}
%td
.line_content.header
{
":class"
=>
class_bindings
}
%strong
{{{line.richText}}}
%button
.btn
{
"@click"
=>
"handleSelected(file, line.id, line.section)"
}
{{line.buttonTitle}}
app/views/projects/merge_requests/conflicts/_resolve_mode_interactive_parallel.html.haml
0 → 100644
View file @
f947972d
.diff-wrap-lines.code.file-content.js-syntax-highlight
%table
%tr
.line_holder.parallel
{
"v-for"
=>
"section in file.parallelLines"
}
%template
{
"v-for"
=>
"line in section"
}
%template
{
"v-if"
=>
"line.isHeader"
}
%td
.diff-line-num.header
{
":class"
=>
class_bindings
}
%td
.line_content.header
{
":class"
=>
class_bindings
}
%strong
{{line.richText}}
%button
.btn
{
"@click"
=>
"handleSelected(file, line.id, line.section)"
}
{{line.buttonTitle}}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.old_line
{
":class"
=>
class_bindings
}
{{line.lineNumber}}
%td
.line_content.parallel
{
":class"
=>
class_bindings
}
{{{line.richText}}}
spec/features/merge_requests/conflicts_spec.rb
View file @
f947972d
...
...
@@ -39,16 +39,16 @@ feature 'Merge request conflict resolution', js: true, feature: true do
context
'when in inline mode'
do
it
'resolves files manually'
do
within
find
(
'.files-wrapper .diff-file
.inline-view
'
,
text:
'files/ruby/popen.rb'
)
do
within
find
(
'.files-wrapper .diff-file'
,
text:
'files/ruby/popen.rb'
)
do
click_button
'Edit inline'
wait_for_ajax
execute_script
(
'ace.edit($(".files-wrapper .diff-file
.inline-view
pre")[0]).setValue("One morning");'
)
execute_script
(
'ace.edit($(".files-wrapper .diff-file pre")[0]).setValue("One morning");'
)
end
within
find
(
'.files-wrapper .diff-file'
,
text:
'files/ruby/regex.rb'
)
do
click_button
'Edit inline'
wait_for_ajax
execute_script
(
'ace.edit($(".files-wrapper .diff-file
.inline-view
pre")[1]).setValue("Gregor Samsa woke from troubled dreams");'
)
execute_script
(
'ace.edit($(".files-wrapper .diff-file pre")[1]).setValue("Gregor Samsa woke from troubled dreams");'
)
end
click_button
'Commit conflict resolution'
...
...
@@ -80,9 +80,9 @@ feature 'Merge request conflict resolution', js: true, feature: true do
before
{
click_link
(
'conflicts'
,
href:
/\/conflicts\Z/
)
}
it
'resolves files manually'
do
within
find
(
'.files-wrapper .diff-file
.inline-view
'
,
text:
'files/markdown/ruby-style-guide.md'
)
do
within
find
(
'.files-wrapper .diff-file'
,
text:
'files/markdown/ruby-style-guide.md'
)
do
wait_for_ajax
execute_script
(
'ace.edit($(".files-wrapper .diff-file
.inline-view
pre")[0]).setValue("Gregor Samsa woke from troubled dreams");'
)
execute_script
(
'ace.edit($(".files-wrapper .diff-file pre")[0]).setValue("Gregor Samsa woke from troubled dreams");'
)
end
click_button
'Commit conflict resolution'
...
...
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