Skip to content
Snippets Groups Projects
Unverified Commit 0662d4a7 authored by metabase-bot[bot]'s avatar metabase-bot[bot] Committed by GitHub
Browse files

Prevent QB header from jumping between modes (#40335) (#40360)

parent 4bae8d07
Branches
Tags
No related merge requests found
......@@ -42,10 +42,24 @@ export const QueryBuilderMain = styled.main<{ isSidebarOpen: boolean }>`
}
`;
/**
* The height of the header for the query builder view.
* Currently hard coded based on the observation from the dev tools.
* It prevents the header from jumping when the notebook view is toggled.
*
* If we want to calculate this heaight based on the children of the header,
* we have to take into account the size of the buttons being used, as well as
* their line-height + font size. We should add the padding and the border to that.
*
* @link https://github.com/metabase/metabase/issues/40334
*/
const headerHeight = "4rem";
export const BorderedViewTitleHeader = styled(ViewTitleHeader)`
border-bottom: 1px solid ${color("border")};
padding-top: 8px;
padding-bottom: 8px;
min-height: ${headerHeight};
`;
export const QueryBuilderViewHeaderContainer = styled.div`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment