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
1a2bdb43
Commit
1a2bdb43
authored
Mar 18, 2019
by
Denys Mishunov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented trimming for item's name in Web IDE
Resolves
https://gitlab.com/gitlab-org/gitlab-ce/issues/57540
parent
bbbaa707
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
app/assets/javascripts/ide/components/new_dropdown/modal.vue
app/assets/javascripts/ide/components/new_dropdown/modal.vue
+1
-1
changelogs/unreleased/57540-filename-trailing-space.yml
changelogs/unreleased/57540-filename-trailing-space.yml
+5
-0
spec/javascripts/ide/components/new_dropdown/modal_spec.js
spec/javascripts/ide/components/new_dropdown/modal_spec.js
+12
-0
No files found.
app/assets/javascripts/ide/components/new_dropdown/modal.vue
View file @
1a2bdb43
...
...
@@ -29,7 +29,7 @@ export default {
return
this
.
name
||
(
entryPath
?
`
${
entryPath
}
/`
:
''
);
},
set
(
val
)
{
this
.
name
=
val
;
this
.
name
=
val
.
trim
()
;
},
},
modalTitle
()
{
...
...
changelogs/unreleased/57540-filename-trailing-space.yml
0 → 100644
View file @
1a2bdb43
---
title
:
Implemented whitespace-trimming for file names in Web IDE
merge_request
:
26270
author
:
type
:
fixed
spec/javascripts/ide/components/new_dropdown/modal_spec.js
View file @
1a2bdb43
...
...
@@ -109,6 +109,18 @@ describe('new file modal component', () => {
expect
(
vm
.
entryName
).
toBe
(
'
index.js
'
);
});
it
(
'
removes leading/trailing spaces when found in the new name
'
,
()
=>
{
vm
.
entryName
=
'
index.js
'
;
expect
(
vm
.
entryName
).
toBe
(
'
index.js
'
);
});
it
(
'
does not remove internal spaces in the file name
'
,
()
=>
{
vm
.
entryName
=
'
In Praise of Idleness.txt
'
;
expect
(
vm
.
entryName
).
toBe
(
'
In Praise of Idleness.txt
'
);
});
});
});
...
...
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