Skip to content

[Chrome Next] Migrate spaces to AppHeader - #288216

Open
kowalczyk-krzysztof wants to merge 5 commits into
elastic:mainfrom
kowalczyk-krzysztof:feat/migrate-spaces
Open

[Chrome Next] Migrate spaces to AppHeader#288216
kowalczyk-krzysztof wants to merge 5 commits into
elastic:mainfrom
kowalczyk-krzysztof:feat/migrate-spaces

Conversation

@kowalczyk-krzysztof

Copy link
Copy Markdown
Member

Summary

This PR migrates Spaces pages to the new AppHeader.

Part of: https://github.com/elastic/kibana-team/issues/3945

Visuals

Classic

Before
spaces_classic_before.mov
After
spaces_classic_after.mov

Solution

Before
spaces_solution_before.mov
After
spaces_solution_after.mov

@kowalczyk-krzysztof kowalczyk-krzysztof self-assigned this Aug 31, 2026
@kowalczyk-krzysztof
kowalczyk-krzysztof requested a review from a team as a code owner August 31, 2026 22:21
@kowalczyk-krzysztof kowalczyk-krzysztof added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t// labels Aug 31, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/appex-sharedux (Team:SharedUX)

@jeramysoucy
jeramysoucy requested review from jeramysoucy and removed request for azasypkin September 1, 2026 06:32

@jeramysoucy jeramysoucy 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.

Header, badges and tabs all behave correctly in manual testing. Three things:

  1. Spinner never shows while the space itself is loading. The space && conjunct in space && !isPageReady means that while space is undefined you get the fallback title over an empty body; the spinner only appears afterwards, during the features/roles fetch. Dropping space && should do it.

  2. No coverage for the new header content. Nothing asserts the solution/current badges, the tab set, or the Permissions role-count badge.

  3. The space avatar is removed from the header here as well (user avatar is also removed in user PR). In this case it may not be a concern since the avatar is rendered and editable in the body — unlike the user avatar in #288023, which is no longer rendered at all.

🤖 AI assisted review

@kowalczyk-krzysztof

Copy link
Copy Markdown
Member Author

@jeramysoucy

Dropped the space && guard so the spinner shows while the space itself is loading, not only during the later features/roles fetch.

Added EditSpace tests for the header: solution + Current badges, the General settings / Permissions / Content tabs, and the Permissions role-count badge.

Left the space avatar in the body only - it’s still rendered and editable there.

@jeramysoucy jeramysoucy 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.

Thanks for the update! The previous items are all addressed. Sorry, found a few things, mostly nits, but worth looking at before you merge.

Comment thread x-pack/platform/plugins/shared/spaces/public/management/edit_space/edit_space.tsx Outdated
const badges: AppHeaderBadge[] = [];
if (shouldShowSolutionBadge) {
badges.push({
label: solution,

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.

Nit: label: solution is the raw enum value. It's inert today since SpaceSolutionBadge derives its own translated label and ignores badgeText. But renderCustomBadge is @deprecated and carries a TODO to remove custom JSX badges, so whoever does that cleanup will fall back to label and ship "oblt" instead of "Observability". Passing the translated solution name costs nothing and removes the trap.

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 in: 533b95e

And just FYI, while renderCustomBadge is indeed deprecated, there are no plans to actually remove it anytime soon as this would require aligning with current consumers (the API was introduced so we could migrate DnD ASAP).

@kibanamachine

Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
shared-plugins 11.9MB 11.9MB -22.0B
spaces 21.5KB 21.5KB +42.0B
total +20.0B
Unknown metric groups

shared async chunks total size

id before after diff
all 15.0MB 15.0MB -734.0B

total optimizer output size

id before after diff
all 63.0MB 63.0MB -714.0B

Test Failures

  • [job] [logs] FTR Configs #43 / console app text input with a data URI in the load_from query loads the data from the URI
  • [job] [logs] Scout Lane #31 - stateful-classic / default / local-stateful-classic - Dataset quality - data stream stats across data stream types - returns the stats of every requested data stream type

History

cc @kowalczyk-krzysztof

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:SharedUX Platform AppEx-SharedUX (formerly Global Experience) t//

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants