Skip to content

Commit f0d4c15

Browse files
authored
Navigator gets data from IndexStore (#896) rdar://134347681
`Navigator` gets data from `IndexStore` (#896) rdar://134347681
1 parent 97c6c69 commit f0d4c15

File tree

10 files changed

+97
-1447
lines changed

10 files changed

+97
-1447
lines changed

src/components/DocumentationLayout.vue

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -30,46 +30,44 @@
3030
>
3131
<PortalTarget name="modal-destination" multiple />
3232
<template #aside="{ scrollLockID, breakpoint }">
33-
<NavigatorDataProvider
34-
:interface-language="interfaceLanguage"
35-
:technologyUrl="technology ? technology.url : ''"
36-
:api-changes-version="selectedAPIChangesVersion"
37-
ref="NavigatorDataProvider"
38-
>
39-
<template #default="slotProps">
40-
<div class="documentation-layout-aside">
41-
<QuickNavigationModal
42-
v-if="enableQuickNavigation"
43-
:children="indexNodes"
44-
:showQuickNavigationModal.sync="showQuickNavigationModal"
45-
:technology="technology ? technology.title : ''"
46-
/>
47-
<transition name="delay-hiding">
48-
<Navigator
49-
v-show="sidenavVisibleOnMobile || breakpoint === BreakpointName.large"
50-
:flatChildren="slotProps.flatChildren"
51-
:parent-topic-identifiers="parentTopicIdentifiers"
52-
:technology="slotProps.technology || technology"
53-
:is-fetching="slotProps.isFetching"
54-
:error-fetching="slotProps.errorFetching"
55-
:api-changes="slotProps.apiChanges"
56-
:references="references"
57-
:navigator-references="slotProps.references"
58-
:scrollLockID="scrollLockID"
59-
:render-filter-on-top="breakpoint !== BreakpointName.large"
60-
@close="handleToggleSidenav(breakpoint)"
61-
>
62-
<template v-if="enableQuickNavigation" #filter>
63-
<QuickNavigationButton @click.native="openQuickNavigationModal" />
64-
</template>
65-
<template #navigator-head="{ className }">
66-
<slot name="nav-title" :className="className" />
67-
</template>
68-
</Navigator>
69-
</transition>
70-
</div>
71-
</template>
72-
</NavigatorDataProvider>
33+
<div class="documentation-layout-aside">
34+
<QuickNavigationModal
35+
v-if="enableQuickNavigation"
36+
:children="indexNodes"
37+
:showQuickNavigationModal.sync="showQuickNavigationModal"
38+
:technology="technology ? technology.title : ''"
39+
/>
40+
<transition name="delay-hiding">
41+
<slot
42+
name="navigator"
43+
v-bind="{
44+
scrollLockID,
45+
breakpoint,
46+
sidenavVisibleOnMobile,
47+
handleToggleSidenav,
48+
enableQuickNavigation,
49+
openQuickNavigationModal,
50+
}"
51+
>
52+
<Navigator
53+
v-show="sidenavVisibleOnMobile || breakpoint === BreakpointName.large"
54+
v-bind="{ ...navigatorProps, ...technologyProps }"
55+
:parent-topic-identifiers="parentTopicIdentifiers"
56+
:references="references"
57+
:scrollLockID="scrollLockID"
58+
:render-filter-on-top="breakpoint !== BreakpointName.large"
59+
@close="handleToggleSidenav(breakpoint)"
60+
>
61+
<template v-if="enableQuickNavigation" #filter>
62+
<QuickNavigationButton @click.native="openQuickNavigationModal" />
63+
</template>
64+
<template #navigator-head="{ className }">
65+
<slot name="nav-title" :className="className" />
66+
</template>
67+
</Navigator>
68+
</slot>
69+
</transition>
70+
</div>
7371
</template>
7472
<slot name="content" />
7573
</AdjustableSidebarWidth>
@@ -88,7 +86,6 @@ import { storage } from 'docc-render/utils/storage';
8886
import { getSetting } from 'docc-render/utils/theme-settings';
8987
9088
import indexDataGetter from 'docc-render/mixins/indexDataGetter';
91-
import NavigatorDataProvider from 'theme/components/Navigator/NavigatorDataProvider.vue';
9289
import DocumentationNav from 'theme/components/DocumentationTopic/DocumentationNav.vue';
9390
9491
const NAVIGATOR_HIDDEN_ON_LARGE_KEY = 'navigator-hidden-large';
@@ -99,7 +96,6 @@ export default {
9996
components: {
10097
Navigator,
10198
AdjustableSidebarWidth,
102-
NavigatorDataProvider,
10399
Nav: DocumentationNav,
104100
QuickNavigationButton,
105101
QuickNavigationModal,

src/components/Navigator.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default {
9191
type: Array,
9292
required: true,
9393
},
94-
technology: {
94+
technologyProps: {
9595
type: Object,
9696
required: false,
9797
},
@@ -153,13 +153,6 @@ export default {
153153
* The root item is always a module
154154
*/
155155
type: () => TopicTypes.module,
156-
technologyProps: ({ technology }) => (
157-
!technology ? null : {
158-
technology: technology.title,
159-
technologyPath: technology.path || technology.url,
160-
isTechnologyBeta: technology.beta,
161-
}
162-
),
163156
},
164157
};
165158
</script>

src/components/Navigator/NavigatorDataProvider.vue

Lines changed: 0 additions & 125 deletions
This file was deleted.

src/mixins/indexDataGetter.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,12 @@ export default {
3434
apiChanges,
3535
errorFetching,
3636
},
37-
technologyProps,
3837
}) => ({
3938
flatChildren: indexNodes,
4039
navigatorReferences: references,
4140
apiChanges,
4241
isFetching: !flatChildren && !errorFetching,
4342
errorFetching,
44-
technologyProps,
4543
}),
4644
},
4745
data() {

src/views/DocumentationTopic.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {
5252
shouldFetchDataForRouteUpdate,
5353
} from 'docc-render/utils/data';
5454
import DocumentationTopic from 'theme/components/DocumentationTopic.vue';
55-
import DocumentationLayout from 'docc-render/components/DocumentationLayout.vue';
55+
import DocumentationLayout from 'theme/components/DocumentationLayout.vue';
5656
import DocumentationTopicStore from 'docc-render/stores/DocumentationTopicStore';
5757
import indexDataFetcher from 'theme/mixins/indexDataFetcher';
5858
import Language from 'docc-render/constants/Language';

0 commit comments

Comments
 (0)