-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Lens] Inline editing of lens panels on a dashboard or canvas #166169
Conversation
@@ -38,24 +38,6 @@ describe('open config panel action', () => { | |||
expect(isCompatible).toBeFalsy(); | |||
}); | |||
|
|||
it('is incompatible with non text based language embeddable', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ no need for this test now that we enable inline editing everywhere.
@@ -75,6 +75,7 @@ export class EditPanelAction implements Action<ActionContext> { | |||
const canEditEmbeddable = Boolean( | |||
embeddable && | |||
embeddable.getOutput().editable && | |||
!embeddable.getOutput().inlineEditable && | |||
(embeddable.getOutput().editUrl || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ hides the embeddable edit action if inline editing exists
@@ -69,7 +73,8 @@ export interface ChartProps { | |||
disableTriggers?: LensEmbeddableInput['disableTriggers']; | |||
disabledActions?: LensEmbeddableInput['disabledActions']; | |||
input$?: UnifiedHistogramInput$; | |||
lensTablesAdapter?: Record<string, Datatable>; | |||
lensAdapters?: UnifiedHistogramChartLoadEvent['adapters']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Instead of sending only the tables we now send all the adapters object to Lens flyout. With this way we can fetch correctly the active data. (Solves a bug currently in main more visible on this PR, check first bullet here
@@ -83,7 +83,7 @@ export default function canvasLensTest({ getService, getPageObjects }: FtrProvid | |||
const panelHeader = await testSubjects.find('embeddablePanelHeading-'); | |||
await dashboardPanelActions.openContextMenu(panelHeader); | |||
await dashboardPanelActions.clickEdit(); | |||
await await PageObjects.lens.saveAndReturn(); | |||
await PageObjects.lens.saveAndReturn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ℹ️ Irrelevant with this change, I just saw it and decided to fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional test changes + small Embeddables changes LGTM! Also tested this out in chrome, and it feels really snappy and nice. What a great addition to the product!
One small nit, the labels in the editor make reference to drag and drop a field
but there is no where to drag fields from!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unified Histogram changes look good to me overall! I left a small nit, but nothing blocking. The "Cancel" and "Apply and close" buttons are definitely an improvement in Discover too.
The only issue I ran into when testing in Discover was that for some reason I couldn't interact with half the screen whenever the Lens flyout was open. Maybe some styles were introduced in this PR that caused it?
@ThomThomson thanx a lot for your review. You can drag and drop fields from other dimensions so I don't think it is wrong If you think that it is confusing though I can discuss with our ux writters! |
@davismcphee good catch! Fixed! |
The type check fails due to problems that exist in main and are not introduced by this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ent-search changes LGTM
Maybe this is just a symptom of the way I use Lens - I always drag fields in from the left. It could be worth re-visiting the copy, but I'd defer to you on it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Discover flyout issue is fixed! Thanks, LGTM 👍
src/plugins/unified_histogram/public/container/services/state_service.ts
Outdated
Show resolved
Hide resolved
💔 Build FailedFailed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
To update your PR or re-run it, just comment with: |
## Summary With the arrival of inline editing to Lens panels the [Create visualizations](https://www.elastic.co/guide/en/kibana/current/lens.html#create-the-visualization-panel) 'Edit and delete' section has been updated. Users can now use the option **Edit visualization** to make edits to Lens visualizations using a flyout panel, without having to leave the dashboard and go into the Lens application. The [Edit panels](https://www.elastic.co/guide/en/kibana/current/dashboard.html#edit-panels) section on the 'Dashboards and visualizations' page has been edited as the **Edit Lens** option has been removed from the UI. Relates to: #166169 & [#243](https://github.com/elastic/platform-docs-team/issues/243)
## Summary With the arrival of inline editing to Lens panels the [Create visualizations](https://www.elastic.co/guide/en/kibana/current/lens.html#create-the-visualization-panel) 'Edit and delete' section has been updated. Users can now use the option **Edit visualization** to make edits to Lens visualizations using a flyout panel, without having to leave the dashboard and go into the Lens application. The [Edit panels](https://www.elastic.co/guide/en/kibana/current/dashboard.html#edit-panels) section on the 'Dashboards and visualizations' page has been edited as the **Edit Lens** option has been removed from the UI. Relates to: elastic#166169 & [elastic#243](https://github.com/elastic/platform-docs-team/issues/243) (cherry picked from commit 5e84147)
# Backport This will backport the following commits from `main` to `8.11`: - [[DOCS] Inline editing in Lens (#170649)](#170649) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"amyjtechwriter","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-11-06T15:25:03Z","message":"[DOCS] Inline editing in Lens (#170649)\n\n## Summary\r\n\r\nWith the arrival of inline editing to Lens panels the [Create\r\nvisualizations](https://www.elastic.co/guide/en/kibana/current/lens.html#create-the-visualization-panel)\r\n'Edit and delete' section has been updated. Users can now use the option\r\n**Edit visualization** to make edits to Lens visualizations using a\r\nflyout panel, without having to leave the dashboard and go into the Lens\r\napplication.\r\n\r\nThe [Edit\r\npanels](https://www.elastic.co/guide/en/kibana/current/dashboard.html#edit-panels)\r\nsection on the 'Dashboards and visualizations' page has been edited as\r\nthe **Edit Lens** option has been removed from the UI.\r\n\r\nRelates to: #166169 &\r\n[#243](https://github.com/elastic/platform-docs-team/issues/243)","sha":"5e8414779ae60b2d8e7e9a5019b78045c1ce14a2","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","Team:Visualizations","release_note:skip","Feature:Lens","docs","v8.11.0","v8.12.0"],"number":170649,"url":"https://github.com/elastic/kibana/pull/170649","mergeCommit":{"message":"[DOCS] Inline editing in Lens (#170649)\n\n## Summary\r\n\r\nWith the arrival of inline editing to Lens panels the [Create\r\nvisualizations](https://www.elastic.co/guide/en/kibana/current/lens.html#create-the-visualization-panel)\r\n'Edit and delete' section has been updated. Users can now use the option\r\n**Edit visualization** to make edits to Lens visualizations using a\r\nflyout panel, without having to leave the dashboard and go into the Lens\r\napplication.\r\n\r\nThe [Edit\r\npanels](https://www.elastic.co/guide/en/kibana/current/dashboard.html#edit-panels)\r\nsection on the 'Dashboards and visualizations' page has been edited as\r\nthe **Edit Lens** option has been removed from the UI.\r\n\r\nRelates to: #166169 &\r\n[#243](https://github.com/elastic/platform-docs-team/issues/243)","sha":"5e8414779ae60b2d8e7e9a5019b78045c1ce14a2"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/170649","number":170649,"mergeCommit":{"message":"[DOCS] Inline editing in Lens (#170649)\n\n## Summary\r\n\r\nWith the arrival of inline editing to Lens panels the [Create\r\nvisualizations](https://www.elastic.co/guide/en/kibana/current/lens.html#create-the-visualization-panel)\r\n'Edit and delete' section has been updated. Users can now use the option\r\n**Edit visualization** to make edits to Lens visualizations using a\r\nflyout panel, without having to leave the dashboard and go into the Lens\r\napplication.\r\n\r\nThe [Edit\r\npanels](https://www.elastic.co/guide/en/kibana/current/dashboard.html#edit-panels)\r\nsection on the 'Dashboards and visualizations' page has been edited as\r\nthe **Edit Lens** option has been removed from the UI.\r\n\r\nRelates to: #166169 &\r\n[#243](https://github.com/elastic/platform-docs-team/issues/243)","sha":"5e8414779ae60b2d8e7e9a5019b78045c1ce14a2"}}]}] BACKPORT--> Co-authored-by: amyjtechwriter <[email protected]>
Summary
Closes #166833
Closes #167063
This PR allows the inline editing of Lens panels in canvas and dashboards.
Changes
Discover
Dashboard
Known issues
Missing
These 2 features are missing to give the full set of capabilities of the editor to the flyout. Both are missing from ESQL editing too and are going to be added on a follow up PR
Flaky tests runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3182 (100 times)
Panel focus
This PR will look even better when this is merged! #165417
Checklist