Skip to content

[Metrics] Fix LensWrapper mark color regression#250619

Merged
justinkambic merged 2 commits intoelastic:mainfrom
justinkambic:241152/highlight-color-regression
Jan 29, 2026
Merged

[Metrics] Fix LensWrapper mark color regression#250619
justinkambic merged 2 commits intoelastic:mainfrom
justinkambic:241152/highlight-color-regression

Conversation

@justinkambic
Copy link
Copy Markdown
Contributor

@justinkambic justinkambic commented Jan 27, 2026

Summary

In #249450 we added a titleHighlight prop to Lens. This allowed us to remove our custom header implementation in the Metrics panel and rely on core Lens for the panel titles.

Unfortunately, this removed custom styling that matched our highlight feature with the underlying Discover style. We want to keep this consistent.

This PR adds a CSS override for the mark elements within the metrics LensWrapper component, which will cause EuiHighlight to show the color consistent with Discover, euiTheme.colors.textAccent.

Testing the PR

Index some metrics data, then perform a search for some content in the panel header.

Current (in main)

image

This PR branch

image

@justinkambic justinkambic self-assigned this Jan 27, 2026
@justinkambic justinkambic requested a review from a team as a code owner January 27, 2026 17:48
@justinkambic justinkambic added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.3.0 Team:obs-exploration Observability Exploration team v9.4.0 labels Jan 27, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-exploration-team (Team:obs-exploration)

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Jan 27, 2026

💔 Build Failed

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 1.5MB 1.5MB +155.0B

History

cc @justinkambic

@justinkambic justinkambic merged commit 35faed5 into elastic:main Jan 29, 2026
16 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.3

https://github.com/elastic/kibana/actions/runs/21491142795

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jan 29, 2026
## Summary

In elastic#249450 we added a
`titleHighlight` prop to Lens. This allowed us to remove our custom
header implementation in the Metrics panel and rely on core Lens for the
panel titles.

Unfortunately, this removed custom styling that matched our highlight
feature with the underlying Discover style. We want to keep this
consistent.

This PR adds a CSS override for the `mark` elements within the metrics
LensWrapper component, which will cause `EuiHighlight` to show the color
consistent with Discover, `euiTheme.colors.textAccent`.

## Testing the PR

Index some metrics data, then perform a search for some content in the
panel header.

### Current (in main)

<img width="1568" height="312" alt="image"
src="https://github.com/user-attachments/assets/48433064-5b43-4406-b77d-a5075a37e9be"
/>

### This PR branch

<img width="1581" height="532" alt="image"
src="https://github.com/user-attachments/assets/16847ed0-2c43-4576-9dc6-081e9e8758e4"
/>

(cherry picked from commit 35faed5)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 29, 2026
)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[Metrics] Fix LensWrapper mark color regression
(#250619)](#250619)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Justin
Kambic","email":"jk@elastic.co"},"sourceCommit":{"committedDate":"2026-01-29T19:04:47Z","message":"[Metrics]
Fix LensWrapper mark color regression (#250619)\n\n## Summary\n\nIn
#249450 we added
a\n`titleHighlight` prop to Lens. This allowed us to remove our
custom\nheader implementation in the Metrics panel and rely on core Lens
for the\npanel titles.\n\nUnfortunately, this removed custom styling
that matched our highlight\nfeature with the underlying Discover style.
We want to keep this\nconsistent.\n\nThis PR adds a CSS override for the
`mark` elements within the metrics\nLensWrapper component, which will
cause `EuiHighlight` to show the color\nconsistent with Discover,
`euiTheme.colors.textAccent`.\n\n## Testing the PR\n\nIndex some metrics
data, then perform a search for some content in the\npanel
header.\n\n### Current (in main)\n\n<img width=\"1568\" height=\"312\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/48433064-5b43-4406-b77d-a5075a37e9be\"\n/>\n\n\n###
This PR branch\n\n<img width=\"1581\" height=\"532\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/16847ed0-2c43-4576-9dc6-081e9e8758e4\"\n/>","sha":"35faed5408006214e99770c9fb2525c6150f32d9","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","backport:version","v9.3.0","Team:obs-exploration","v9.4.0"],"title":"[Metrics]
Fix LensWrapper mark color
regression","number":250619,"url":"https://github.com/elastic/kibana/pull/250619","mergeCommit":{"message":"[Metrics]
Fix LensWrapper mark color regression (#250619)\n\n## Summary\n\nIn
#249450 we added
a\n`titleHighlight` prop to Lens. This allowed us to remove our
custom\nheader implementation in the Metrics panel and rely on core Lens
for the\npanel titles.\n\nUnfortunately, this removed custom styling
that matched our highlight\nfeature with the underlying Discover style.
We want to keep this\nconsistent.\n\nThis PR adds a CSS override for the
`mark` elements within the metrics\nLensWrapper component, which will
cause `EuiHighlight` to show the color\nconsistent with Discover,
`euiTheme.colors.textAccent`.\n\n## Testing the PR\n\nIndex some metrics
data, then perform a search for some content in the\npanel
header.\n\n### Current (in main)\n\n<img width=\"1568\" height=\"312\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/48433064-5b43-4406-b77d-a5075a37e9be\"\n/>\n\n\n###
This PR branch\n\n<img width=\"1581\" height=\"532\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/16847ed0-2c43-4576-9dc6-081e9e8758e4\"\n/>","sha":"35faed5408006214e99770c9fb2525c6150f32d9"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"9.3","label":"v9.3.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250619","number":250619,"mergeCommit":{"message":"[Metrics]
Fix LensWrapper mark color regression (#250619)\n\n## Summary\n\nIn
#249450 we added
a\n`titleHighlight` prop to Lens. This allowed us to remove our
custom\nheader implementation in the Metrics panel and rely on core Lens
for the\npanel titles.\n\nUnfortunately, this removed custom styling
that matched our highlight\nfeature with the underlying Discover style.
We want to keep this\nconsistent.\n\nThis PR adds a CSS override for the
`mark` elements within the metrics\nLensWrapper component, which will
cause `EuiHighlight` to show the color\nconsistent with Discover,
`euiTheme.colors.textAccent`.\n\n## Testing the PR\n\nIndex some metrics
data, then perform a search for some content in the\npanel
header.\n\n### Current (in main)\n\n<img width=\"1568\" height=\"312\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/48433064-5b43-4406-b77d-a5075a37e9be\"\n/>\n\n\n###
This PR branch\n\n<img width=\"1581\" height=\"532\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/16847ed0-2c43-4576-9dc6-081e9e8758e4\"\n/>","sha":"35faed5408006214e99770c9fb2525c6150f32d9"}}]}]
BACKPORT-->

Co-authored-by: Justin Kambic <jk@elastic.co>
hannahbrooks pushed a commit to hannahbrooks/kibana that referenced this pull request Jan 30, 2026
## Summary

In elastic#249450 we added a
`titleHighlight` prop to Lens. This allowed us to remove our custom
header implementation in the Metrics panel and rely on core Lens for the
panel titles.

Unfortunately, this removed custom styling that matched our highlight
feature with the underlying Discover style. We want to keep this
consistent.

This PR adds a CSS override for the `mark` elements within the metrics
LensWrapper component, which will cause `EuiHighlight` to show the color
consistent with Discover, `euiTheme.colors.textAccent`.

## Testing the PR

Index some metrics data, then perform a search for some content in the
panel header.

### Current (in main)

<img width="1568" height="312" alt="image"
src="https://github.com/user-attachments/assets/48433064-5b43-4406-b77d-a5075a37e9be"
/>


### This PR branch

<img width="1581" height="532" alt="image"
src="https://github.com/user-attachments/assets/16847ed0-2c43-4576-9dc6-081e9e8758e4"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:obs-exploration Observability Exploration team v9.3.0 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants