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
27d64f5b
Commit
27d64f5b
authored
Nov 28, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport border inline edit
parent
1ce27c7d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
13 deletions
+20
-13
app/assets/javascripts/issue_show/components/title.vue
app/assets/javascripts/issue_show/components/title.vue
+1
-1
app/assets/stylesheets/framework/animations.scss
app/assets/stylesheets/framework/animations.scss
+1
-1
app/assets/stylesheets/framework/buttons.scss
app/assets/stylesheets/framework/buttons.scss
+11
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+2
-3
app/assets/stylesheets/pages/notes.scss
app/assets/stylesheets/pages/notes.scss
+1
-4
spec/javascripts/issue_show/components/title_spec.js
spec/javascripts/issue_show/components/title_spec.js
+4
-4
No files found.
app/assets/javascripts/issue_show/components/title.vue
View file @
27d64f5b
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
v-tooltip
v-tooltip
v-if=
"showInlineEditButton && canUpdate"
v-if=
"showInlineEditButton && canUpdate"
type=
"button"
type=
"button"
class=
"btn
-blank btn-edit note-action-button
"
class=
"btn
btn-default btn-edit btn-svg
"
v-html=
"pencilIcon"
v-html=
"pencilIcon"
title=
"Edit title and description"
title=
"Edit title and description"
data-placement=
"bottom"
data-placement=
"bottom"
...
...
app/assets/stylesheets/framework/animations.scss
View file @
27d64f5b
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
@include
transition
(
border-color
);
@include
transition
(
border-color
);
}
}
.note-action-button
.link-highlight
,
.note-action-button
,
.toolbar-btn
,
.toolbar-btn
,
.dropdown-toggle-caret
{
.dropdown-toggle-caret
{
@include
transition
(
color
);
@include
transition
(
color
);
...
...
app/assets/stylesheets/framework/buttons.scss
View file @
27d64f5b
...
@@ -131,6 +131,13 @@
...
@@ -131,6 +131,13 @@
}
}
}
}
@mixin
btn-svg
{
height
:
$gl-padding
;
width
:
$gl-padding
;
top
:
0
;
vertical-align
:
text-top
;
}
.btn
{
.btn
{
@include
btn-default
;
@include
btn-default
;
@include
btn-white
;
@include
btn-white
;
...
@@ -429,3 +436,7 @@
...
@@ -429,3 +436,7 @@
text-decoration
:
none
;
text-decoration
:
none
;
}
}
}
}
.btn-svg
svg
{
@include
btn-svg
;
}
app/assets/stylesheets/pages/issuable.scss
View file @
27d64f5b
...
@@ -70,14 +70,13 @@
...
@@ -70,14 +70,13 @@
.title
{
.title
{
padding
:
0
;
padding
:
0
;
margin-bottom
:
16px
;
margin-bottom
:
$gl-padding
;
border-bottom
:
0
;
border-bottom
:
0
;
}
}
.btn-edit
{
.btn-edit
{
margin-left
:
auto
;
margin-left
:
auto
;
// Set height to match title height
height
:
$gl-padding
*
2
;
height
:
2em
;
}
}
// Border around images in issue and MR descriptions.
// Border around images in issue and MR descriptions.
...
...
app/assets/stylesheets/pages/notes.scss
View file @
27d64f5b
...
@@ -543,10 +543,7 @@ ul.notes {
...
@@ -543,10 +543,7 @@ ul.notes {
}
}
svg
{
svg
{
height
:
16px
;
@include
btn-svg
;
width
:
16px
;
top
:
0
;
vertical-align
:
text-top
;
}
}
.award-control-icon-positive
,
.award-control-icon-positive
,
...
...
spec/javascripts/issue_show/components/title_spec.js
View file @
27d64f5b
...
@@ -80,19 +80,19 @@ describe('Title component', () => {
...
@@ -80,19 +80,19 @@ describe('Title component', () => {
});
});
it
(
'
should not show by default
'
,
()
=>
{
it
(
'
should not show by default
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.
note-action-button
'
)).
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.
btn-edit
'
)).
toBeNull
();
});
});
it
(
'
should not show if canUpdate is false
'
,
()
=>
{
it
(
'
should not show if canUpdate is false
'
,
()
=>
{
vm
.
showInlineEditButton
=
true
;
vm
.
showInlineEditButton
=
true
;
vm
.
canUpdate
=
false
;
vm
.
canUpdate
=
false
;
expect
(
vm
.
$el
.
querySelector
(
'
.
note-action-button
'
)).
toBeNull
();
expect
(
vm
.
$el
.
querySelector
(
'
.
btn-edit
'
)).
toBeNull
();
});
});
it
(
'
should show if showInlineEditButton and canUpdate
'
,
()
=>
{
it
(
'
should show if showInlineEditButton and canUpdate
'
,
()
=>
{
vm
.
showInlineEditButton
=
true
;
vm
.
showInlineEditButton
=
true
;
vm
.
canUpdate
=
true
;
vm
.
canUpdate
=
true
;
expect
(
vm
.
$el
.
querySelector
(
'
.
note-action-button
'
)).
toBeDefined
();
expect
(
vm
.
$el
.
querySelector
(
'
.
btn-edit
'
)).
toBeDefined
();
});
});
it
(
'
should trigger open.form event when clicked
'
,
()
=>
{
it
(
'
should trigger open.form event when clicked
'
,
()
=>
{
...
@@ -100,7 +100,7 @@ describe('Title component', () => {
...
@@ -100,7 +100,7 @@ describe('Title component', () => {
vm
.
canUpdate
=
true
;
vm
.
canUpdate
=
true
;
Vue
.
nextTick
(()
=>
{
Vue
.
nextTick
(()
=>
{
vm
.
$el
.
querySelector
(
'
.
note-action-button
'
).
click
();
vm
.
$el
.
querySelector
(
'
.
btn-edit
'
).
click
();
expect
(
eventHub
.
$emit
).
toHaveBeenCalledWith
(
'
open.form
'
);
expect
(
eventHub
.
$emit
).
toHaveBeenCalledWith
(
'
open.form
'
);
});
});
});
});
...
...
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