Skip to content

[Lens] Move toolbar from Lens editor workspace to config panel#239879

Merged
mariairiartef merged 20 commits intoelastic:mainfrom
mariairiartef:lens/239719
Oct 29, 2025
Merged

[Lens] Move toolbar from Lens editor workspace to config panel#239879
mariairiartef merged 20 commits intoelastic:mainfrom
mariairiartef:lens/239719

Conversation

@mariairiartef
Copy link
Contributor

@mariairiartef mariairiartef commented Oct 21, 2025

Summary

Moves toolbar from workspace to config panel.

After

Screenshot 2025-10-23 at 14 17 59

With disabled "Auto-apply visualization changes"

Screenshot 2025-10-23 at 14 22 24

Checklist

Issues

Closes #239719

Release Notes

Moves the Lens visualization toolbar from the workspace section to the config panel.

@mariairiartef mariairiartef self-assigned this Oct 21, 2025
@mariairiartef mariairiartef added Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:Lens backport:skip This PR does not require backporting release_note:enhancement labels Oct 21, 2025
@mariairiartef mariairiartef changed the title [Lens] Move toolbar to workspace to config panel Oct 22, 2025
@mariairiartef mariairiartef force-pushed the lens/239719 branch 2 times, most recently from cc4776f to b7a3301 Compare October 23, 2025 12:27
@mariairiartef mariairiartef marked this pull request as ready for review October 23, 2025 12:34
@mariairiartef mariairiartef requested a review from a team as a code owner October 23, 2025 12:34
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@mariairiartef mariairiartef marked this pull request as draft October 23, 2025 14:25
@mariairiartef
Copy link
Contributor Author

/ci

2 similar comments
@mariairiartef
Copy link
Contributor Author

/ci

@mariairiartef
Copy link
Contributor Author

/ci

@mariairiartef
Copy link
Contributor Author

/ci

@mariairiartef
Copy link
Contributor Author

/ci

@mariairiartef mariairiartef marked this pull request as ready for review October 27, 2025 07:52
@mariairiartef mariairiartef requested a review from a team as a code owner October 27, 2025 07:52
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

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

[✅] x-pack/platform/test/functional/apps/lens/group1/config.ts: 25/25 tests passed.
[✅] x-pack/platform/test/functional/apps/lens/group4/config.ts: 25/25 tests passed.
[✅] x-pack/platform/test/functional/apps/lens/group5/config.ts: 25/25 tests passed.
[✅] x-pack/platform/test/functional/apps/lens/group6/config.ts: 25/25 tests passed.

see run history

`}
responsive={false}
>
{!isFullscreen && (
Copy link
Contributor

Choose a reason for hiding this comment

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

can we revisit this?

Lots of users like to edit formulas in full screen mode, but now all the toolbar buttons are gone.

Formula expand mode in Lens editor:

Image

Formula expand mode in Dashboard inline editing:

Image
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that currently, whenever you enable the "formula expand mode", the toolbar disappears. I mean, the toolbar never was there in the expanded mode, right? Do you think we should show it? 🤔 Even with the new system, you are not enable to simultaneously edit the style and the visualization configuration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gvnmagni do you think we should consider this?

The flow will be like this:
Screenshot 2025-10-28 at 12 51 02

Copy link
Contributor

Choose a reason for hiding this comment

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

Checked with previous version and I was wrong, as those buttons were hidden like they do with your PR.
So good for me 👍

Comment on lines 157 to 168
<EuiFlexItem
css={css({ margin: `${euiTheme.size.base} ${euiTheme.size.base} 0 0` })}
>
<EuiFlexGroup
alignItems="center"
justifyContent="flexEnd"
responsive={false}
wrap={true}
>
<VisualizationToolbarWrapper framePublicAPI={framePublicAPI} />
</EuiFlexGroup>
</EuiFlexItem>
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks looks like the wrong way around with flex group inside a flex item guess we need to swap that? might be worth revisiting how to properly structure this. the parent section doesn't use EUI but sets flex on the section, maybe it's sufficient to just have VisualizationToolbarWrapper in here?

}

return (
<EuiFlexItem grow={false} data-test-subj="lnsVisualizationToolbar">
Copy link
Contributor

Choose a reason for hiding this comment

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

It's been like this previously but I wonder if having the flex item here is a bit too opinionated since it's expects the user of the component to know that it needs a parent flex group on the outside. maybe we should remove the item here and have it outside in the places where necessary?

Copy link
Contributor Author

@mariairiartef mariairiartef Oct 29, 2025

Choose a reason for hiding this comment

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

Thanks for noticing this! I tried to update it so it looks like this:

Screenshot 2025-10-29 at 07 35 23

Done here

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks better now! Since you moved data-test-subj="lnsVisualizationToolbar" out of the component we're missing it now in the FlyoutWrapper component (x-pack/platform/plugins/shared/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.tsx) so we need to change {toolbar && <EuiFlexItem grow={false}>{toolbar}</EuiFlexItem>} to {toolbar && <EuiFlexItem grow={false} data-test-subj="lnsVisualizationToolbar">{toolbar}</EuiFlexItem>} there too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

Latest changes LGTM. 🚀

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 1420 1421 +1

Async chunks

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

id before after diff
lens 1.5MB 1.5MB +90.0B

History

cc @mariairiartef

@mariairiartef mariairiartef merged commit d8c5140 into elastic:main Oct 29, 2025
12 checks passed
sbelastic pushed a commit to sbelastic/kibana that referenced this pull request Oct 30, 2025
…ic#239879)

## Summary

Moves toolbar from workspace to config panel.

#### After

<img width="2560" height="1295" alt="Screenshot 2025-10-23 at 14 17 59"
src="https://github.com/user-attachments/assets/cdd1a3ed-7420-4e55-8c1b-7aa77ba88175"
/>


#### With disabled "Auto-apply visualization changes"

<img width="2560" height="1294" alt="Screenshot 2025-10-23 at 14 22 24"
src="https://github.com/user-attachments/assets/631f46c4-8a83-411f-bc29-27df257eaeef"
/>

### Checklist

- [ ] [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
- [ ] [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.

### Issues

Closes elastic#239719

### Release Notes

Moves the Lens visualization toolbar from the workspace section to the
config panel.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
qn895 pushed a commit to qn895/kibana that referenced this pull request Oct 30, 2025
…ic#239879)

## Summary

Moves toolbar from workspace to config panel.

#### After

<img width="2560" height="1295" alt="Screenshot 2025-10-23 at 14 17 59"
src="https://github.com/user-attachments/assets/cdd1a3ed-7420-4e55-8c1b-7aa77ba88175"
/>


#### With disabled "Auto-apply visualization changes"

<img width="2560" height="1294" alt="Screenshot 2025-10-23 at 14 22 24"
src="https://github.com/user-attachments/assets/631f46c4-8a83-411f-bc29-27df257eaeef"
/>

### Checklist

- [ ] [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
- [ ] [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.

### Issues

Closes elastic#239719

### Release Notes

Moves the Lens visualization toolbar from the workspace section to the
config panel.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
ana-davydova pushed a commit to ana-davydova/kibana that referenced this pull request Nov 3, 2025
…ic#239879)

## Summary

Moves toolbar from workspace to config panel.

#### After

<img width="2560" height="1295" alt="Screenshot 2025-10-23 at 14 17 59"
src="https://github.com/user-attachments/assets/cdd1a3ed-7420-4e55-8c1b-7aa77ba88175"
/>


#### With disabled "Auto-apply visualization changes"

<img width="2560" height="1294" alt="Screenshot 2025-10-23 at 14 22 24"
src="https://github.com/user-attachments/assets/631f46c4-8a83-411f-bc29-27df257eaeef"
/>

### Checklist

- [ ] [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
- [ ] [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.

### Issues

Closes elastic#239719

### Release Notes

Moves the Lens visualization toolbar from the workspace section to the
config panel.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
albertoblaz pushed a commit to albertoblaz/kibana that referenced this pull request Nov 4, 2025
…ic#239879)

## Summary

Moves toolbar from workspace to config panel.

#### After

<img width="2560" height="1295" alt="Screenshot 2025-10-23 at 14 17 59"
src="https://github.com/user-attachments/assets/cdd1a3ed-7420-4e55-8c1b-7aa77ba88175"
/>


#### With disabled "Auto-apply visualization changes"

<img width="2560" height="1294" alt="Screenshot 2025-10-23 at 14 22 24"
src="https://github.com/user-attachments/assets/631f46c4-8a83-411f-bc29-27df257eaeef"
/>

### Checklist

- [ ] [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
- [ ] [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.

### Issues

Closes elastic#239719

### Release Notes

Moves the Lens visualization toolbar from the workspace section to the
config panel.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
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:Lens needs_docs release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v9.3.0

7 participants