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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
fc575676
Commit
fc575676
authored
Jan 28, 2022
by
Taurie Davis
Committed by
Natalia Tepluhina
Jan 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(badge): Migrate diff LFS badge to glbadge
Changelog: changed
parent
e529ce9f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
9 deletions
+8
-9
app/assets/javascripts/diffs/components/diff_file_header.vue
app/assets/javascripts/diffs/components/diff_file_header.vue
+5
-1
app/assets/stylesheets/framework/files.scss
app/assets/stylesheets/framework/files.scss
+0
-5
app/views/projects/blob/_header_content.html.haml
app/views/projects/blob/_header_content.html.haml
+1
-1
spec/features/merge_request/user_creates_image_diff_notes_spec.rb
...tures/merge_request/user_creates_image_diff_notes_spec.rb
+1
-1
spec/frontend/diffs/components/diff_file_header_spec.js
spec/frontend/diffs/components/diff_file_header_spec.js
+1
-1
No files found.
app/assets/javascripts/diffs/components/diff_file_header.vue
View file @
fc575676
...
...
@@ -3,6 +3,7 @@ import {
GlTooltipDirective
,
GlSafeHtmlDirective
,
GlIcon
,
GlBadge
,
GlButton
,
GlButtonGroup
,
GlDropdown
,
...
...
@@ -34,6 +35,7 @@ export default {
GlIcon
,
FileIcon
,
DiffStats
,
GlBadge
,
GlButton
,
GlButtonGroup
,
GlDropdown
,
...
...
@@ -349,7 +351,9 @@ export default {
{{
diffFile
.
a_mode
}}
→
{{
diffFile
.
b_mode
}}
</small>
<span
v-if=
"isUsingLfs"
class=
"badge label label-lfs gl-mr-2"
>
{{
__
(
'
LFS
'
)
}}
</span>
<gl-badge
v-if=
"isUsingLfs"
variant=
"neutral"
class=
"gl-mr-2"
data-testid=
"label-lfs"
>
{{
__
(
'
LFS
'
)
}}
</gl-badge>
</div>
<div
...
...
app/assets/stylesheets/framework/files.scss
View file @
fc575676
...
...
@@ -411,11 +411,6 @@ span.idiff {
margin-right
:
1
.5em
;
}
.label-lfs
{
color
:
$common-gray-light
;
border
:
1px
solid
$common-gray-light
;
}
.preview-container
{
overflow
:
auto
;
...
...
app/views/projects/blob/_header_content.html.haml
View file @
fc575676
...
...
@@ -14,4 +14,4 @@
=
number_to_human_size
(
blob
.
raw_size
)
-
if
blob
.
stored_externally?
&&
blob
.
external_storage
==
:lfs
%span
.badge.label-lfs.gl-mr-2
LFS
=
gl_badge_tag
(
_
(
'LFS'
),
variant: :neutral
)
spec/features/merge_request/user_creates_image_diff_notes_spec.rb
View file @
fc575676
...
...
@@ -127,7 +127,7 @@ RSpec.describe 'Merge request > User creates image diff notes', :js do
visit
diffs_project_merge_request_path
(
project
,
merge_request
,
view:
view
)
wait_for_requests
expect
(
page
.
all
(
'
.diff-file span.label-lfs
'
,
visible: :all
)).
not_to
be_empty
expect
(
page
.
all
(
'
[data-testid="label-lfs"]
'
,
visible: :all
)).
not_to
be_empty
end
it_behaves_like
'creates image diff note'
...
...
spec/frontend/diffs/components/diff_file_header_spec.js
View file @
fc575676
...
...
@@ -82,7 +82,7 @@ describe('DiffFileHeader component', () => {
const
findExpandButton
=
()
=>
wrapper
.
find
({
ref
:
'
expandDiffToFullFileButton
'
});
const
findFileActions
=
()
=>
wrapper
.
find
(
'
.file-actions
'
);
const
findModeChangedLine
=
()
=>
wrapper
.
find
({
ref
:
'
fileMode
'
});
const
findLfsLabel
=
()
=>
wrapper
.
find
(
'
.label-lfs
'
);
const
findLfsLabel
=
()
=>
wrapper
.
find
(
'
[data-testid="label-lfs"]
'
);
const
findToggleDiscussionsButton
=
()
=>
wrapper
.
find
({
ref
:
'
toggleDiscussionsButton
'
});
const
findExternalLink
=
()
=>
wrapper
.
find
({
ref
:
'
externalLink
'
});
const
findReplacedFileButton
=
()
=>
wrapper
.
find
({
ref
:
'
replacedFileButton
'
});
...
...
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