Skip to content

Commit

Permalink
Merge pull request learningequality#11730 from rtibbles/rooting_out_p…
Browse files Browse the repository at this point in the history
…ages

Delete coreAPI PageRoot component in favour of a default component in kolibri_app
  • Loading branch information
marcellamaki authored Feb 27, 2024
2 parents dcce356 + 2ce9790 commit 51a7503
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 37 deletions.
2 changes: 0 additions & 2 deletions kolibri/core/assets/src/core-app/apiSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ import LearnOnlyDeviceNotice from '../views/LearnOnlyDeviceNotice';
import themeConfig from '../styles/themeConfig';
import sortLanguages from '../utils/sortLanguages';
import * as sync from '../views/sync/syncComponentSet';
import PageRoot from '../views/PageRoot';
import NotificationsRoot from '../views/NotificationsRoot';
import useMinimumKolibriVersion from '../composables/useMinimumKolibriVersion';
import useUserSyncStatus from '../composables/useUserSyncStatus';
Expand Down Expand Up @@ -211,7 +210,6 @@ export default {
PrivacyLinkAndModal,
LearnOnlyDeviceNotice,
SuggestedTime,
PageRoot,
MasteryModel,
NotificationsRoot,
KolibriLoadingSnippet,
Expand Down
7 changes: 6 additions & 1 deletion kolibri/core/assets/src/kolibri_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ export default class KolibriApp extends KolibriModule {
* @return {Object} A component definition for the root component of this single page app.
*/
get RootVue() {
return {};
// By default return the component that just renders router-view,
// which will render the component for the current route.
return {
functional: true,
render: createElement => createElement('router-view'),
};
}
/*
* @return {Store} A convenience getter to return the vuex store.
Expand Down
18 changes: 0 additions & 18 deletions kolibri/core/assets/src/views/PageRoot.vue

This file was deleted.

4 changes: 0 additions & 4 deletions kolibri/plugins/coach/assets/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import useUser from 'kolibri.coreVue.composables.useUser';
import redirectBrowser from 'kolibri.utils.redirectBrowser';
import { setChannelInfo } from 'kolibri.coreVue.vuex.actions';
import router from 'kolibri.coreVue.router';
import PageRoot from 'kolibri.coreVue.components.PageRoot';
import KolibriApp from 'kolibri_app';
import routes from './routes';
import pluginModule from './modules/pluginModule';
Expand All @@ -15,9 +14,6 @@ class CoachToolsModule extends KolibriApp {
get routes() {
return routes;
}
get RootVue() {
return PageRoot;
}
get pluginModule() {
return pluginModule;
}
Expand Down
4 changes: 0 additions & 4 deletions kolibri/plugins/learn/assets/src/my_downloads/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import PageRoot from 'kolibri.coreVue.components.PageRoot';
import KolibriApp from 'kolibri_app';
import routes from './routes';
import pluginModule from './modules/pluginModule';
Expand All @@ -7,9 +6,6 @@ class MyDownloadsModule extends KolibriApp {
get routes() {
return routes;
}
get RootVue() {
return PageRoot;
}
get pluginModule() {
return pluginModule;
}
Expand Down
4 changes: 0 additions & 4 deletions kolibri/plugins/policies/assets/src/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import PageRoot from 'kolibri.coreVue.components.PageRoot';
import routes from './routes';
import pluginModule from './modules/pluginModule';
import KolibriApp from 'kolibri_app';
Expand All @@ -7,9 +6,6 @@ class PoliciesModule extends KolibriApp {
get routes() {
return routes;
}
get RootVue() {
return PageRoot;
}
get pluginModule() {
return pluginModule;
}
Expand Down
4 changes: 0 additions & 4 deletions kolibri/plugins/user_profile/assets/src/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import router from 'kolibri.coreVue.router';
import PageRoot from 'kolibri.coreVue.components.PageRoot';
import routes from './routes';
import pluginModule from './modules/pluginModule';
import KolibriApp from 'kolibri_app';
Expand All @@ -8,9 +7,6 @@ class UserProfileModule extends KolibriApp {
get routes() {
return routes;
}
get RootVue() {
return PageRoot;
}
get pluginModule() {
return pluginModule;
}
Expand Down

0 comments on commit 51a7503

Please sign in to comment.