Compare 76e8704 ... +1 ... f6dce3d

Coverage Reach
wagtail/admin/views/pages/edit.py wagtail/admin/views/pages/create.py wagtail/admin/views/pages/revisions.py wagtail/admin/views/pages/workflow.py wagtail/admin/views/pages/preview.py wagtail/admin/views/pages/search.py wagtail/admin/views/pages/history.py wagtail/admin/views/pages/moderation.py wagtail/admin/views/pages/move.py wagtail/admin/views/pages/copy.py wagtail/admin/views/pages/listing.py wagtail/admin/views/pages/lock.py wagtail/admin/views/pages/convert_alias.py wagtail/admin/views/pages/unpublish.py wagtail/admin/views/pages/delete.py wagtail/admin/views/pages/ordering.py wagtail/admin/views/pages/usage.py wagtail/admin/views/pages/utils.py wagtail/admin/views/workflows.py wagtail/admin/views/generic.py wagtail/admin/views/account.py wagtail/admin/views/mixins.py wagtail/admin/views/chooser.py wagtail/admin/views/reports.py wagtail/admin/views/home.py wagtail/admin/views/collections.py wagtail/admin/views/page_privacy.py wagtail/admin/views/collection_privacy.py wagtail/admin/views/userbar.py wagtail/admin/views/tags.py wagtail/admin/rich_text/converters/html_to_contentstate.py wagtail/admin/rich_text/converters/editor_html.py wagtail/admin/rich_text/converters/html_ruleset.py wagtail/admin/rich_text/converters/contentstate_models.py wagtail/admin/rich_text/converters/contentstate.py wagtail/admin/rich_text/editors/hallo.py wagtail/admin/rich_text/editors/draftail/__init__.py wagtail/admin/rich_text/editors/draftail/features.py wagtail/admin/rich_text/__init__.py wagtail/admin/edit_handlers.py wagtail/admin/forms/collections.py wagtail/admin/forms/workflows.py wagtail/admin/forms/pages.py wagtail/admin/forms/models.py wagtail/admin/forms/choosers.py wagtail/admin/forms/view_restrictions.py wagtail/admin/forms/tags.py wagtail/admin/forms/auth.py wagtail/admin/forms/search.py wagtail/admin/forms/__init__.py wagtail/admin/compare.py wagtail/admin/widgets/chooser.py wagtail/admin/widgets/datetime.py wagtail/admin/widgets/button.py wagtail/admin/widgets/filtered_select.py wagtail/admin/widgets/tags.py wagtail/admin/widgets/workflows.py wagtail/admin/widgets/button_select.py wagtail/admin/widgets/auto_height_text.py wagtail/admin/widgets/__init__.py wagtail/admin/wagtail_hooks.py wagtail/admin/templatetags/wagtailadmin_tags.py wagtail/admin/templatetags/wagtailuserbar.py wagtail/admin/static_src/wagtailadmin/js/page-editor.js wagtail/admin/static_src/wagtailadmin/js/vendor/urlify.js wagtail/admin/static_src/wagtailadmin/js/vendor/jquery-3.5.1.min.js wagtail/admin/static_src/wagtailadmin/app/wagtailadmin.entry.js wagtail/admin/static_src/wagtailadmin/app/draftail.entry.js wagtail/admin/action_menu.py wagtail/admin/mail.py wagtail/admin/api/serializers.py wagtail/admin/api/views.py wagtail/admin/api/filters.py wagtail/admin/api/urls.py wagtail/admin/filters.py wagtail/admin/auth.py wagtail/admin/menu.py wagtail/admin/userbar.py wagtail/admin/viewsets/model.py wagtail/admin/viewsets/__init__.py wagtail/admin/viewsets/base.py wagtail/admin/checks.py wagtail/admin/search.py wagtail/admin/urls/__init__.py wagtail/admin/urls/pages.py wagtail/admin/urls/collections.py wagtail/admin/urls/workflows.py wagtail/admin/urls/reports.py wagtail/admin/urls/password_reset.py wagtail/admin/site_summary.py wagtail/admin/messages.py wagtail/admin/log_action_registry.py wagtail/admin/staticfiles.py wagtail/admin/navigation.py wagtail/admin/models.py wagtail/admin/signal_handlers.py wagtail/admin/localization.py wagtail/admin/modal_workflow.py wagtail/admin/apps.py wagtail/admin/jinja2tags.py wagtail/admin/datetimepicker.py wagtail/admin/blocks.py wagtail/admin/signals.py wagtail/admin/__init__.py wagtail/contrib/modeladmin/views.py wagtail/contrib/modeladmin/options.py wagtail/contrib/modeladmin/helpers/button.py wagtail/contrib/modeladmin/helpers/permission.py wagtail/contrib/modeladmin/helpers/url.py wagtail/contrib/modeladmin/helpers/search.py wagtail/contrib/modeladmin/helpers/__init__.py wagtail/contrib/modeladmin/templatetags/modeladmin_tags.py wagtail/contrib/modeladmin/menus.py wagtail/contrib/modeladmin/mixins.py wagtail/contrib/modeladmin/forms.py wagtail/contrib/modeladmin/apps.py wagtail/contrib/modeladmin/__init__.py wagtail/contrib/redirects/views.py wagtail/contrib/redirects/base_formats.py wagtail/contrib/redirects/management/commands/import_redirects.py wagtail/contrib/redirects/models.py wagtail/contrib/redirects/forms.py wagtail/contrib/redirects/tmp_storages.py wagtail/contrib/redirects/middleware.py wagtail/contrib/redirects/utils.py wagtail/contrib/redirects/wagtail_hooks.py wagtail/contrib/redirects/apps.py wagtail/contrib/redirects/urls.py wagtail/contrib/redirects/permissions.py wagtail/contrib/redirects/__init__.py wagtail/contrib/postgres_search/backend.py wagtail/contrib/postgres_search/query.py wagtail/contrib/postgres_search/utils.py wagtail/contrib/postgres_search/models.py wagtail/contrib/postgres_search/apps.py wagtail/contrib/postgres_search/__init__.py wagtail/contrib/forms/views.py wagtail/contrib/forms/models.py wagtail/contrib/forms/forms.py wagtail/contrib/forms/utils.py wagtail/contrib/forms/edit_handlers.py wagtail/contrib/forms/wagtail_hooks.py wagtail/contrib/forms/apps.py wagtail/contrib/forms/urls.py wagtail/contrib/forms/__init__.py wagtail/contrib/frontend_cache/tests.py wagtail/contrib/frontend_cache/backends.py wagtail/contrib/frontend_cache/utils.py wagtail/contrib/frontend_cache/signal_handlers.py wagtail/contrib/frontend_cache/apps.py wagtail/contrib/frontend_cache/__init__.py wagtail/contrib/search_promotions/tests.py wagtail/contrib/search_promotions/views.py wagtail/contrib/search_promotions/forms.py wagtail/contrib/search_promotions/wagtail_hooks.py wagtail/contrib/search_promotions/models.py wagtail/contrib/search_promotions/templatetags/wagtailsearchpromotions_tags.py wagtail/contrib/search_promotions/apps.py wagtail/contrib/search_promotions/admin_urls.py wagtail/contrib/search_promotions/__init__.py wagtail/contrib/routable_page/tests.py wagtail/contrib/routable_page/models.py wagtail/contrib/routable_page/templatetags/wagtailroutablepage_tags.py wagtail/contrib/routable_page/apps.py wagtail/contrib/routable_page/__init__.py wagtail/contrib/settings/views.py wagtail/contrib/settings/models.py wagtail/contrib/settings/jinja2tags.py wagtail/contrib/settings/registry.py wagtail/contrib/settings/context_processors.py wagtail/contrib/settings/forms.py wagtail/contrib/settings/templatetags/wagtailsettings_tags.py wagtail/contrib/settings/wagtail_hooks.py wagtail/contrib/settings/apps.py wagtail/contrib/settings/urls.py wagtail/contrib/settings/permissions.py wagtail/contrib/settings/__init__.py wagtail/contrib/table_block/tests.py wagtail/contrib/table_block/blocks.py wagtail/contrib/table_block/templatetags/table_block_tags.py wagtail/contrib/table_block/apps.py wagtail/contrib/table_block/__init__.py wagtail/contrib/sitemaps/tests.py wagtail/contrib/sitemaps/sitemap_generator.py wagtail/contrib/sitemaps/views.py wagtail/contrib/sitemaps/apps.py wagtail/contrib/sitemaps/__init__.py wagtail/contrib/styleguide/views.py wagtail/contrib/styleguide/wagtail_hooks.py wagtail/contrib/styleguide/tests.py wagtail/contrib/styleguide/apps.py wagtail/contrib/styleguide/__init__.py wagtail/core/models.py wagtail/core/blocks/field_block.py wagtail/core/blocks/stream_block.py wagtail/core/blocks/base.py wagtail/core/blocks/struct_block.py wagtail/core/blocks/list_block.py wagtail/core/blocks/static_block.py wagtail/core/blocks/__init__.py wagtail/core/blocks/utils.py wagtail/core/management/commands/fixtree.py wagtail/core/management/commands/publish_scheduled_pages.py wagtail/core/management/commands/create_log_entries_from_revisions.py wagtail/core/management/commands/replace_text.py wagtail/core/management/commands/purge_revisions.py wagtail/core/management/commands/move_pages.py wagtail/core/management/commands/set_url_paths.py wagtail/core/permission_policies/collections.py wagtail/core/permission_policies/base.py wagtail/core/permission_policies/__init__.py wagtail/core/query.py wagtail/core/rich_text/rewriters.py wagtail/core/rich_text/feature_registry.py wagtail/core/rich_text/__init__.py wagtail/core/rich_text/pages.py wagtail/core/utils.py wagtail/core/templatetags/wagtailcore_tags.py wagtail/core/fields.py wagtail/core/whitelist.py wagtail/core/treebeard.py wagtail/core/wagtail_hooks.py wagtail/core/hooks.py wagtail/core/jinja2tags.py wagtail/core/views.py wagtail/core/signal_handlers.py wagtail/core/forms.py wagtail/core/workflows.py wagtail/core/sites.py wagtail/core/signals.py wagtail/core/urls.py wagtail/core/apps.py wagtail/core/url_routing.py wagtail/core/compat.py wagtail/core/permissions.py wagtail/core/__init__.py wagtail/core/exceptions.py wagtail/images/views/images.py wagtail/images/views/multiple.py wagtail/images/views/chooser.py wagtail/images/views/serve.py wagtail/images/models.py wagtail/images/image_operations.py wagtail/images/rect.py wagtail/images/templatetags/wagtailimages_tags.py wagtail/images/wagtail_hooks.py wagtail/images/fields.py wagtail/images/rich_text/contentstate.py wagtail/images/rich_text/editor_html.py wagtail/images/rich_text/__init__.py wagtail/images/formats.py wagtail/images/api/v2/views.py wagtail/images/api/v2/serializers.py wagtail/images/api/fields.py wagtail/images/api/admin/views.py wagtail/images/api/admin/serializers.py wagtail/images/utils.py wagtail/images/forms.py wagtail/images/checks.py wagtail/images/blocks.py wagtail/images/widgets.py wagtail/images/jinja2tags.py wagtail/images/signal_handlers.py wagtail/images/edit_handlers.py wagtail/images/__init__.py wagtail/images/apps.py wagtail/images/shortcuts.py wagtail/images/admin.py wagtail/images/admin_urls.py wagtail/images/permissions.py wagtail/images/urls.py wagtail/images/exceptions.py wagtail/search/backends/elasticsearch2.py wagtail/search/backends/base.py wagtail/search/backends/db.py wagtail/search/backends/elasticsearch7.py wagtail/search/backends/__init__.py wagtail/search/backends/elasticsearch5.py wagtail/search/backends/elasticsearch6.py wagtail/search/index.py wagtail/search/management/commands/update_index.py wagtail/search/management/commands/search_garbage_collect.py wagtail/search/management/commands/wagtail_update_index.py wagtail/search/utils.py wagtail/search/models.py wagtail/search/query.py wagtail/search/views/queries.py wagtail/search/signal_handlers.py wagtail/search/apps.py wagtail/search/queryset.py wagtail/search/wagtail_hooks.py wagtail/search/urls/admin.py wagtail/search/forms.py wagtail/search/__init__.py wagtail/snippets/tests.py wagtail/snippets/views/snippets.py wagtail/snippets/views/chooser.py wagtail/snippets/action_menu.py wagtail/snippets/wagtail_hooks.py wagtail/snippets/widgets.py wagtail/snippets/models.py wagtail/snippets/blocks.py wagtail/snippets/permissions.py wagtail/snippets/templatetags/wagtailsnippets_admin_tags.py wagtail/snippets/edit_handlers.py wagtail/snippets/apps.py wagtail/snippets/urls.py wagtail/snippets/__init__.py wagtail/users/tests.py wagtail/users/forms.py wagtail/users/views/users.py wagtail/users/views/groups.py wagtail/users/wagtail_hooks.py wagtail/users/templatetags/wagtailusers_tags.py wagtail/users/models.py wagtail/users/utils.py wagtail/users/apps.py wagtail/users/widgets.py wagtail/users/urls/users.py wagtail/users/__init__.py wagtail/api/v2/views.py wagtail/api/v2/serializers.py wagtail/api/v2/filters.py wagtail/api/v2/utils.py wagtail/api/v2/router.py wagtail/api/v2/signal_handlers.py wagtail/api/v2/pagination.py wagtail/api/v2/apps.py wagtail/api/v2/__init__.py wagtail/api/conf.py wagtail/api/__init__.py wagtail/documents/views/documents.py wagtail/documents/views/chooser.py wagtail/documents/views/serve.py wagtail/documents/views/multiple.py wagtail/documents/models.py wagtail/documents/wagtail_hooks.py wagtail/documents/rich_text/editor_html.py wagtail/documents/rich_text/contentstate.py wagtail/documents/rich_text/__init__.py wagtail/documents/api/v2/views.py wagtail/documents/api/v2/serializers.py wagtail/documents/api/admin/views.py wagtail/documents/forms.py wagtail/documents/widgets.py wagtail/documents/blocks.py wagtail/documents/__init__.py wagtail/documents/apps.py wagtail/documents/signal_handlers.py wagtail/documents/admin.py wagtail/documents/edit_handlers.py wagtail/documents/admin_urls.py wagtail/documents/permissions.py wagtail/documents/urls.py wagtail/embeds/finders/oembed.py wagtail/embeds/finders/embedly.py wagtail/embeds/finders/__init__.py wagtail/embeds/finders/base.py wagtail/embeds/oembed_providers.py wagtail/embeds/rich_text/contentstate.py wagtail/embeds/rich_text/__init__.py wagtail/embeds/rich_text/editor_html.py wagtail/embeds/blocks.py wagtail/embeds/models.py wagtail/embeds/views/chooser.py wagtail/embeds/embeds.py wagtail/embeds/wagtail_hooks.py wagtail/embeds/templatetags/wagtailembeds_tags.py wagtail/embeds/format.py wagtail/embeds/apps.py wagtail/embeds/exceptions.py wagtail/embeds/forms.py wagtail/embeds/urls.py wagtail/embeds/__init__.py wagtail/utils/sendfile.py wagtail/utils/setup.py wagtail/utils/sendfile_streaming_backend.py wagtail/utils/deprecation.py wagtail/utils/decorators.py wagtail/utils/version.py wagtail/utils/widgets.py wagtail/utils/apps.py wagtail/utils/loading.py wagtail/utils/urlpatterns.py wagtail/utils/utils.py wagtail/sites/tests.py wagtail/sites/views.py wagtail/sites/wagtail_hooks.py wagtail/sites/forms.py wagtail/sites/apps.py wagtail/sites/__init__.py wagtail/locales/tests.py wagtail/locales/views.py wagtail/locales/wagtail_hooks.py wagtail/locales/forms.py wagtail/locales/utils.py wagtail/locales/apps.py wagtail/locales/__init__.py wagtail/bin/wagtail.py wagtail/__init__.py client/src/components/Draftail/sources/ModalWorkflowSource.js client/src/components/Draftail/decorators/TooltipEntity.js client/src/components/Draftail/decorators/Link.js client/src/components/Draftail/decorators/Document.js client/src/components/Draftail/blocks/MediaBlock.js client/src/components/Draftail/blocks/ImageBlock.js client/src/components/Draftail/blocks/EmbedBlock.js client/src/components/Draftail/EditorFallback/EditorFallback.js client/src/components/Draftail/index.js client/src/components/Draftail/DraftUtils.js client/src/components/Draftail/Tooltip/Tooltip.js client/src/components/Explorer/ExplorerPanel.tsx client/src/components/Explorer/reducers/nodes.ts client/src/components/Explorer/reducers/explorer.ts client/src/components/Explorer/actions.ts client/src/components/Explorer/index.tsx client/src/components/Explorer/Explorer.tsx client/src/components/Explorer/ExplorerItem.tsx client/src/components/Explorer/ExplorerToggle.tsx client/src/components/Explorer/ExplorerHeader.tsx client/src/components/Explorer/PageCount.tsx client/src/components/Portal/Portal.js client/src/components/Button/Button.js client/src/components/UpgradeNotification/index.js client/src/components/Transition/Transition.js client/src/components/Icon/Icon.js client/src/components/PublicationStatus/PublicationStatus.js client/src/components/LoadingSpinner/LoadingSpinner.js client/src/includes/initSubmenus.js client/src/includes/initSkipLink.js client/src/includes/initIE11Warning.js client/src/utils/focus.js client/src/utils/version.js client/src/utils/actions.ts client/src/api/client.js client/src/api/admin.ts client/src/index.ts client/src/config/wagtailConfig.js

Flags

Flags have been temporarily removed from this view while the flagging feature is refactored for better performance and user experience.

You can still use flags when viewing individual files. Flag-level thresholds will also remain on pull and merge requests in your repository provider.

More information can be found in our documentation.


@@ -1,11 +1,13 @@
Loading
1 1
export interface State {
2 2
  isVisible: boolean;
3 -
  path: number[];
3 +
  depth: number;
4 +
  currentPageId: number | null;
4 5
}
5 6
6 7
const defaultState: State = {
7 8
  isVisible: false,
8 -
  path: [],
9 +
  depth: 0,
10 +
  currentPageId: null,
9 11
};
10 12
11 13
export const OPEN_EXPLORER = 'OPEN_EXPLORER';
@@ -21,48 +23,40 @@
Loading
21 23
  type: typeof CLOSE_EXPLORER;
22 24
}
23 25
24 -
export const PUSH_PAGE = 'PUSH_PAGE';
25 -
interface PushPageAction {
26 -
  type: typeof PUSH_PAGE;
26 +
export const GOTO_PAGE = 'GOTO_PAGE';
27 +
interface GotoPageAction {
28 +
  type: typeof GOTO_PAGE;
27 29
  payload: {
28 30
    id: number;
31 +
    transition: number;
29 32
  }
30 33
}
31 34
32 -
export const POP_PAGE = 'POP_PAGE';
33 -
interface PopPageAction {
34 -
  type: typeof POP_PAGE;
35 -
}
36 -
37 -
export type Action = OpenExplorerAction | CloseExplorerAction | PushPageAction | PopPageAction;
35 +
export type Action = OpenExplorerAction | CloseExplorerAction |GotoPageAction;
38 36
39 37
/**
40 38
 * Oversees the state of the explorer. Defines:
41 39
 * - Where in the page tree the explorer is at.
42 40
 * - Whether the explorer is open or not.
43 41
 */
44 -
export default function explorer(prevState = defaultState, action: Action) {
42 +
export default function explorer(prevState = defaultState, action: Action): State {
45 43
  switch (action.type) {
46 44
  case OPEN_EXPLORER:
47 45
    // Provide a starting page when opening the explorer.
48 46
    return {
49 47
      isVisible: true,
50 -
      path: [action.payload.id],
48 +
      depth: 0,
49 +
      currentPageId: action.payload.id,
51 50
    };
52 51
53 52
  case CLOSE_EXPLORER:
54 53
    return defaultState;
55 54
56 -
  case PUSH_PAGE:
57 -
    return {
58 -
      isVisible: prevState.isVisible,
59 -
      path: prevState.path.concat([action.payload.id]),
60 -
    };
61 -
62 -
  case POP_PAGE:
55 +
  case GOTO_PAGE:
63 56
    return {
64 57
      isVisible: prevState.isVisible,
65 -
      path: prevState.path.slice(0, -1),
58 +
      depth: prevState.depth + action.payload.transition,
59 +
      currentPageId: action.payload.id,
66 60
    };
67 61
68 62
  default:

@@ -15,11 +15,10 @@
Loading
15 15
16 16
interface ExplorerPanelProps {
17 17
  nodes: NodeState;
18 -
  path: number[];
18 +
  depth: number;
19 19
  page: PageState;
20 20
  onClose(): void;
21 -
  popPage(): void;
22 -
  pushPage(id: number): void;
21 +
  gotoPage(id: number, transition: number): void;
23 22
}
24 23
25 24
interface ExplorerPanelState {
@@ -46,8 +45,8 @@
Loading
46 45
  }
47 46
48 47
  componentWillReceiveProps(newProps) {
49 -
    const { path } = this.props;
50 -
    const isPush = newProps.path.length > path.length;
48 +
    const { depth } = this.props;
49 +
    const isPush = newProps.depth > depth;
51 50
52 51
    this.setState({
53 52
      transition: isPush ? PUSH : POP,
@@ -90,23 +89,24 @@
Loading
90 89
  }
91 90
92 91
  onItemClick(id, e) {
93 -
    const { pushPage } = this.props;
92 +
    const { gotoPage } = this.props;
94 93
95 94
    e.preventDefault();
96 95
    e.stopPropagation();
97 96
98 -
    pushPage(id);
97 +
    gotoPage(id, 1);
99 98
  }
100 99
101 100
  onHeaderClick(e) {
102 -
    const { path, popPage } = this.props;
103 -
    const hasBack = path.length > 1;
101 +
    const { page, depth, gotoPage } = this.props;
102 +
    const parent = page.meta.parent?.id;
104 103
105 -
    if (hasBack) {
104 +
    // Note: Checking depth as well in case the user started deep in the tree
105 +
    if (depth > 0 && parent) {
106 106
      e.preventDefault();
107 107
      e.stopPropagation();
108 108
109 -
      popPage();
109 +
      gotoPage(parent, -1);
110 110
    }
111 111
  }
112 112
@@ -152,7 +152,7 @@
Loading
152 152
  }
153 153
154 154
  render() {
155 -
    const { page, onClose, path } = this.props;
155 +
    const { page, onClose, depth } = this.props;
156 156
    const { transition, paused } = this.state;
157 157
158 158
    return (
@@ -166,13 +166,13 @@
Loading
166 166
          onDeactivate: onClose,
167 167
        }}
168 168
      >
169 -
        <Button className="c-explorer__close" onClick={onClose}>
169 +
        <Button className="c-explorer__close">
170 170
          {STRINGS.CLOSE_EXPLORER}
171 171
        </Button>
172 172
        <Transition name={transition} className="c-explorer" component="nav" label={STRINGS.PAGE_EXPLORER}>
173 -
          <div key={path.length} className="c-transition-group">
173 +
          <div key={depth} className="c-transition-group">
174 174
            <ExplorerHeader
175 -
              depth={path.length}
175 +
              depth={depth}
176 176
              page={page}
177 177
              onClick={this.onHeaderClick}
178 178
            />

@@ -11,44 +11,40 @@
Loading
11 11
12 12
interface ExplorerProps {
13 13
  isVisible: boolean;
14 -
  path: number[],
14 +
  depth: number,
15 +
  currentPageId: number | null,
15 16
  nodes: NodeState,
16 17
  onClose(): void;
17 18
  popPage(): void;
18 -
  pushPage(id: number): void;
19 +
  gotoPage(id: number, transition: number): void;
19 20
}
20 21
21 22
const Explorer: React.FunctionComponent<ExplorerProps> = ({
22 23
  isVisible,
24 +
  depth,
25 +
  currentPageId,
23 26
  nodes,
24 -
  path,
25 -
  pushPage,
26 -
  popPage,
27 +
  gotoPage,
27 28
  onClose,
28 -
}) => {
29 -
  const page = nodes[path[path.length - 1]];
30 -
31 -
  return isVisible ? (
32 -
    <ExplorerPanel
33 -
      path={path}
34 -
      page={page}
35 -
      nodes={nodes}
36 -
      onClose={onClose}
37 -
      popPage={popPage}
38 -
      pushPage={pushPage}
39 -
    />
40 -
  ) : null;
41 -
};
29 +
}) => ((isVisible && currentPageId) ? (
30 +
  <ExplorerPanel
31 +
    depth={depth}
32 +
    page={nodes[currentPageId]}
33 +
    nodes={nodes}
34 +
    gotoPage={gotoPage}
35 +
    onClose={onClose}
36 +
  />
37 +
) : null);
42 38
43 39
const mapStateToProps = (state: State) => ({
44 40
  isVisible: state.explorer.isVisible,
45 -
  path: state.explorer.path,
41 +
  depth: state.explorer.depth,
42 +
  currentPageId: state.explorer.currentPageId,
46 43
  nodes: state.nodes,
47 44
});
48 45
49 46
const mapDispatchToProps = (dispatch) => ({
50 -
  pushPage: (id) => dispatch(actions.pushPage(id)),
51 -
  popPage: () => dispatch(actions.popPage()),
47 +
  gotoPage: (id: number, transition: number) => dispatch(actions.gotoPage(id, transition)),
52 48
  onClose: () => dispatch(actions.closeExplorer()),
53 49
});
54 50

@@ -80,15 +80,14 @@
Loading
80 80
  };
81 81
}
82 82
83 -
export const popPage = createAction('POP_PAGE');
84 -
const pushPagePrivate = createAction('PUSH_PAGE', (id: number) => ({ id }));
83 +
const gotoPagePrivate = createAction('GOTO_PAGE', (id: number, transition: number) => ({ id, transition }));
85 84
86 -
export function pushPage(id: number): ThunkActionType {
85 +
export function gotoPage(id: number, transition: number): ThunkActionType {
87 86
  return (dispatch, getState) => {
88 87
    const { nodes } = getState();
89 88
    const page = nodes[id];
90 89
91 -
    dispatch(pushPagePrivate(id));
90 +
    dispatch(gotoPagePrivate(id, transition));
92 91
93 92
    if (page && !page.isFetching && !(page.children.count > 0)) {
94 93
      dispatch(getChildren(id));

@@ -18,7 +18,7 @@
Loading
18 18
 * and allowing access back to the parent level.
19 19
 */
20 20
const ExplorerHeader: React.FunctionComponent<ExplorerHeaderProps> = ({ page, depth, onClick }) => {
21 -
  const isRoot = depth === 1;
21 +
  const isRoot = depth === 0;
22 22
23 23
  return (
24 24
    <Button

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
client/src -0.24% 92.85%
wagtail 90.01%
Project Totals (438 files) 90.12%
Loading