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 {
},
mounted
()
{
Mousetrap
.
bind
(
'
esc
'
,
this
.
closeDesign
);
this
.
trackEvent
();
// We need to reset the active discussion when opening a new design
this
.
updateActiveDiscussion
();
},
beforeDestroy
()
{
Mousetrap
.
unbind
(
'
esc
'
,
this
.
closeDesign
);
...
...
@@ -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
,
DESIGNS_ROUTE_NAME
,
};
...
...
app/assets/javascripts/design_management/pages/index.vue
View file @
421848db
...
...
@@ -318,6 +318,6 @@ export default {
</li>
</ol>
</div>
<router-view
/>
<router-view
:key=
"$route.fullPath"
/>
</div>
</
template
>
spec/frontend/design_management/router_spec.js
View file @
421848db
...
...
@@ -33,6 +33,7 @@ function factory(routeArg) {
design
:
{
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