Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Small positioning adjustments to the data studio nav bar (#71379)

Nick Fitzpatrick5ac346612faf
diff --git a/enterprise/frontend/src/metabase-enterprise/data-studio/workspaces/components/WorkspaceSection.tsx b/enterprise/frontend/src/metabase-enterprise/data-studio/workspaces/components/WorkspaceSection.tsx
index 9ffa27bf572..1b2af70c66e 100644
--- a/enterprise/frontend/src/metabase-enterprise/data-studio/workspaces/components/WorkspaceSection.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/data-studio/workspaces/components/WorkspaceSection.tsx
@@ -114,11 +114,15 @@ export function WorkspacesSection({ showLabel }: WorkspacesSectionProps) {
className={cx(S.tab, { [S.selected]: isWorkspaceListPage })}
component={ForwardRefLink}
to={Urls.dataStudioWorkspaceList()}
- p="0.75rem"
+ p="sm"
bdrs="md"
>
- <Flex align="center" justify="center">
- <FixedSizeIcon name="git_branch" display="block" />
+ <Flex align="center" justify="center" w="100%">
+ <FixedSizeIcon
+ name="git_branch"
+ display="block"
+ c="text-secondary"
+ />
</Flex>
</UnstyledButton>
</Tooltip>
diff --git a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.module.css b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.module.css
index c4d498451b1..fdf931db03a 100644
--- a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.module.css
+++ b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.module.css
@@ -21,7 +21,8 @@
.tab {
display: flex;
align-items: center;
- gap: 0.5rem;
+ justify-content: center;
+ width: 100%;
&:hover {
background-color: var(--mb-color-background-hover);
diff --git a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.tsx b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.tsx
index ff8104d7d87..1cf414c1ca7 100644
--- a/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.tsx
+++ b/frontend/src/metabase/data-studio/app/pages/DataStudioLayout/DataStudioLayout.tsx
@@ -261,13 +261,15 @@ function DataStudioTab({
openDelay={TOOLTIP_OPEN_DELAY}
disabled={showLabel}
>
- <Box
+ <Flex
className={cx(S.tab, { [S.selected]: isSelected })}
component={ForwardRefLink}
to={to}
- p="0.5rem"
+ p="sm"
+ gap="sm"
bdrs="md"
aria-label={label}
+ justify={showLabel ? "start" : "center"}
>
<FixedSizeIcon name={icon} display="block" className={S.icon} />
{showLabel && <Text lh="sm">{label}</Text>}
@@ -279,7 +281,7 @@ function DataStudioTab({
{effectiveRightSection}
</Box>
)}
- </Box>
+ </Flex>
</Tooltip>
);
}
@@ -302,10 +304,9 @@ function DataStudioNavbarToggle({
return (
<Flex
align="center"
- justify="space-between"
+ justify={isNavbarOpened ? "space-between" : "center"}
mb="0.75rem"
mt="sm"
- mr="0.125rem"
>
<Group gap="sm">
<Box