Skip to content

[Discover] Fix readonly badge for new app menu#250334

Merged
davismcphee merged 5 commits intoelastic:mainfrom
davismcphee:discover-fix-readonly-badge
Jan 26, 2026
Merged

[Discover] Fix readonly badge for new app menu#250334
davismcphee merged 5 commits intoelastic:mainfrom
davismcphee:discover-fix-readonly-badge

Conversation

@davismcphee
Copy link
Copy Markdown
Contributor

@davismcphee davismcphee commented Jan 26, 2026

Summary

Followup to #246156. This PR fixes the readonly badge in Discover, which was not showing in solution views after the new app menu changes. Since the chrome.setBadge API previously used doesn't work now that Discover's app menu is in the tabs bar, the code has been updated to use the same chrome.setBreadcrumbsBadges API that the managed and context awareness badges use.

The readonly badge should appear in the same circumstances as before but directly next to the breadcrumbs (always the first badge), whether in classic or solution view. It should remain there while in the main app, surrounding docs, or single doc, and be removed when leaving Discover. I've also reordered the managed badge to appear next to the readonly badge when both are visible.

Checklist

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Closes: https://github.com/elastic/kibana-team/issues/2713

@davismcphee davismcphee self-assigned this Jan 26, 2026
@davismcphee davismcphee added Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// labels Jan 26, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#10585

[❌] x-pack/platform/test/functional/apps/discover/group2/config.ts: 0/25 tests passed.

see run history

data-test-subj="header-breadcrumbs-badge-group"
css={css`
margin-left: ${isFirst ? euiTheme.size.xs : 0};
align-items: center;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is to make sure icon-only (e.g. readonly) and regular badges are vertically centered, otherwise they're misaligned.

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Jan 26, 2026

💔 Build Failed

Failed CI Steps

History

cc @davismcphee

@davismcphee davismcphee marked this pull request as ready for review January 26, 2026 04:29
@davismcphee davismcphee requested review from a team as code owners January 26, 2026 04:29
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@davismcphee
Copy link
Copy Markdown
Contributor Author

Been fighting a flaky test with this one. Not sure if I've fixed it yet, but publishing anyway since it's otherwise ready for review.

@kibanamachine
Copy link
Copy Markdown
Contributor

Flaky Test Runner Stats

🎉 All tests passed! - kibana-flaky-test-suite-runner#10586

[✅] x-pack/platform/test/functional/apps/discover/group2/config.ts: 25/25 tests passed.

see run history

Copy link
Copy Markdown
Member

@kowalczyk-krzysztof kowalczyk-krzysztof left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, LGTM

Copy link
Copy Markdown
Contributor

@jughosta jughosta left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing it so quickly! 👍

@davismcphee davismcphee merged commit 6f4cc5c into elastic:main Jan 26, 2026
19 checks passed
@davismcphee davismcphee deleted the discover-fix-readonly-badge branch January 26, 2026 16:41
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 Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants