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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
098a9805
Commit
098a9805
authored
Oct 30, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec fixes
increased perf of scrolling tabs into view
parent
5c75d750
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
13 deletions
+19
-13
app/assets/javascripts/repo/components/new_dropdown/modal.vue
...assets/javascripts/repo/components/new_dropdown/modal.vue
+2
-2
app/assets/javascripts/repo/components/repo.vue
app/assets/javascripts/repo/components/repo.vue
+5
-3
app/assets/javascripts/repo/components/repo_preview.vue
app/assets/javascripts/repo/components/repo_preview.vue
+1
-1
app/assets/javascripts/repo/stores/actions.js
app/assets/javascripts/repo/stores/actions.js
+2
-5
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+3
-0
spec/features/projects/tree/create_file_spec.rb
spec/features/projects/tree/create_file_spec.rb
+1
-1
spec/javascripts/repo/components/new_dropdown/index_spec.js
spec/javascripts/repo/components/new_dropdown/index_spec.js
+5
-1
No files found.
app/assets/javascripts/repo/components/new_dropdown/modal.vue
View file @
098a9805
<
script
>
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
mapActions
}
from
'
vuex
'
;
import
{
__
}
from
'
../../../locale
'
;
import
popupDialog
from
'
../../../vue_shared/components/popup_dialog.vue
'
;
...
...
@@ -28,7 +28,7 @@
]),
createEntryInStore
()
{
this
.
createTempEntry
({
name
:
this
.
entryName
.
replace
(
new
RegExp
(
`^
${
this
.
path
}
\
/`
),
''
),
name
:
this
.
entryName
.
replace
(
new
RegExp
(
`^
${
this
.
path
}
/`
),
''
),
type
:
this
.
type
,
});
...
...
app/assets/javascripts/repo/components/repo.vue
View file @
098a9805
...
...
@@ -26,12 +26,14 @@ export default {
RepoPreview
,
},
mounted
()
{
const
alertMessag
e
=
'
Are you sure you want to lose unsaved changes?
'
;
const
returnValu
e
=
'
Are you sure you want to lose unsaved changes?
'
;
window
.
onbeforeunload
=
(
e
)
=>
{
if
(
!
this
.
changedFiles
.
length
)
return
undefined
;
e
.
returnValue
=
alertMessage
;
return
alertMessage
;
Object
.
assign
(
e
,
{
returnValue
,
});
return
returnValue
;
};
},
};
...
...
app/assets/javascripts/repo/components/repo_preview.vue
View file @
098a9805
...
...
@@ -8,7 +8,7 @@ export default {
'
activeFile
'
,
]),
renderErrorTooLarge
()
{
return
this
.
activeFile
.
renderError
==
'
too_large
'
;
return
this
.
activeFile
.
renderError
==
=
'
too_large
'
;
},
},
methods
:
{
...
...
app/assets/javascripts/repo/stores/actions.js
View file @
098a9805
...
...
@@ -2,9 +2,6 @@ import Vue from 'vue';
import
flash
from
'
../../flash
'
;
import
service
from
'
../services
'
;
import
*
as
types
from
'
./mutation_types
'
;
import
{
pushState
,
}
from
'
./utils
'
;
export
const
redirectToUrl
=
url
=>
gl
.
utils
.
visitUrl
(
url
);
...
...
@@ -118,9 +115,9 @@ export const scrollToTab = () => {
const
tabs
=
document
.
getElementById
(
'
tabs
'
);
if
(
tabs
)
{
const
tabEl
=
tabs
.
querySelector
(
'
.active
'
);
const
tabEl
=
tabs
.
querySelector
(
'
.active
.repo-tab
'
);
tab
s
.
scrollLeft
=
tabEl
.
offsetLeft
;
tab
El
.
focus
()
;
}
});
};
...
...
app/assets/stylesheets/pages/repo.scss
View file @
098a9805
...
...
@@ -41,7 +41,9 @@
}
.panel-right
{
display
:
-
webkit-flex
;
display
:
flex
;
-webkit-flex-direction
:
column
;
flex-direction
:
column
;
width
:
80%
;
height
:
100%
;
...
...
@@ -73,6 +75,7 @@
}
.blob-viewer-container
{
-webkit-flex
:
1
;
flex
:
1
;
overflow
:
auto
;
...
...
spec/features/projects/tree/create_file_spec.rb
View file @
098a9805
...
...
@@ -28,7 +28,7 @@ feature 'Multi-file editor new file', :js do
click_button
(
'Create file'
)
end
find
(
'.inputarea'
,
visible:
false
).
send_keys
(
'file content'
)
find
(
'.inputarea'
).
send_keys
(
'file content'
)
fill_in
(
'commit-message'
,
with:
'commit message'
)
...
...
spec/javascripts/repo/components/new_dropdown/index_spec.js
View file @
098a9805
...
...
@@ -10,7 +10,11 @@ describe('new dropdown component', () => {
beforeEach
(()
=>
{
const
component
=
Vue
.
extend
(
newDropdown
);
vm
=
createComponentWithStore
(
component
,
store
).
$mount
();
vm
=
createComponentWithStore
(
component
,
store
);
vm
.
$store
.
state
.
path
=
''
;
vm
.
$mount
();
});
afterEach
(()
=>
{
...
...
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