Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/sidebar/dynamicNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import {sortPages} from 'sentry-docs/utils';
import {getUnversionedPath, VERSION_INDICATOR} from 'sentry-docs/versioning';

import {CollapsibleSidebarLink} from './collapsibleSidebarLink';
import {SidebarLink} from './sidebarLink';
import {SidebarLink, SidebarSeparator} from './sidebarLink';

type Node = {
[key: string]: any;
context: {
[key: string]: any;
beta?: boolean;
new?: boolean;
section_end_divider?: boolean;
sidebar_hidden?: boolean;
sidebar_order?: number;
sidebar_title?: string;
Expand Down Expand Up @@ -98,6 +99,11 @@ export const renderChildren = (
{renderChildren(nodeChildren, exclude, path, showDepth, depth + 1)}
</CollapsibleSidebarLink>
);

// Add separator after this item if section_end_divider is true
if (node.context.section_end_divider && depth === 0) {
result.push(<SidebarSeparator key={`separator-${node.path}`} />);
}
});

return result;
Expand Down
1 change: 1 addition & 0 deletions src/components/sidebar/platformSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export function PlatformSidebar({
sidebar_hidden: n.frontmatter.sidebar_hidden,
beta: n.frontmatter.beta,
new: n.frontmatter.new,
section_end_divider: n.frontmatter.section_end_divider,
},
path: '/' + n.path + '/',
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/sidebarLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ export function SidebarLink({
}

export function SidebarSeparator() {
return <hr className={styles['sidebar-separator']} />;
return <hr className={`${styles['sidebar-separator']} mt-3 mb-3`} />;
}
4 changes: 1 addition & 3 deletions src/components/sidebar/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,5 @@
}

.sidebar-separator {
margin: 1rem 0;
border: none;
border-top: 1px solid var(--border-color);
border-top: 2px solid var(--gray-6);
}
Loading