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
7afdcc7f
Commit
7afdcc7f
authored
Jul 20, 2018
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into ce-to-ee-2018-07-20
parents
eab6aa25
a14f1720
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
10 deletions
+73
-10
app/assets/javascripts/ide/ide_router.js
app/assets/javascripts/ide/ide_router.js
+17
-5
app/assets/stylesheets/framework/dropdowns.scss
app/assets/stylesheets/framework/dropdowns.scss
+2
-5
changelogs/unreleased/48036-fix-web-ide-blob-crash.yml
changelogs/unreleased/48036-fix-web-ide-blob-crash.yml
+5
-0
changelogs/unreleased/project-dropdown-list-overflow.yml
changelogs/unreleased/project-dropdown-list-overflow.yml
+5
-0
spec/javascripts/ide/ide_router_spec.js
spec/javascripts/ide/ide_router_spec.js
+44
-0
No files found.
app/assets/javascripts/ide/ide_router.js
View file @
7afdcc7f
import
Vue
from
'
vue
'
;
import
VueRouter
from
'
vue-router
'
;
import
{
join
as
joinPath
}
from
'
path
'
;
import
flash
from
'
~/flash
'
;
import
store
from
'
./stores
'
;
import
{
activityBarViews
}
from
'
./constants
'
;
...
...
@@ -37,17 +38,29 @@ const router = new VueRouter({
base
:
`
${
gon
.
relative_url_root
}
/-/ide/`
,
routes
:
[
{
path
:
'
/project/:namespace
/:project+
'
,
path
:
'
/project/:namespace
+/:project
'
,
component
:
EmptyRouterComponent
,
children
:
[
{
path
:
'
:targetmode(edit|tree|blob)/*
'
,
path
:
'
:targetmode(edit|tree|blob)/
:branchid+/-/
*
'
,
component
:
EmptyRouterComponent
,
},
{
path
:
'
:targetmode(edit|tree|blob)/:branchid+/
'
,
redirect
:
to
=>
joinPath
(
to
.
path
,
'
/-/
'
),
},
{
path
:
'
:targetmode(edit|tree|blob)
'
,
redirect
:
to
=>
joinPath
(
to
.
path
,
'
/master/-/
'
),
},
{
path
:
'
merge_requests/:mrid
'
,
component
:
EmptyRouterComponent
,
},
{
path
:
''
,
redirect
:
to
=>
joinPath
(
to
.
path
,
'
/edit/master/-/
'
),
},
],
},
],
...
...
@@ -63,11 +76,10 @@ router.beforeEach((to, from, next) => {
.
then
(()
=>
{
const
fullProjectId
=
`
${
to
.
params
.
namespace
}
/
${
to
.
params
.
project
}
`
;
const
baseSplit
=
(
to
.
params
[
0
]
&&
to
.
params
[
0
].
split
(
'
/-/
'
))
||
[
''
];
const
branchId
=
baseSplit
[
0
].
slice
(
-
1
)
===
'
/
'
?
baseSplit
[
0
].
slice
(
0
,
-
1
)
:
baseSplit
[
0
];
const
branchId
=
to
.
params
.
branchid
;
if
(
branchId
)
{
const
basePath
=
baseSplit
.
length
>
1
?
baseSplit
[
1
]
:
''
;
const
basePath
=
to
.
params
[
0
]
||
''
;
store
.
dispatch
(
'
setCurrentBranchId
'
,
branchId
);
...
...
app/assets/stylesheets/framework/dropdowns.scss
View file @
7afdcc7f
...
...
@@ -822,7 +822,7 @@ header.header-content .dropdown-menu.frequent-items-dropdown-menu {
display
:
flex
;
flex-direction
:
row
;
width
:
500px
;
height
:
3
3
4px
;
height
:
3
5
4px
;
.frequent-items-dropdown-sidebar
,
.frequent-items-dropdown-content
{
...
...
@@ -868,6 +868,7 @@ header.header-content .dropdown-menu.frequent-items-dropdown-menu {
}
.frequent-items-list-container
{
height
:
304px
;
padding
:
8px
0
;
overflow-y
:
auto
;
...
...
@@ -897,10 +898,6 @@ header.header-content .dropdown-menu.frequent-items-dropdown-menu {
margin-top
:
8px
;
}
.frequent-items-search-container
{
height
:
284px
;
}
@include
media-breakpoint-down
(
xs
)
{
.frequent-items-list-container
{
width
:
auto
;
...
...
changelogs/unreleased/48036-fix-web-ide-blob-crash.yml
0 → 100644
View file @
7afdcc7f
---
title
:
Fix Web IDE crashing on directories named 'blob'
merge_request
:
20712
author
:
type
:
fixed
changelogs/unreleased/project-dropdown-list-overflow.yml
0 → 100644
View file @
7afdcc7f
---
title
:
Don't overflow project/group dropdown results
merge_request
:
20704
author
:
gfyoung
type
:
fixed
spec/javascripts/ide/ide_router_spec.js
0 → 100644
View file @
7afdcc7f
import
router
from
'
~/ide/ide_router
'
;
import
store
from
'
~/ide/stores
'
;
describe
(
'
IDE router
'
,
()
=>
{
const
PROJECT_NAMESPACE
=
'
my-group/sub-group
'
;
const
PROJECT_NAME
=
'
my-project
'
;
afterEach
(()
=>
{
router
.
push
(
'
/
'
);
});
afterAll
(()
=>
{
// VueRouter leaves this window.history at the "base" url. We need to clean this up.
window
.
history
.
replaceState
({},
''
,
'
/
'
);
});
[
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/tree/master/-/src/blob/`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/tree/master/-/src/blob`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/tree/blob/-/src/blob`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/tree/master/-/src/tree/`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/tree/weird:branch/name-123/-/src/tree/`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/blob/master/-/src/blob`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/blob/master/-/src/edit`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/blob/master/-/src/merge_requests/2`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/blob/blob/-/src/blob`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/edit/blob/-/src/blob`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/merge_requests/2`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/tree/blob`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
/edit`
,
`/project/
${
PROJECT_NAMESPACE
}
/
${
PROJECT_NAME
}
`
,
].
forEach
(
route
=>
{
it
(
`finds project path when route is "
${
route
}
"`
,
()
=>
{
spyOn
(
store
,
'
dispatch
'
).
and
.
returnValue
(
new
Promise
(()
=>
{}));
router
.
push
(
route
);
expect
(
store
.
dispatch
).
toHaveBeenCalledWith
(
'
getProjectData
'
,
{
namespace
:
PROJECT_NAMESPACE
,
projectId
:
PROJECT_NAME
,
});
});
});
});
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