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
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,24 @@ Overrides for Fumadocs content. Everything after prose is MDX generated content

#nd-sidebar {
--fd-sidebar-top: var(--header-height) !important;
position: sticky !important;
height: calc(100vh - var(--header-height));
}

#nd-docs-layout {
flex-direction: row !important;
padding-inline-start: 0 !important;
}

/* Hacky fix to get the TOC to be sticky */
#nd-toc {
top: var(--header-height) !important;
height: max-content;
position: sticky;
margin-left: calc(-1 * var(--fd-toc-width));
}

#nd-toc > div {
position: relative;
left: var(--fd-toc-width);
}
15 changes: 10 additions & 5 deletions apps/developer-hub/src/components/search-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { SearchButton as SearchButtonComponent } from "@pythnetwork/component-library/SearchButton";
import DefaultSearchDialog from "fumadocs-ui/components/dialog/search-default";
import { useCallback, useState } from "react";
import { createPortal } from "react-dom";

export const SearchButton = () => {
const [open, setOpen] = useState(false);
Expand All @@ -19,11 +20,15 @@ export const SearchButton = () => {
largeScreenContent="Search"
onClick={handleSearch}
/>
<DefaultSearchDialog
open={open}
onOpenChange={setOpen}
api="/api/search"
/>
{open &&
createPortal(
<DefaultSearchDialog
open={open}
onOpenChange={setOpen}
api="/api/search"
/>,
document.body,
)}
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
background: theme.color("background", "primary");
border-top-left-radius: calc(var(--offset) * theme.border-radius("xl"));
border-top-right-radius: calc(var(--offset) * theme.border-radius("xl"));
height: 100dvh;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change is safe but I'd be careful with it and make sure to test across screen sizes, especially with the interactions with overlays / drawers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually this is just reverting to the initial version, think just the ordering changed here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes I missed the deleted line below, nice ok

overflow: hidden auto;
transform: scale(calc(100% - (var(--offset) * 5%)));
height: 100dvh;
scrollbar-gutter: stable;

.header {
Expand Down
Loading