From bf5f75bc8c711cea816947c1671970a47df135d1 Mon Sep 17 00:00:00 2001 From: Diana Olarte Date: Tue, 22 Sep 2026 21:55:04 +1000 Subject: [PATCH 1/7] fix: restore authz bg styles but keep content cap to header xl --- src/Main.test.tsx | 5 - src/Main.tsx | 5 +- src/authz-module/audit-user/index.tsx | 18 +-- src/authz-module/authz-home/index.tsx | 41 +++-- src/authz-module/components/AuthZLayout.tsx | 24 +-- src/authz-module/components/AuthZTitle.tsx | 12 +- src/authz-module/index.scss | 8 +- .../AssignRoleWizard.tsx | 4 +- .../AssignRoleWizardPage.tsx | 1 - .../roles-permissions/RolesPermissions.tsx | 4 +- .../team-members/TeamMembersTable.tsx | 144 +++++++++--------- src/style.scss | 21 ++- 12 files changed, 140 insertions(+), 147 deletions(-) diff --git a/src/Main.test.tsx b/src/Main.test.tsx index 0cf848f2..8e512dd6 100644 --- a/src/Main.test.tsx +++ b/src/Main.test.tsx @@ -23,9 +23,4 @@ describe('Main', () => { const { getByTestId } = renderWrapper(
); expect(getByTestId('authz-module')).toBeInTheDocument(); }); - - it('wraps the body in an xl container to align it with the header', () => { - const { getByTestId } = renderWrapper(
); - expect(getByTestId('authz-module').closest('.container-mw-xl')).toBeInTheDocument(); - }); }); diff --git a/src/Main.tsx b/src/Main.tsx index 44cdeff9..a668e205 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -1,5 +1,4 @@ import { CurrentAppProvider, PageWrap, getSiteConfig, useIntl } from '@openedx/frontend-base'; -import { Container } from '@openedx/paragon'; import { Helmet } from 'react-helmet'; import { appId } from './constants'; @@ -20,9 +19,7 @@ const Main = () => { - - - + ); diff --git a/src/authz-module/audit-user/index.tsx b/src/authz-module/audit-user/index.tsx index ce852441..7e35616f 100644 --- a/src/authz-module/audit-user/index.tsx +++ b/src/authz-module/audit-user/index.tsx @@ -3,9 +3,7 @@ import { useContext, useEffect, useMemo, useState, } from 'react'; import { SiteContext, useIntl } from '@openedx/frontend-base'; -import { - Container, DataTable, -} from '@openedx/paragon'; +import { DataTable } from '@openedx/paragon'; import TableFooter from '@src/authz-module/components/TableFooter/TableFooter'; import { AUTHZ_HOME_PATH, TABLE_DEFAULT_PAGE_SIZE, @@ -228,7 +226,7 @@ const AuditUserPage = () => { }; return ( -
+ <> { }} /> { ] } > - +
{ - - +
-
+ ); }; diff --git a/src/authz-module/authz-home/index.tsx b/src/authz-module/authz-home/index.tsx index 03fa3fc7..1c0702dc 100644 --- a/src/authz-module/authz-home/index.tsx +++ b/src/authz-module/authz-home/index.tsx @@ -21,29 +21,26 @@ const AuthzHome = () => { const pageTitle = intl.formatMessage(messages['authz.manage.page.title']); return ( -
- ] - } + ] + } + > + - - - - - - - - - -
+ + + + + + + + ); }; diff --git a/src/authz-module/components/AuthZLayout.tsx b/src/authz-module/components/AuthZLayout.tsx index e657c493..4c714766 100644 --- a/src/authz-module/components/AuthZLayout.tsx +++ b/src/authz-module/components/AuthZLayout.tsx @@ -3,19 +3,21 @@ import AuthZTitle, { AuthZTitleProps } from './AuthZTitle'; interface AuthZLayoutProps extends AuthZTitleProps { children: ReactNode; - context: { - id: string; - org: string; - title: string; - }; } -const AuthZLayout = ({ children, ...props }: AuthZLayoutProps) => ( - <> - - {children} - - +/** + * Page chrome for the authz module: the title band, then the body below it. + * The body only paints its colour, edge to edge. Each page marks the parts of its + * content that should line up with the header using `page-band`, so anything meant + * to bleed across the full width -- a stepper header, a toolbar -- simply omits it. + */ +const AuthZLayout = ({ children, ...titleProps }: AuthZLayoutProps) => ( +
+ +
+ {children} +
+
); export default AuthZLayout; diff --git a/src/authz-module/components/AuthZTitle.tsx b/src/authz-module/components/AuthZTitle.tsx index 229c8cb6..a204453c 100644 --- a/src/authz-module/components/AuthZTitle.tsx +++ b/src/authz-module/components/AuthZTitle.tsx @@ -3,7 +3,7 @@ import { } from 'react'; import { Link } from 'react-router-dom'; import { - Breadcrumb, Col, Container, Row, Button, + Breadcrumb, Col, Row, Button, Stack, useMediaQuery, breakpoints, @@ -42,7 +42,7 @@ const AuthZTitle = ({ }: AuthZTitleProps) => { const isDesktop = useMediaQuery({ minWidth: breakpoints.large.minWidth }); return ( - +

{pageTitle}

{typeof pageSubtitle === 'string' - ? <> { pageSubtitle !== '' &&
}

{pageSubtitle}

- : <>{ pageSubtitle !== '' &&
}
{pageSubtitle}
} + ? <> { pageSubtitle !== '' &&
}

{pageSubtitle}

+ : <>{ pageSubtitle !== '' &&
}
{pageSubtitle}
}
@@ -72,7 +72,7 @@ const AuthZTitle = ({ {content} {(index === actions.length - 1) ? null - : (
)} + : (
)}
); }) @@ -80,7 +80,7 @@ const AuthZTitle = ({ -
+ ); }; diff --git a/src/authz-module/index.scss b/src/authz-module/index.scss index 99586edd..394ebe94 100644 --- a/src/authz-module/index.scss +++ b/src/authz-module/index.scss @@ -24,16 +24,12 @@ min-height: 700px; } - hr { + .authz-action-divider { border-right: var(--pgn-size-border-width) solid var(--pgn-color-border); height: var(--height-action-divider); width: 0; } - .tab-content { - background-color: var(--pgn-color-light-200); - } - .collapsible-card { border: none; @@ -71,7 +67,7 @@ .flex-column-sm { flex-direction: column; } - hr { + .authz-action-divider { border-top: var(--pgn-size-border-width) solid var(--pgn-color-border); border-right: none; width: 100%; diff --git a/src/authz-module/role-assignation-wizard/AssignRoleWizard.tsx b/src/authz-module/role-assignation-wizard/AssignRoleWizard.tsx index bcd1eecf..0b60a570 100644 --- a/src/authz-module/role-assignation-wizard/AssignRoleWizard.tsx +++ b/src/authz-module/role-assignation-wizard/AssignRoleWizard.tsx @@ -158,7 +158,7 @@ const AssignRoleWizard = ({ -
+
-
+