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
4f798c21
Commit
4f798c21
authored
Jul 20, 2020
by
Natalia Tepluhina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Pasting an image into a comment also uploads design"
parent
d63664c8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
14 deletions
+28
-14
app/assets/javascripts/design_management_new/pages/index.vue
app/assets/javascripts/design_management_new/pages/index.vue
+12
-12
app/assets/stylesheets/components/design_management/design_list_item.scss
...sheets/components/design_management/design_list_item.scss
+9
-0
changelogs/unreleased/229588-pasting-an-image-into-a-comment-also-uploads-design.yml
...8-pasting-an-image-into-a-comment-also-uploads-design.yml
+5
-0
spec/frontend/design_management_new/pages/__snapshots__/index_spec.js.snap
...ign_management_new/pages/__snapshots__/index_spec.js.snap
+2
-2
No files found.
app/assets/javascripts/design_management_new/pages/index.vue
View file @
4f798c21
...
@@ -246,28 +246,28 @@ export default {
...
@@ -246,28 +246,28 @@ export default {
this
.
onUploadDesign
([
newFile
]);
this
.
onUploadDesign
([
newFile
]);
}
}
},
},
toggleOnPasteListener
(
route
)
{
toggleOnPasteListener
()
{
if
(
route
===
DESIGNS_ROUTE_NAME
)
{
document
.
addEventListener
(
'
paste
'
,
this
.
onDesignPaste
);
document
.
addEventListener
(
'
paste
'
,
this
.
onDesignPaste
);
},
}
else
{
toggleOffPasteListener
()
{
document
.
removeEventListener
(
'
paste
'
,
this
.
onDesignPaste
);
document
.
removeEventListener
(
'
paste
'
,
this
.
onDesignPaste
);
}
},
},
},
},
beforeRouteUpdate
(
to
,
from
,
next
)
{
beforeRouteUpdate
(
to
,
from
,
next
)
{
this
.
toggleOnPasteListener
(
to
.
name
);
this
.
selectedDesigns
=
[];
this
.
selectedDesigns
=
[];
next
();
next
();
},
},
beforeRouteLeave
(
to
,
from
,
next
)
{
this
.
toggleOnPasteListener
(
to
.
name
);
next
();
},
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<div
data-testid=
"designs-root"
class=
"gl-mt-5"
>
<div
data-testid=
"designs-root"
class=
"gl-mt-5"
:class=
"
{ 'designs-root': !isDesignListEmpty }"
@mouseenter="toggleOnPasteListener"
@mouseleave="toggleOffPasteListener"
>
<header
v-if=
"showToolbar"
class=
"row-content-block border-top-0 p-2 d-flex"
>
<header
v-if=
"showToolbar"
class=
"row-content-block border-top-0 p-2 d-flex"
>
<div
class=
"gl-display-flex gl-justify-content-space-between gl-align-items-center gl-w-full"
>
<div
class=
"gl-display-flex gl-justify-content-space-between gl-align-items-center gl-w-full"
>
<div>
<div>
...
...
app/assets/stylesheets/components/design_management/design_list_item.scss
View file @
4f798c21
.designs-root
{
border
:
2px
dashed
transparent
;
transition
:
border
$gl-transition-duration-medium
$general-hover-transition-curve
;
&
:hover
{
border-color
:
$gray-100
;
}
}
.design-list-item
{
.design-list-item
{
height
:
280px
;
height
:
280px
;
text-decoration
:
none
;
text-decoration
:
none
;
...
...
changelogs/unreleased/229588-pasting-an-image-into-a-comment-also-uploads-design.yml
0 → 100644
View file @
4f798c21
---
title
:
Resolve Pasting an image into a comment also uploads design
merge_request
:
37171
author
:
type
:
fixed
spec/frontend/design_management_new/pages/__snapshots__/index_spec.js.snap
View file @
4f798c21
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
exports[`Design management index page designs does not render toolbar when there is no permission 1`] = `
exports[`Design management index page designs does not render toolbar when there is no permission 1`] = `
<div
<div
class="gl-mt-5"
class="gl-mt-5
designs-root
"
data-testid="designs-root"
data-testid="designs-root"
>
>
<!---->
<!---->
...
@@ -87,7 +87,7 @@ exports[`Design management index page designs does not render toolbar when there
...
@@ -87,7 +87,7 @@ exports[`Design management index page designs does not render toolbar when there
exports[`Design management index page designs renders designs list and header with upload button 1`] = `
exports[`Design management index page designs renders designs list and header with upload button 1`] = `
<div
<div
class="gl-mt-5"
class="gl-mt-5
designs-root
"
data-testid="designs-root"
data-testid="designs-root"
>
>
<header
<header
...
...
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