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
5f670c92
Commit
5f670c92
authored
Feb 21, 2022
by
Savas Vedova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve form user experience
- Emit changes on input rather than blur
parent
87b449b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
ee/app/assets/javascripts/vulnerabilities/components/new_vulnerability/section_identifiers.vue
...ties/components/new_vulnerability/section_identifiers.vue
+2
-2
ee/app/assets/javascripts/vulnerabilities/components/new_vulnerability/section_name.vue
...erabilities/components/new_vulnerability/section_name.vue
+2
-2
ee/spec/frontend/vulnerabilities/new_vulnerability/section_identifiers_spec.js
...erabilities/new_vulnerability/section_identifiers_spec.js
+4
-1
No files found.
ee/app/assets/javascripts/vulnerabilities/components/new_vulnerability/section_identifiers.vue
View file @
5f670c92
...
...
@@ -96,7 +96,7 @@ export default {
v-model.trim="identifier.identifierCode"
:state="validationStateIdentifierCode(index)"
type="text"
@
change
="emitChanges"
@
input
="emitChanges"
/>
</gl-form-group>
<gl-form-group
...
...
@@ -111,7 +111,7 @@ export default {
v-model.trim="identifier.identifierUrl"
:state="validationStateIdentifierUrl(index)"
type="text"
@
change
="emitChanges"
@
input
="emitChanges"
/>
</gl-form-group>
<gl-button
...
...
ee/app/assets/javascripts/vulnerabilities/components/new_vulnerability/section_name.vue
View file @
5f670c92
...
...
@@ -66,7 +66,7 @@ export default {
v-model.trim=
"vulnerabilityName"
:state=
"validationState.name"
type=
"text"
@
change
=
"emitChanges"
@
input
=
"emitChanges"
/>
</gl-form-group>
<gl-form-group
...
...
@@ -93,7 +93,7 @@ export default {
class=
"gl-shadow-none! gl-px-0! gl-py-4! gl-h-auto!"
:aria-label=
"$options.i18n.vulnerabilityDesc.description"
:placeholder=
"$options.i18n.vulnerabilityDesc.description"
@
change
=
"emitChanges"
@
input
=
"emitChanges"
/>
</
template
>
</markdown-field>
...
...
ee/spec/frontend/vulnerabilities/new_vulnerability/section_identifiers_spec.js
View file @
5f670c92
...
...
@@ -62,9 +62,12 @@ describe('New vulnerability - Section Identifiers', () => {
codeInput
.
setValue
(
'
cve-23
'
);
urlInput
.
setValue
(
'
https://gitlab.com
'
);
codeInput
.
trigger
(
'
change
'
);
expect
(
wrapper
.
emitted
(
'
change
'
)[
0
][
0
]).
toEqual
({
identifiers
:
[{
name
:
'
cve-23
'
,
url
:
''
}],
});
expect
(
wrapper
.
emitted
(
'
change
'
)[
1
][
0
]).
toEqual
({
identifiers
:
[{
name
:
'
cve-23
'
,
url
:
'
https://gitlab.com
'
}],
});
});
...
...
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