Skip to content

[Lens] Edit data view in flyout #142362

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

Merged
merged 31 commits into from
Oct 5, 2022

Conversation

flash1293
Copy link
Contributor

Part of #141806

If the app supports it, "Manage this data view" will open the flyout instead of navigating away:
Screenshot 2022-09-30 at 16 16 30

In this case there is a link below the heading to go to the management page if the user wants to do that.

Discover is currently changing the state handling in this area, that's why it's only implemented in Lens for now.

@flash1293 flash1293 added release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) Feature:Lens Feature:Unified search Unified search related tasks labels Sep 30, 2022
@flash1293 flash1293 marked this pull request as ready for review September 30, 2022 16:00
@flash1293 flash1293 requested review from a team as code owners September 30, 2022 16:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@stratoula
Copy link
Contributor

@flash1293 this works fine. I have 2 questions:

  • I open the flyout for an existing dataview and I change the pattern. The Save button is unresponsive. Shouldn't it update the current dataview? If not, maybe we should disable the button?

image

  • When I create an adhoc dataview and then open the Edit flyout I see only the Save button. I expect that clicking it will save my dataview as permanent but it doesn't. When I refresh the page, the dataview is lost. Maybe this is just an update CTA? Should we change the text from Save to Update maybe in order to not be so confusing? Wdyt?

image

@flash1293
Copy link
Contributor Author

Thanks for your review @stratoula !

I open the flyout for an existing dataview and I change the pattern. The Save button is unresponsive. Shouldn't it update the current dataview? If not, maybe we should disable the button?

That was a bug in the data view editor plugin, I fixed it

When I create an adhoc dataview and then open the Edit flyout I see only the Save button. I expect that clicking it will save my dataview as permanent but it doesn't. When I refresh the page, the dataview is lost. Maybe this is just an update CTA

Good point - I changed the button label to "Continue to use without saving". It was meant to keep it as an ad-hoc data view but update it in-place.

@flash1293
Copy link
Contributor Author

I also pulled in https://github.com/elastic/kibana/pull/142562/files to fix another problem I noticed with not all parts of the UI updating correctly.

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

Thanx @flash1293! This works great now! And thanx for pulling the changes from the other PR too. FYI, I did a latest change there because there were some unit tests failing e84bccb

Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

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

Code lgtm,

noticed some minor things during testing

@@ -376,6 +385,17 @@ const IndexPatternEditorFlyoutContentComponent = ({
<EuiTitle data-test-subj="flyoutTitle">
<h2>{editData ? editorTitleEditMode : editorTitle}</h2>
</EuiTitle>
{showManagementLink && editData && editData.id && (
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should hide it when you edit an ad-hoc data view (now we show it when you edit ad-hoc data view)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, added that

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #31 / Reporting Functional Tests with forced timeout adds a visual warning in the report output

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
unifiedSearch 102 104 +2

Async chunks

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

id before after diff
dataViewEditor 30.6KB 31.1KB +505.0B
lens 1.3MB 1.3MB +265.0B
total +770.0B

Page load bundle

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

id before after diff
dataViewEditor 10.3KB 10.4KB +102.0B
unifiedSearch 48.4KB 48.6KB +173.0B
total +275.0B
Unknown metric groups

API count

id before after diff
dataViewEditor 15 16 +1
unifiedSearch 128 131 +3
total +4

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@flash1293 flash1293 merged commit b270921 into elastic:main Oct 5, 2022
@kibanamachine kibanamachine added v8.6.0 backport:skip This commit does not require backporting labels Oct 5, 2022
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 11, 2022
* add explore matching index

* adjust type

* move things around

* fix types

* fix tests

* fix imports

* fix limit

* do not clean datasource on adding ad hoc data view

* manage data view in flyout

* fix phrase

* make sure all changes are propagated correctly

* fix test

* Update src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx

Co-authored-by: Anton Dosov <dosantappdev@gmail.com>

* only show for persisted data views

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this pull request Oct 14, 2022
* add explore matching index

* adjust type

* move things around

* fix types

* fix tests

* fix imports

* fix limit

* do not clean datasource on adding ad hoc data view

* manage data view in flyout

* fix phrase

* make sure all changes are propagated correctly

* fix test

* Update src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx

Co-authored-by: Anton Dosov <dosantappdev@gmail.com>

* only show for persisted data views

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Lens Feature:Unified search Unified search related tasks release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants