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
421848db
Commit
421848db
authored
May 20, 2020
by
Natalia Tepluhina
Committed by
Enrique Alcántara
May 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop reusing design component on route change
- Fixed router spec
parent
11de0b1b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
18 deletions
+5
-18
app/assets/javascripts/design_management/pages/design/index.vue
...sets/javascripts/design_management/pages/design/index.vue
+3
-17
app/assets/javascripts/design_management/pages/index.vue
app/assets/javascripts/design_management/pages/index.vue
+1
-1
spec/frontend/design_management/router_spec.js
spec/frontend/design_management/router_spec.js
+1
-0
No files found.
app/assets/javascripts/design_management/pages/design/index.vue
View file @
421848db
...
@@ -156,6 +156,9 @@ export default {
...
@@ -156,6 +156,9 @@ export default {
},
},
mounted
()
{
mounted
()
{
Mousetrap
.
bind
(
'
esc
'
,
this
.
closeDesign
);
Mousetrap
.
bind
(
'
esc
'
,
this
.
closeDesign
);
this
.
trackEvent
();
// We need to reset the active discussion when opening a new design
this
.
updateActiveDiscussion
();
},
},
beforeDestroy
()
{
beforeDestroy
()
{
Mousetrap
.
unbind
(
'
esc
'
,
this
.
closeDesign
);
Mousetrap
.
unbind
(
'
esc
'
,
this
.
closeDesign
);
...
@@ -279,23 +282,6 @@ export default {
...
@@ -279,23 +282,6 @@ export default {
});
});
},
},
},
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
trackEvent
();
});
},
beforeRouteUpdate
(
to
,
from
,
next
)
{
this
.
trackEvent
();
this
.
closeCommentForm
();
// We need to reset the active discussion when opening a new design
this
.
updateActiveDiscussion
();
next
();
},
beforeRouteLeave
(
to
,
from
,
next
)
{
// We need to reset the active discussion when moving to design list view
this
.
updateActiveDiscussion
();
next
();
},
createImageDiffNoteMutation
,
createImageDiffNoteMutation
,
DESIGNS_ROUTE_NAME
,
DESIGNS_ROUTE_NAME
,
};
};
...
...
app/assets/javascripts/design_management/pages/index.vue
View file @
421848db
...
@@ -318,6 +318,6 @@ export default {
...
@@ -318,6 +318,6 @@ export default {
</li>
</li>
</ol>
</ol>
</div>
</div>
<router-view
/>
<router-view
:key=
"$route.fullPath"
/>
</div>
</div>
</
template
>
</
template
>
spec/frontend/design_management/router_spec.js
View file @
421848db
...
@@ -33,6 +33,7 @@ function factory(routeArg) {
...
@@ -33,6 +33,7 @@ function factory(routeArg) {
design
:
{
loading
:
true
},
design
:
{
loading
:
true
},
permissions
:
{
loading
:
true
},
permissions
:
{
loading
:
true
},
},
},
mutate
:
jest
.
fn
(),
},
},
},
},
});
});
...
...
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