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
Boxiang Sun
gitlab-ce
Commits
04fcc7da
Commit
04fcc7da
authored
Nov 14, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved the design of the changed files dropdown
Closes #36687
parent
e68ee8af
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
8 deletions
+39
-8
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+1
-1
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+28
-4
app/views/projects/diffs/_stats.html.haml
app/views/projects/diffs/_stats.html.haml
+5
-3
changelogs/unreleased/improved-changes-dropdown.yml
changelogs/unreleased/improved-changes-dropdown.yml
+5
-0
No files found.
app/assets/javascripts/dispatcher.js
View file @
04fcc7da
...
@@ -340,7 +340,7 @@ import ProjectVariables from './project_variables';
...
@@ -340,7 +340,7 @@ import ProjectVariables from './project_variables';
container
:
'
.js-commit-pipeline-graph
'
,
container
:
'
.js-commit-pipeline-graph
'
,
}).
bindEvents
();
}).
bindEvents
();
initNotes
();
initNotes
();
initChangesDropdown
();
initChangesDropdown
(
document
.
querySelector
(
'
.navbar-gitlab
'
).
offsetHeight
-
16
);
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
$
(
'
.commit-info.branches
'
).
load
(
document
.
querySelector
(
'
.js-commit-box
'
).
dataset
.
commitPath
);
break
;
break
;
case
'
projects:commit:pipelines
'
:
case
'
projects:commit:pipelines
'
:
...
...
app/assets/stylesheets/pages/diff.scss
View file @
04fcc7da
...
@@ -628,21 +628,45 @@
...
@@ -628,21 +628,45 @@
}
}
.diff-file-changes
{
.diff-file-changes
{
width
:
450px
;
max-width
:
550px
;
width
:
100%
;
z-index
:
150
;
z-index
:
150
;
@media
(
min-width
:
$screen-sm-min
)
{
@media
(
min-width
:
$screen-sm-min
)
{
left
:
$gl-padding
;
left
:
$gl-padding
;
}
}
a
{
.diff-changed-file
{
display
:
flex
;
padding-top
:
8px
;
padding-top
:
8px
;
padding-bottom
:
8px
;
padding-bottom
:
8px
;
min-width
:
0
;
}
}
.diff-changed-file
{
.diff-file-changed-icon
{
margin-top
:
2px
;
}
.diff-changed-file-content
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
flex-direction
:
column
;
min-width
:
0
;
}
.diff-changed-file-name
,
.diff-changed-file-path
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.diff-changed-file-path
{
direction
:
rtl
;
}
.diff-changed-stats
{
margin-left
:
auto
;
white-space
:
nowrap
;
}
}
}
}
...
...
app/views/projects/diffs/_stats.html.haml
View file @
04fcc7da
...
@@ -22,9 +22,11 @@
...
@@ -22,9 +22,11 @@
-
diff_files
.
each
do
|
diff_file
|
-
diff_files
.
each
do
|
diff_file
|
%li
%li
%a
.diff-changed-file
{
href:
"##{hexdigest(diff_file.file_path)}"
,
title:
diff_file
.
new_path
}
%a
.diff-changed-file
{
href:
"##{hexdigest(diff_file.file_path)}"
,
title:
diff_file
.
new_path
}
=
icon
(
"
#{
diff_file_changed_icon
(
diff_file
)
}
fw"
,
class:
"
#{
diff_file_changed_icon_color
(
diff_file
)
}
append-right-5"
)
=
icon
(
"
#{
diff_file_changed_icon
(
diff_file
)
}
fw"
,
class:
"
#{
diff_file_changed_icon_color
(
diff_file
)
}
diff-file-changed-icon append-right-8"
)
%span
.diff-file-changes-path.append-right-5
=
diff_file
.
new_path
%span
.diff-changed-file-content.append-right-8
.pull-right
%strong
.diff-changed-file-name
=
diff_file
.
blob
.
name
%span
.diff-changed-file-path.prepend-top-5
=
diff_file
.
new_path
%span
.diff-changed-stats
%span
.cgreen
<
%span
.cgreen
<
+
#{
diff_file
.
added_lines
}
+
#{
diff_file
.
added_lines
}
%span
.cred
<
%span
.cred
<
...
...
changelogs/unreleased/improved-changes-dropdown.yml
0 → 100644
View file @
04fcc7da
---
title
:
Improved diff changed files dropdown design
merge_request
:
author
:
type
:
changed
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