Repository navigation
feat: AppLayout visual changes - #5325
georgylobko wants to merge 12 commits into
Conversation
…-simplified-view # Conflicts: # pages/app/index.tsx # src/app-layout/utils/feature-flags.ts # src/app-layout/visual-refresh-toolbar/skeleton/slots.tsx
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5325 +/- ##
==========================================
- Coverage 97.87% 97.86% -0.01%
==========================================
Files 1016 1016
Lines 32886 32901 +15
Branches 12199 12204 +5
==========================================
+ Hits 32186 32200 +14
- Misses 660 695 +35
+ Partials 40 6 -34 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| }, 120_000 /* two browser sessions */); | ||
|
|
||
| test( | ||
| 'publishes breadcrumbs to registerBreadcrumbsConsumer and keeps them updated', |
There was a problem hiding this comment.
The connection between the registerBreadcrumbsConsumer and hidden toolbar is that the breadcrumbs that are rendered within the toolbar produce events with breadcrumbs items which a higher level than AppLayout (details in DM) consume and render breadcrumbs in a different place. The purpose of this and further tests is to make sure this mechanism isn't broken
| return toolbar.classList.contains(toolbarStyles['toolbar-hidden']); | ||
| } | ||
|
|
||
| afterEach(() => setPendingGlobalFlag('appLayoutHideToolbar', undefined)); |
There was a problem hiding this comment.
I'll replace setPendingGlobalFlag with feature flags from component-toolkit once they are released: cloudscape-design/component-toolkit#274
| expect(wrapper.findToolbar()!.getElement()).toContainElement(wrapper.findToolsToggle()!.getElement()); | ||
| }); | ||
|
|
||
| test('keeps rendering breadcrumbs inside the hidden toolbar', () => { |
There was a problem hiding this comment.
The purpose is the same - make sure that global breadcrumbs keep working when the toolbar is hidden
| }); | ||
| }); | ||
|
|
||
| describeEachAppLayout({ themes: ['refresh-toolbar'], sizes: ['desktop'] }, () => { |
There was a problem hiding this comment.
I also considered moving these tests to this file: https://github.com/cloudscape-design/components/blob/main/src/app-layout/__tests__/runtime-breadcrumbs-widgetized.test.tsx
but decided to keep them here since they help prevent regressions related to this feature
There was a problem hiding this comment.
🟡 Changes recommended
The simplified-view styling misses the no-toolbar path, leaving the adjacent content corner rounded while the open drawer is squared.
1 open issue
What changed in this PR
This PR adds feature-flagged visual options to AppLayout’s toolbar design: hiding the toolbar while preserving breadcrumb reporting, and simplifying corners around the AI drawer.
Changes:
- Add toolbar visibility and simplified-view flags, including demo URL configuration.
- Adjust borders, corners, and drawer stacking for the new modes.
- Add unit and browser tests for hidden-toolbar behavior and breadcrumb reporting.
| File | Description |
|---|---|
| src/app-layout/visual-refresh-toolbar/widget-areas/before-main-slot.tsx | Apply hidden-toolbar styling to the AI drawer area. |
| src/app-layout/visual-refresh-toolbar/toolbar/styles.scss | Hide the toolbar and simplify adjacent corners. |
| src/app-layout/visual-refresh-toolbar/skeleton/styles.scss | Preserve content borders and adjust drawer stacking. |
| src/app-layout/visual-refresh-toolbar/skeleton/slots.tsx | Apply visual flags while keeping toolbar content mounted. |
| src/app-layout/visual-refresh-toolbar/drawer/styles.scss | Adjust drawer borders, corners, and header styling. |
| src/app-layout/visual-refresh-toolbar/drawer/global-ai-drawer.tsx | Apply flag-dependent drawer classes. |
| src/app-layout/utils/feature-flags.ts | Add typed accessors for the new flags. |
| src/app-layout/__tests__/utils.tsx | Add a helper for setting pending flags. |
| src/app-layout/__tests__/skeleton.test.tsx | Test hidden toolbar skeleton rendering. |
| src/app-layout/__tests__/hide-toolbar.test.tsx | Test toolbar hiding and breadcrumb reporting. |
| src/app-layout/__integ__/hide-toolbar.test.ts | Verify visibility, spacing, and breadcrumb consumers in browsers. |
| pages/app/index.tsx | Expose the new flags through demo query parameters. |
| pages/app-layout/utils/external-global-left-panel-widget.tsx | Allow opening the AI drawer by default through a query parameter. |
Review effort: Balanced
| function setupTest(params: Record<string, string>, testFn: (page: HideToolbarPage) => Promise<void>) { | ||
| return useBrowser(async browser => { | ||
| const page = new HideToolbarPage(browser); | ||
| await browser.url(`#/light/app-layout/global-nav-breadcrumbs?${getUrlParams('refresh-toolbar', params)}`); |
There was a problem hiding this comment.
Nit: The /light prefix in page paths is not necessary anymore. So this could be
await browser.url(`#/app-layout/global-nav-breadcrumbs?${getUrlParams('refresh-toolbar', params)}`);
Although the light/dark mode prefix is still in many integ test URLs, the light/dark mode is now defined in URL search params (mode=dark) like all other dev page params, and the support for path prefix is just for backwards compatibility.

Description
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.