diff --git a/pages/app-layout/with-drawers-scrollable.page.tsx b/pages/app-layout/with-drawers-scrollable.page.tsx
index 0cab89b87d..b29765b421 100644
--- a/pages/app-layout/with-drawers-scrollable.page.tsx
+++ b/pages/app-layout/with-drawers-scrollable.page.tsx
@@ -19,6 +19,7 @@ import { AppLayoutProps } from '~components/app-layout';
import awsuiPlugins from '~components/internal/plugins';
import AppContext, { AppContextType } from '../app/app-context';
+import ScreenshotArea from '../utils/screenshot-area';
import {
Breadcrumbs,
Containers,
@@ -45,9 +46,9 @@ const getAriaLabels = (title: string) => {
};
awsuiPlugins.appLayout.registerDrawer({
- id: 'circle',
+ id: 'circle1-global',
type: 'global',
- ariaLabels: getAriaLabels('global drawer'),
+ ariaLabels: getAriaLabels('global drawer 1'),
defaultActive: true,
resizable: true,
defaultSize: 320,
@@ -62,6 +63,25 @@ awsuiPlugins.appLayout.registerDrawer({
},
unmountContent: container => unmountComponentAtNode(container),
});
+awsuiPlugins.appLayout.registerDrawer({
+ id: 'circle2-global',
+ type: 'global',
+ defaultActive: false,
+ resizable: true,
+ defaultSize: 320,
+
+ ariaLabels: getAriaLabels('global drawer 2'),
+
+ mountContent: container => {
+ ReactDOM.render(
+
+
+ ,
+ container
+ );
+ },
+ unmountContent: container => unmountComponentAtNode(container),
+});
awsuiPlugins.appLayout.registerDrawer({
id: 'security',
@@ -162,65 +182,74 @@ export default function WithDrawersScrollable() {
};
return (
-
}
- navigation={sideNavContents}
- ref={appLayoutRef}
- content={
-
-
- Testing Scrollable Drawers
-
+
+ }
+ navigation={sideNavContents}
+ ref={appLayoutRef}
+ content={
+
+
+ Testing Scrollable Drawers
+
-
- setUrlParams({ sideNavFill: detail.checked })}>
- Fill side nav content area
-
+
+ setUrlParams({ sideNavFill: detail.checked })}
+ data-testid="toggle-side-nav-content"
+ >
+ Fill side nav content area
+
-
+
+
+ }
+ >
+
+
+ }
+ splitPanel={
+
+
+
+
- }
- >
-
-
- }
- splitPanel={
-
-
-
-
-
-
- }
- splitPanelPreferences={{
- position: urlParams.splitPanelPosition,
- }}
- onSplitPanelPreferencesChange={event => {
- const { position } = event.detail;
- setUrlParams({ splitPanelPosition: position === 'side' ? position : undefined });
- }}
- {...drawersProps}
- />
+
+ }
+ splitPanelPreferences={{
+ position: urlParams.splitPanelPosition,
+ }}
+ onSplitPanelPreferencesChange={event => {
+ const { position } = event.detail;
+ setUrlParams({ splitPanelPosition: position === 'side' ? position : undefined });
+ }}
+ {...drawersProps}
+ />
+
);
}
diff --git a/src/app-layout/drawer/styles.scss b/src/app-layout/drawer/styles.scss
index 0d66ad3796..bbdd100366 100644
--- a/src/app-layout/drawer/styles.scss
+++ b/src/app-layout/drawer/styles.scss
@@ -36,6 +36,8 @@
position: fixed;
overflow: auto;
background-color: awsui.$color-background-layout-panel-content;
+ display: flex;
+ flex-direction: column;
.drawer-mobile > & {
z-index: constants.$drawer-z-index-mobile;
inset: 0;
@@ -58,8 +60,8 @@
block-size: 100%;
position: relative;
}
- > .drawer-content-wrapper[aria-hidden='false'] {
- display: contents;
+ > .drawer-content-wrapper {
+ flex: 1;
}
}
diff --git a/src/app-layout/visual-refresh-toolbar/navigation/index.tsx b/src/app-layout/visual-refresh-toolbar/navigation/index.tsx
index d4afe826da..8658a72b14 100644
--- a/src/app-layout/visual-refresh-toolbar/navigation/index.tsx
+++ b/src/app-layout/visual-refresh-toolbar/navigation/index.tsx
@@ -62,7 +62,7 @@ export function AppLayoutNavigationImplementation({ appLayoutInternals }: AppLay
insetBlockStart: drawerTopOffset,
}}
>
-
+
.content-container {
- display: contents;
- }
-
/*
A non-semantic node is added with a fixed width equal to the final Navigation
width. This will create the visual appearance of horizontal movement and
diff --git a/src/app-layout/visual-refresh/navigation.scss b/src/app-layout/visual-refresh/navigation.scss
index 3955a5cb0d..e0a0b2d0a2 100644
--- a/src/app-layout/visual-refresh/navigation.scss
+++ b/src/app-layout/visual-refresh/navigation.scss
@@ -93,6 +93,7 @@ nav.navigation {
word-wrap: break-word;
pointer-events: auto;
border-inline-end: solid awsui.$border-divider-section-width awsui.$color-border-divider-default;
+ display: flex;
// Animation for the Navigation opacity and width when it is added to the DOM
@keyframes openNavigation {
From 901f4042b36ea6d3d265113bc99176768ff5a2ed Mon Sep 17 00:00:00 2001
From: Jessica Kuelz <15003460+jkuelz@users.noreply.github.com>
Date: Thu, 7 Nov 2024 13:33:32 -0800
Subject: [PATCH 5/5] chore: Make flex properties more explicit
---
src/app-layout/visual-refresh-toolbar/navigation/index.tsx | 2 +-
src/app-layout/visual-refresh-toolbar/navigation/styles.scss | 5 +++++
src/app-layout/visual-refresh/navigation.scss | 5 +++++
src/app-layout/visual-refresh/navigation.tsx | 2 +-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/app-layout/visual-refresh-toolbar/navigation/index.tsx b/src/app-layout/visual-refresh-toolbar/navigation/index.tsx
index 8658a72b14..d4afe826da 100644
--- a/src/app-layout/visual-refresh-toolbar/navigation/index.tsx
+++ b/src/app-layout/visual-refresh-toolbar/navigation/index.tsx
@@ -62,7 +62,7 @@ export function AppLayoutNavigationImplementation({ appLayoutInternals }: AppLay
insetBlockStart: drawerTopOffset,
}}
>
-
+
.content-container {
+ flex-grow: 1;
+ }
+
/*
A non-semantic node is added with a fixed width equal to the final Navigation
width. This will create the visual appearance of horizontal movement and
diff --git a/src/app-layout/visual-refresh/navigation.scss b/src/app-layout/visual-refresh/navigation.scss
index e0a0b2d0a2..8ca5dd3831 100644
--- a/src/app-layout/visual-refresh/navigation.scss
+++ b/src/app-layout/visual-refresh/navigation.scss
@@ -94,6 +94,7 @@ nav.navigation {
pointer-events: auto;
border-inline-end: solid awsui.$border-divider-section-width awsui.$color-border-divider-default;
display: flex;
+ flex-direction: column;
// Animation for the Navigation opacity and width when it is added to the DOM
@keyframes openNavigation {
@@ -133,6 +134,10 @@ nav.navigation {
inline-size: var(#{custom-props.$navigationWidth});
}
+ & > .content-container {
+ flex-grow: 1;
+ }
+
// The Navigation drawer will take up the entire viewport on mobile
@include styles.media-breakpoint-down(styles.$breakpoint-x-small) {
#{custom-props.$navigationWidth}: 100vw;
diff --git a/src/app-layout/visual-refresh/navigation.tsx b/src/app-layout/visual-refresh/navigation.tsx
index 22d91454ca..a633704f6b 100644
--- a/src/app-layout/visual-refresh/navigation.tsx
+++ b/src/app-layout/visual-refresh/navigation.tsx
@@ -100,7 +100,7 @@ export default function Navigation() {
onNavigationClick && onNavigationClick(event);
}}
>
-