Commit cd16600e authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'dispatcher-dashboard-todos' into 'master'

Refactor dashboard todos inside dispatcher

See merge request gitlab-org/gitlab-ce!16065
parents 8a7bbe1f 4c1e1ab1
......@@ -56,7 +56,6 @@ import GfmAutoComplete from './gfm_auto_complete';
import ShortcutsBlob from './shortcuts_blob';
import SigninTabsMemoizer from './signin_tabs_memoizer';
import Star from './star';
import Todos from './todos';
import TreeView from './tree';
import UsagePing from './usage_ping';
import UsernameValidator from './username_validator';
......@@ -111,6 +110,7 @@ import Activities from './activities';
}
const fail = () => Flash('Error loading dynamic module');
const callDefault = m => m.default();
path = page.split(':');
shortcut_handler = null;
......@@ -212,7 +212,7 @@ import Activities from './activities';
projectSelect();
break;
case 'dashboard:todos:index':
new Todos();
import('./pages/dashboard/todos/index').then(callDefault).catch(fail);
break;
case 'dashboard:projects:index':
case 'dashboard:projects:starred':
......@@ -542,7 +542,7 @@ import Activities from './activities';
new CILintEditor();
break;
case 'users:show':
import('./pages/users/show').then(m => m.default()).catch(fail);
import('./pages/users/show').then(callDefault).catch(fail);
break;
case 'admin:conversational_development_index:show':
new UserCallout();
......
import Todos from './todos';
export default () => new Todos();
/* eslint-disable class-methods-use-this, no-unneeded-ternary, quote-props */
import { visitUrl } from './lib/utils/url_utility';
import UsersSelect from './users_select';
import { isMetaClick } from './lib/utils/common_utils';
import { visitUrl } from '~/lib/utils/url_utility';
import UsersSelect from '~/users_select';
import { isMetaClick } from '~/lib/utils/common_utils';
export default class Todos {
constructor() {
......
import * as urlUtils from '~/lib/utils/url_utility';
import Todos from '~/todos';
import Todos from '~/pages/dashboard/todos/index/todos';
import '~/lib/utils/common_utils';
describe('Todos', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment