The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
GDGT-3402: Stop account pages jumping horizontally (#84882)
Will Fry7341d2116825
diff --git a/frontend/src/metabase/account/app/components/AccountHeader/AccountHeader.module.css b/frontend/src/metabase/account/app/components/AccountHeader/AccountHeader.module.cssindex 1c47efd4ac4..b95aa74de97 100644--- a/frontend/src/metabase/account/app/components/AccountHeader/AccountHeader.module.css+++ b/frontend/src/metabase/account/app/components/AccountHeader/AccountHeader.module.css@@ -1,7 +1,3 @@-.root {- border-bottom: 1px solid var(--mb-color-border-neutral);-}-/* Doubled selector for higher specificity to override the inner styled UserAvatar */.avatar.avatar {width: 3em;diff --git a/frontend/src/metabase/account/app/components/AccountHeader/AccountHeader.tsx b/frontend/src/metabase/account/app/components/AccountHeader/AccountHeader.tsxindex 0d548241b52..6412da6f59a 100644--- a/frontend/src/metabase/account/app/components/AccountHeader/AccountHeader.tsx+++ b/frontend/src/metabase/account/app/components/AccountHeader/AccountHeader.tsx@@ -41,7 +41,6 @@ export const AccountHeader = ({return (<Flex- className={S.root}data-testid="account-header"direction="column"justify="center"diff --git a/frontend/src/metabase/account/app/components/AccountLayout/AccountLayout.module.css b/frontend/src/metabase/account/app/components/AccountLayout/AccountLayout.module.cssnew file mode 100644index 00000000000..3c7cbbe5dfe--- /dev/null+++ b/frontend/src/metabase/account/app/components/AccountLayout/AccountLayout.module.css@@ -0,0 +1,14 @@+.root {+ height: 100%;+ overflow-x: hidden;+ overflow-y: auto;+ scrollbar-gutter: stable both-edges;+}++/* Runs the header's divider out under the gutters while padding keeps the header itself the+ normal width. Overshooting is fine: the root clips it, and scrollbar widths vary by OS. */+.header {+ margin-inline: -2rem;+ padding-inline: 2rem;+ border-bottom: 1px solid var(--mb-color-border-neutral);+}diff --git a/frontend/src/metabase/account/app/components/AccountLayout/AccountLayout.tsx b/frontend/src/metabase/account/app/components/AccountLayout/AccountLayout.tsxindex a6139d4ee45..4f42e0d6afd 100644--- a/frontend/src/metabase/account/app/components/AccountLayout/AccountLayout.tsx+++ b/frontend/src/metabase/account/app/components/AccountLayout/AccountLayout.tsx@@ -4,6 +4,8 @@ import type { User } from "metabase-types/api";import { AccountHeader } from "../AccountHeader";+import S from "./AccountLayout.module.css";+interface AccountLayoutProps {user: User | null;path?: string;@@ -20,17 +22,20 @@ const AccountLayout = ({}return (- <div>- <AccountHeader- user={user}- path={path}- onChangeLocation={onChangeLocation}- />+ <div className={S.root}>+ <div className={S.header}>+ <AccountHeader+ user={user}+ path={path}+ onChangeLocation={onChangeLocation}+ />+ </div><Boxmx="auto"px={{ base: "sm", sm: "lg" }}py={{ base: "sm", sm: "xxl" }}- w={{ base: "100%", sm: rem(540) }}+ w="100%"+ maw={rem(540)}><Outlet /></Box>diff --git a/frontend/src/metabase/account/login-history/components/LoginHistory/LoginHistory.tsx b/frontend/src/metabase/account/login-history/components/LoginHistory/LoginHistory.tsxindex 4f0fadee448..d0a22ece902 100644--- a/frontend/src/metabase/account/login-history/components/LoginHistory/LoginHistory.tsx+++ b/frontend/src/metabase/account/login-history/components/LoginHistory/LoginHistory.tsx@@ -6,7 +6,7 @@ import { EmptyState } from "metabase/common/components/EmptyState";import { Label } from "metabase/common/components/type/Label";import CS from "metabase/css/core/index.css";import { dayjs } from "metabase/dayjs";-import { Box, Card, Flex, Text } from "metabase/ui";+import { Box, Card, Flex, Stack, Text } from "metabase/ui";import type { UserLoginHistoryItem } from "metabase-types/api";interface FormattedLoginItem extends UserLoginHistoryItem {@@ -43,8 +43,8 @@ const LoginHistoryGroup = ({items: FormattedLoginItem[];date: string;}) => (- <Box py="lg">- <Label>{date}</Label>+ <Box pb="lg">+ <Label mb="xl">{date}</Label><div>{items.map((item) => (<LoginHistoryItem key={item.timestamp} item={item} />@@ -81,11 +81,11 @@ function LoginHistoryList({}return (- <div>+ <Stack gap="lg">{_.map(groups, (items, date) => (<LoginHistoryGroup items={items} date={date} key={date} />))}- </div>+ </Stack>);}diff --git a/frontend/src/metabase/account/notifications/components/NotificationCard/DashboardNotificationCard.module.css b/frontend/src/metabase/account/notifications/components/NotificationCard/DashboardNotificationCard.module.cssindex 9252603fca6..392e027f5eb 100644--- a/frontend/src/metabase/account/notifications/components/NotificationCard/DashboardNotificationCard.module.css+++ b/frontend/src/metabase/account/notifications/components/NotificationCard/DashboardNotificationCard.module.css@@ -16,6 +16,7 @@.icon {cursor: pointer;+ flex-shrink: 0;&:hover {color: var(--mb-color-text-secondary);diff --git a/frontend/src/metabase/account/password/containers/UserPasswordApp/UserPasswordApp.tsx b/frontend/src/metabase/account/password/containers/UserPasswordApp/UserPasswordApp.tsxindex 9a8abe54456..475e2f798ae 100644--- a/frontend/src/metabase/account/password/containers/UserPasswordApp/UserPasswordApp.tsx+++ b/frontend/src/metabase/account/password/containers/UserPasswordApp/UserPasswordApp.tsx@@ -16,7 +16,7 @@ import { PLUGIN_MULTI_FACTOR_AUTH } from "metabase/plugins";import { useDispatch, useSelector } from "metabase/redux";import { useNavigate } from "metabase/router";import { useSetting } from "metabase/settings";-import { Stack } from "metabase/ui";+import { Stack, rem } from "metabase/ui";import { checkNotNull } from "metabase/utils/types";import { SlackAccount } from "../../components/SlackAccount/SlackAccount";@@ -72,7 +72,9 @@ const UserPasswordApp = () => {};return (- <Stack gap="xxl">+ // Form labels have a tighter line-height than the body text the other account tabs+ // start with, so nudge the content down to line their first lines up.+ <Stack gap="xxl" pt={rem(3)}>{!isSsoUser && (<Stack gap="lg"><UserPasswordForm user={user} onValidatePassword={validatePassword} />diff --git a/frontend/src/metabase/account/profile/components/UserProfileForm/UserProfileForm.tsx b/frontend/src/metabase/account/profile/components/UserProfileForm/UserProfileForm.tsxindex c896e12ec6f..1cbf3d7bdca 100644--- a/frontend/src/metabase/account/profile/components/UserProfileForm/UserProfileForm.tsx+++ b/frontend/src/metabase/account/profile/components/UserProfileForm/UserProfileForm.tsx@@ -139,9 +139,7 @@ const getLocaleOptions = (locales: LocaleData[] | null) => {const ColorSchemeSwitcher = () => {return (<Box mb="lg">- <Text mt="xxs" fw="bold">- {t`Theme`}- </Text>+ <Text fw="bold">{t`Theme`}</Text><ColorSchemeSelect /></Box>