Skip to content

feat: AppLayout visual changes - #5325

Open
georgylobko wants to merge 12 commits into
mainfrom
feat/app-layout-simplified-view
Open

georgylobko wants to merge 12 commits into
mainfrom
feat/app-layout-simplified-view

Conversation

@georgylobko

Copy link
Copy Markdown
Member

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

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.86%. Comparing base (b48a518) to head (b598c0d).
⚠️ Report is 4 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

}, 120_000 /* two browser sessions */);

test(
'publishes breadcrumbs to registerBreadcrumbsConsumer and keeps them updated',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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', () => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose is the same - make sure that global breadcrumbs keep working when the toolbar is hidden

});
});

describeEachAppLayout({ themes: ['refresh-toolbar'], sizes: ['desktop'] }, () => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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)}`);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

This branch was successfully deployed

3 active deployments
dev-pages-react16 — b598c0d2 Deployed Nov 19, 2026 by georgylobko via deploy (React 16) / deploy #3419
dev-pages-react18 — b598c0d2 Deployed Nov 19, 2026 by georgylobko via deploy (React 18) / deploy #3419
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants