From d381f3ec6a713ca2c1a67c411f541d33aa3fc2f1 Mon Sep 17 00:00:00 2001 From: Alex Lorenzi Date: Tue, 21 Jan 2025 12:54:01 -0500 Subject: [PATCH] Override the BackstagePage default styles to avoid a "double scrollbar" situation that was stop the page from fully scrolling to the top of the page when we navigated to a new page Signed-off-by: Alex Lorenzi --- .../TechDocsReaderPage/TechDocsReaderPage.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx b/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx index 0f48df7f39..256ae0ec79 100644 --- a/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsReaderPage/TechDocsReaderPage.tsx @@ -166,6 +166,16 @@ export const TechDocsReaderPage = (props: TechDocsReaderPageProps) => { const readerPageTheme = createTheme({ ...currentTheme, + overrides: { + // This fixes issues with double scrolls in the TechDocs reader page on EntityPage + // @ts-ignore BackstagePage is not in the theme type + BackstagePage: { + root: { + height: 'inherit', + overflowY: 'visible', + }, + }, + }, ...(props.overrideThemeOptions || {}), }); const { kind, name, namespace } = useRouteRefParams(rootDocsRouteRef);