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
a78e6bab
Commit
a78e6bab
authored
Sep 12, 2018
by
Constance Okoghenun
Committed by
Mike Greiling
Sep 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Placeholder when entering weight value"
parent
0c02254c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
23 deletions
+9
-23
ee/app/assets/javascripts/sidebar/components/weight/weight.vue
...p/assets/javascripts/sidebar/components/weight/weight.vue
+4
-2
ee/changelogs/unreleased/7262-placeholder-when-entering-weight-value.yml
...nreleased/7262-placeholder-when-entering-weight-value.yml
+5
-0
ee/spec/javascripts/sidebar/weight_spec.js
ee/spec/javascripts/sidebar/weight_spec.js
+0
-21
No files found.
ee/app/assets/javascripts/sidebar/components/weight/weight.vue
View file @
a78e6bab
...
...
@@ -114,7 +114,7 @@ export default {
},
onSubmit
(
e
)
{
const
{
value
}
=
e
.
target
;
const
validatedValue
=
Number
(
value
);
const
validatedValue
=
parseInt
(
value
,
10
);
const
isNewValue
=
validatedValue
!==
this
.
weight
;
this
.
hasValidInput
=
validatedValue
>=
0
||
value
===
''
;
...
...
@@ -188,7 +188,9 @@ export default {
ref=
"editableField"
:value=
"weight"
class=
"form-control"
type=
"text"
type=
"number"
min=
"0"
placeholder=
"Enter a number"
@
blur=
"onSubmit"
@
keydown.enter=
"onSubmit"
/>
...
...
ee/changelogs/unreleased/7262-placeholder-when-entering-weight-value.yml
0 → 100644
View file @
a78e6bab
---
title
:
Added placeholder to weight input for issue sidebar
merge_request
:
7346
author
:
type
:
changed
ee/spec/javascripts/sidebar/weight_spec.js
View file @
a78e6bab
...
...
@@ -154,27 +154,6 @@ describe('Weight', function() {
});
});
it
(
'
triggers error on invalid string value
'
,
done
=>
{
vm
=
mountComponent
(
Weight
,
{
...
DEFAULT_PROPS
,
editable
:
true
,
});
vm
.
$el
.
querySelector
(
'
.js-weight-edit-link
'
).
click
();
vm
.
$nextTick
(()
=>
{
const
event
=
new
CustomEvent
(
'
keydown
'
);
event
.
keyCode
=
ENTER_KEY_CODE
;
vm
.
$refs
.
editableField
.
click
();
vm
.
$refs
.
editableField
.
value
=
'
potato
'
;
vm
.
$refs
.
editableField
.
dispatchEvent
(
event
);
expect
(
vm
.
hasValidInput
).
toBe
(
false
);
done
();
});
});
it
(
'
triggers error on invalid negative integer value
'
,
done
=>
{
vm
=
mountComponent
(
Weight
,
{
...
DEFAULT_PROPS
,
...
...
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