Skip to content

[Discover] Lens config extension point and hiding x-axis tick labels in patterns profile#225571

Merged
jgowdyelastic merged 7 commits intoelastic:mainfrom
davismcphee:lens-config-extension-poc
Jul 1, 2025
Merged

[Discover] Lens config extension point and hiding x-axis tick labels in patterns profile#225571
jgowdyelastic merged 7 commits intoelastic:mainfrom
davismcphee:lens-config-extension-poc

Conversation

@davismcphee
Copy link
Contributor

@davismcphee davismcphee commented Jun 27, 2025

Summary

This PR introduces a getModifiedVisAttributes extension point, allowing profiles to customize the default Lens chart configuration. Additionally, it updates the patterns data source profile to make use of the extension point in order to hide x-axis tick labels in the XY chart. It also stops hiding the chart by default for the patterns profile.

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.

@davismcphee davismcphee self-assigned this Jun 27, 2025
@davismcphee davismcphee added Team:DataDiscovery Discover, search (data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. t// Project:OneDiscover Enrich Discover with contextual awareness labels Jun 27, 2025
@davismcphee davismcphee changed the title [PoC] Lens config extension point [Discover] Lens config extension point and hiding x-axis tick labels in patterns profile Jun 28, 2025
@davismcphee davismcphee added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting backport:version Backport to applied version labels v9.1.0 v8.19.0 v9.2.0 and removed backport:skip This PR does not require backporting labels Jun 28, 2025
@davismcphee davismcphee marked this pull request as ready for review June 28, 2025 03:18
@davismcphee davismcphee requested review from a team as code owners June 28, 2025 03:18
@elasticmachine
Copy link
Contributor

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

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

ML changes LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

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
datasetQuality 418.4KB 418.4KB +8.0B
discover 1.1MB 1.1MB +652.0B
total +660.0B

Page load bundle

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

id before after diff
datasetQuality 24.1KB 24.2KB +70.0B

History

cc @davismcphee

Copy link
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 👍

@jgowdyelastic While testing noticed another issue with Patterns profile which we might want to fix separately.

The hardcoded default columns sometimes affect the UI/UX. For example, if I define a query

FROM kibana_sample_data_logs | STATS count = COUNT(*) by Pattern = CATEGORIZE(message)
| sort count DESC

with count instead of Count then the width would not be applied and after saving this Discover session the count column disappears from the screen:

Jul-01-2025 15-46-29

Would be great to make the default columns dynamic to user's query (if possible) or don't use them.

@jgowdyelastic jgowdyelastic merged commit b53844f into elastic:main Jul 1, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19, 9.1

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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts
9.1 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.1:
- [Search][Query Rules UI] FTR tests (#223553)
- [Stack connectors] Default Gemini model bump (#225917)
- [Cloud Security] fix expandable flyout title and sub title size (#225862)
- [ES|QL] Stop ANTLR token monkey-patching in parser (#225629)
- [ML] Fixes handling of time range in embedded anomaly swim lane (#225803)
- [ML] Anomaly Swimlane: Fixes incorrectly formatted tooltip values (#225845)
- [storybook] Add static path to @kbn/monaco web workers (#225383)

Manual backport

To create the backport manually run:

node scripts/backport --pr 225571

Questions ?

Please refer to the Backport tool documentation

@jgowdyelastic
Copy link
Member

💚 All backports created successfully

Status Branch Result
9.1

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

Questions ?

Please refer to the Backport tool documentation

jgowdyelastic pushed a commit to jgowdyelastic/kibana that referenced this pull request Jul 1, 2025
…in patterns profile (elastic#225571)

## Summary

This PR introduces a `getModifiedVisAttributes` extension point,
allowing profiles to customize the default Lens chart configuration.
Additionally, it updates the patterns data source profile to make use of
the extension point in order to hide x-axis tick labels in the XY chart.
It also stops hiding the chart by default for the patterns profile.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
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](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: James Gowdy <jgowdy@elastic.co>
(cherry picked from commit b53844f)

# Conflicts:
#	src/platform/plugins/shared/discover/public/context_awareness/__mocks__/context_awareness.tsx
jgowdyelastic added a commit that referenced this pull request Jul 1, 2025
…abels in patterns profile (#225571) (#226022)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Discover] Lens config extension point and hiding x-axis tick labels
in patterns profile
(#225571)](#225571)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Davis
McPhee","email":"davis.mcphee@elastic.co"},"sourceCommit":{"committedDate":"2025-07-01T14:24:52Z","message":"[Discover]
Lens config extension point and hiding x-axis tick labels in patterns
profile (#225571)\n\n## Summary\n\nThis PR introduces a
`getModifiedVisAttributes` extension point,\nallowing profiles to
customize the default Lens chart configuration.\nAdditionally, it
updates the patterns data source profile to make use of\nthe extension
point in order to hide x-axis tick labels in the XY chart.\nIt also
stops hiding the chart by default for the patterns profile.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>","sha":"b53844fba3aa273b7c1088696383798a576f3f85","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","Project:OneDiscover","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Discover]
Lens config extension point and hiding x-axis tick labels in patterns
profile","number":225571,"url":"https://github.com/elastic/kibana/pull/225571","mergeCommit":{"message":"[Discover]
Lens config extension point and hiding x-axis tick labels in patterns
profile (#225571)\n\n## Summary\n\nThis PR introduces a
`getModifiedVisAttributes` extension point,\nallowing profiles to
customize the default Lens chart configuration.\nAdditionally, it
updates the patterns data source profile to make use of\nthe extension
point in order to hide x-axis tick labels in the XY chart.\nIt also
stops hiding the chart by default for the patterns profile.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>","sha":"b53844fba3aa273b7c1088696383798a576f3f85"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225571","number":225571,"mergeCommit":{"message":"[Discover]
Lens config extension point and hiding x-axis tick labels in patterns
profile (#225571)\n\n## Summary\n\nThis PR introduces a
`getModifiedVisAttributes` extension point,\nallowing profiles to
customize the default Lens chart configuration.\nAdditionally, it
updates the patterns data source profile to make use of\nthe extension
point in order to hide x-axis tick labels in the XY chart.\nIt also
stops hiding the chart by default for the patterns profile.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>","sha":"b53844fba3aa273b7c1088696383798a576f3f85"}}]}]
BACKPORT-->

Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
@jughosta
Copy link
Contributor

jughosta commented Jul 1, 2025

💚 All backports created successfully

Status Branch Result
8.19

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

Questions ?

Please refer to the Backport tool documentation

jughosta pushed a commit to jughosta/kibana that referenced this pull request Jul 1, 2025
…in patterns profile (elastic#225571)

## Summary

This PR introduces a `getModifiedVisAttributes` extension point,
allowing profiles to customize the default Lens chart configuration.
Additionally, it updates the patterns data source profile to make use of
the extension point in order to hide x-axis tick labels in the XY chart.
It also stops hiding the chart by default for the patterns profile.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
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](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: James Gowdy <jgowdy@elastic.co>
(cherry picked from commit b53844f)

# Conflicts:
#	src/platform/packages/shared/kbn-unified-histogram/hooks/use_unified_histogram.ts
#	src/platform/plugins/shared/discover/public/application/main/components/layout/use_discover_histogram.test.tsx
#	src/platform/plugins/shared/discover/public/application/main/components/layout/use_discover_histogram.ts
#	src/platform/plugins/shared/discover/public/context_awareness/__mocks__/context_awareness.tsx
jughosta added a commit that referenced this pull request Jul 1, 2025
…labels in patterns profile (#225571) (#226056)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Discover] Lens config extension point and hiding x-axis tick labels
in patterns profile
(#225571)](#225571)

<!--- Backport version: 10.0.1 -->

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

<!--BACKPORT [{"author":{"name":"Davis
McPhee","email":"davis.mcphee@elastic.co"},"sourceCommit":{"committedDate":"2025-07-01T14:24:52Z","message":"[Discover]
Lens config extension point and hiding x-axis tick labels in patterns
profile (#225571)\n\n## Summary\n\nThis PR introduces a
`getModifiedVisAttributes` extension point,\nallowing profiles to
customize the default Lens chart configuration.\nAdditionally, it
updates the patterns data source profile to make use of\nthe extension
point in order to hide x-axis tick labels in the XY chart.\nIt also
stops hiding the chart by default for the patterns profile.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>","sha":"b53844fba3aa273b7c1088696383798a576f3f85","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","Project:OneDiscover","backport:version","v9.1.0","v8.19.0","v9.2.0"],"title":"[Discover]
Lens config extension point and hiding x-axis tick labels in patterns
profile","number":225571,"url":"https://github.com/elastic/kibana/pull/225571","mergeCommit":{"message":"[Discover]
Lens config extension point and hiding x-axis tick labels in patterns
profile (#225571)\n\n## Summary\n\nThis PR introduces a
`getModifiedVisAttributes` extension point,\nallowing profiles to
customize the default Lens chart configuration.\nAdditionally, it
updates the patterns data source profile to make use of\nthe extension
point in order to hide x-axis tick labels in the XY chart.\nIt also
stops hiding the chart by default for the patterns profile.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>","sha":"b53844fba3aa273b7c1088696383798a576f3f85"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/226022","number":226022,"state":"OPEN"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225571","number":225571,"mergeCommit":{"message":"[Discover]
Lens config extension point and hiding x-axis tick labels in patterns
profile (#225571)\n\n## Summary\n\nThis PR introduces a
`getModifiedVisAttributes` extension point,\nallowing profiles to
customize the default Lens chart configuration.\nAdditionally, it
updates the patterns data source profile to make use of\nthe extension
point in order to hide x-axis tick labels in the XY chart.\nIt also
stops hiding the chart by default for the patterns profile.\n\n###
Checklist\n\n- [ ] Any text added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n-
[x] Review the
[backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand
apply applicable `backport:*` labels.\n\n---------\n\nCo-authored-by:
James Gowdy
<jgowdy@elastic.co>","sha":"b53844fba3aa273b7c1088696383798a576f3f85"}}]}]
BACKPORT-->

---------

Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
@davismcphee davismcphee deleted the lens-config-extension-poc branch July 4, 2025 03:44
@davismcphee
Copy link
Contributor Author

@jughosta Created a separate issue for the columns problems you mentioned here: #226612. At very least, this part sounds like it's likely a bug to fix on our end:

with count instead of Count then the width would not be applied and after saving this Discover session the count column disappears from the screen

kertal pushed a commit to kertal/kibana that referenced this pull request Jul 25, 2025
…in patterns profile (elastic#225571)

## Summary

This PR introduces a `getModifiedVisAttributes` extension point,
allowing profiles to customize the default Lens chart configuration.
Additionally, it updates the patterns data source profile to make use of
the extension point in order to hide x-axis tick labels in the XY chart.
It also stops hiding the chart by default for the patterns profile.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
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](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] 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](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: James Gowdy <jgowdy@elastic.co>
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 Project:OneDiscover Enrich Discover with contextual awareness 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// v8.19.0 v9.1.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants