Skip to content

Commit 3eb58b7

Browse files
author
Dobromir Hristov
authored
Cleanup and improvements to the Navigator (#423)
closes rdar://97716711 * refactor: navigator horizontal spacing to css vars * refactor: allow specifying the filter position of the Navigator via prop * refactor: use a DynamicScroller for the NavigatorCard. Cleanup styling to allow no truncation on navigator items.
1 parent 9eb5bb4 commit 3eb58b7

File tree

11 files changed

+259
-213
lines changed

11 files changed

+259
-213
lines changed

src/components/AdjustableSidebarWidth.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ export default {
420420
z-index: $nav-z-index + 1;
421421
transform: translateX(-100%);
422422
transition: transform 0.15s ease-in;
423+
left: 0;
423424
424425
/deep/ .aside-animated-child {
425426
opacity: 0;

src/components/Navigator.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
:active-path="activePath"
2424
:scrollLockID="scrollLockID"
2525
:error-fetching="errorFetching"
26-
:breakpoint="breakpoint"
26+
:render-filter-on-top="renderFilterOnTop"
2727
:api-changes="apiChanges"
2828
:allow-hiding="allowHiding"
2929
:enableQuickNavigation="enableQuickNavigation"
@@ -48,7 +48,6 @@ import SpinnerIcon from 'theme/components/Icons/SpinnerIcon.vue';
4848
import NavigatorCardInner from 'docc-render/components/Navigator/NavigatorCardInner.vue';
4949
import { INDEX_ROOT_KEY } from 'docc-render/constants/sidebar';
5050
import { TopicTypes } from 'docc-render/constants/TopicTypes';
51-
import { BreakpointName } from 'docc-render/utils/breakpoints';
5251
import { getSetting } from 'docc-render/utils/theme-settings';
5352
5453
/**
@@ -115,9 +114,9 @@ export default {
115114
type: Boolean,
116115
default: false,
117116
},
118-
breakpoint: {
119-
type: String,
120-
default: BreakpointName.large,
117+
renderFilterOnTop: {
118+
type: Boolean,
119+
default: false,
121120
},
122121
apiChanges: {
123122
type: Object,
@@ -275,6 +274,9 @@ export default {
275274
align-items: center;
276275
color: var(--color-figure-gray-secondary);
277276
justify-content: center;
277+
height: 100vh;
278+
position: sticky;
279+
top: var(--nav-height, 0px);
278280
}
279281
280282
.loading-spinner {

0 commit comments

Comments
 (0)