BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
59 deletions
+53
-59
conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+16
-2
_resolve_mode_interactive_inline.html.haml
...ests/conflicts/_resolve_mode_interactive_inline.html.haml
+17
-29
_resolve_mode_interactive_parallel.html.haml
...ts/conflicts/_resolve_mode_interactive_parallel.html.haml
+15
-23
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 @@
...
@@ -27,9 +27,22 @@
=
render
partial:
"projects/merge_requests/conflicts/commit_stats"
=
render
partial:
"projects/merge_requests/conflicts/commit_stats"
.files-wrapper
{
"v-if"
=>
"!isLoading && !hasError"
}
.files-wrapper
{
"v-if"
=>
"!isLoading && !hasError"
}
=
render
partial:
"projects/merge_requests/conflicts/inline_view"
,
locals:
{
class_bindings:
class_bindings
}
.files
=
render
partial:
"projects/merge_requests/conflicts/parallel_view"
,
locals:
{
class_bindings:
class_bindings
}
.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"
=
render
partial:
"projects/merge_requests/conflicts/submit_form"
-# Components
-# Components
=
render
partial:
'projects/merge_requests/conflicts/components/diff_file_editor'
=
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
→
app/views/projects/merge_requests/conflicts/_
resolve_mode_interactive_inline
.html.haml
View file @
f947972d
.files
{
"v-show"
=>
"!isParallel"
}
.diff-wrap-lines.code.file-content.js-syntax-highlight
.diff-file.file-holder.conflict.inline-view
{
"v-for"
=>
"file in conflictsData.files"
}
%table
.file-title
%tr
.line_holder.diff-inline
{
"v-for"
=>
"line in file.inlineLines"
}
%i
.fa.fa-fw
{
":class"
=>
"file.iconClass"
}
%template
{
"v-if"
=>
"!line.isHeader"
}
%strong
{{file.filePath}}
%td
.diff-line-num.new_line
{
":class"
=>
class_bindings
}
=
render
partial:
'projects/merge_requests/conflicts/file_actions'
%a
{{line.new_line}}
%template
{
"v-if"
=>
"file.type === 'text'"
}
%td
.diff-line-num.old_line
{
":class"
=>
class_bindings
}
.diff-content.diff-wrap-lines
%a
{{line.old_line}}
.diff-wrap-lines.code.file-content.js-syntax-highlight
{
'v-show'
=>
"file.resolveMode === 'interactive'"
}
%td
.line_content
{
":class"
=>
class_bindings
}
%table
{{{line.richText}}}
%tr
.line_holder.diff-inline
{
"v-for"
=>
"line in file.inlineLines"
}
%template
{
"v-if"
=>
"line.isHeader"
}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.header
{
":class"
=>
class_bindings
}
%td
.diff-line-num.new_line
{
":class"
=>
class_bindings
}
%td
.diff-line-num.header
{
":class"
=>
class_bindings
}
%a
{{line.new_line}}
%td
.line_content.header
{
":class"
=>
class_bindings
}
%td
.diff-line-num.old_line
{
":class"
=>
class_bindings
}
%strong
{{{line.richText}}}
%a
{{line.old_line}}
%button
.btn
{
"@click"
=>
"handleSelected(file, line.id, line.section)"
}
%td
.line_content
{
":class"
=>
class_bindings
}
{{line.buttonTitle}}
{{{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
→
app/views/projects/merge_requests/conflicts/_
resolve_mode_interactive_parallel
.html.haml
View file @
f947972d
.files
{
"v-show"
=>
"isParallel"
}
.diff-wrap-lines.code.file-content.js-syntax-highlight
.diff-file.file-holder.conflict.parallel-view
{
"v-for"
=>
"file in conflictsData.files"
}
%table
.file-title
%tr
.line_holder.parallel
{
"v-for"
=>
"section in file.parallelLines"
}
%i
.fa.fa-fw
{
":class"
=>
"file.iconClass"
}
%template
{
"v-for"
=>
"line in section"
}
%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"
}
%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
}
%td
.line_content.header
{
":class"
=>
class_bindings
}
%strong
{{line.richText}}
%strong
{{line.richText}}
%button
.btn
{
"@click"
=>
"handleSelected(file, line.id, line.section)"
}
%button
.btn
{
"@click"
=>
"handleSelected(file, line.id, line.section)"
}
{{line.buttonTitle}}
{{line.buttonTitle}}
%template
{
"v-if"
=>
"!line.isHeader"
}
%template
{
"v-if"
=>
"!line.isHeader"
}
%td
.diff-line-num.old_line
{
":class"
=>
class_bindings
}
%td
.diff-line-num.old_line
{
":class"
=>
class_bindings
}
{{line.lineNumber}}
{{line.lineNumber}}
%td
.line_content.parallel
{
":class"
=>
class_bindings
}
%td
.line_content.parallel
{
":class"
=>
class_bindings
}
{{{line.richText}}}
{{{line.richText}}}
=
render
partial:
'projects/merge_requests/conflicts/diff_file_editor'
,
locals:
{
if_condition:
"file.loadFile && isParallel"
}
spec/features/merge_requests/conflicts_spec.rb
View file @
f947972d
...
@@ -39,16 +39,16 @@ feature 'Merge request conflict resolution', js: true, feature: true do
...
@@ -39,16 +39,16 @@ feature 'Merge request conflict resolution', js: true, feature: true do
context
'when in inline mode'
do
context
'when in inline mode'
do
it
'resolves files manually'
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'
click_button
'Edit inline'
wait_for_ajax
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
end
within
find
(
'.files-wrapper .diff-file'
,
text:
'files/ruby/regex.rb'
)
do
within
find
(
'.files-wrapper .diff-file'
,
text:
'files/ruby/regex.rb'
)
do
click_button
'Edit inline'
click_button
'Edit inline'
wait_for_ajax
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
end
click_button
'Commit conflict resolution'
click_button
'Commit conflict resolution'
...
@@ -80,9 +80,9 @@ feature 'Merge request conflict resolution', js: true, feature: true do
...
@@ -80,9 +80,9 @@ feature 'Merge request conflict resolution', js: true, feature: true do
before
{
click_link
(
'conflicts'
,
href:
/\/conflicts\Z/
)
}
before
{
click_link
(
'conflicts'
,
href:
/\/conflicts\Z/
)
}
it
'resolves files manually'
do
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
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
end
click_button
'Commit conflict resolution'
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