-
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
[discover] Enable data view editing from flyout #149453
[discover] Enable data view editing from flyout #149453
Conversation
@@ -289,8 +289,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { | |||
await testSubjects.click('indexPattern-manage-field'); | |||
await PageObjects.header.waitUntilLoadingHasFinished(); | |||
|
|||
const titleElem = await testSubjects.find('currentIndexPatternTitle'); | |||
expect(await titleElem.getVisibleText()).to.equal(dataView); | |||
const titleElem = await testSubjects.find('createIndexPatternTitleInput'); |
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.
These tests change because its opening the flyout instead of navigating to data view management.
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
src/plugins/discover/public/application/main/components/top_nav/discover_topnav.tsx
Outdated
Show resolved
Hide resolved
…v/discover_topnav.tsx Co-authored-by: Matthias Wilhelm <[email protected]>
…-ref HEAD~1..HEAD --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.
Looks nice and green! What currently doesn't work is, when renaming the data view, the change isn't displayed in the data view select button
Kapture.2023-01-27.at.14.15.33.mp4
Might be the case that when a data view is changed, it's mutated, so the reference to the object doesn't change? because this wouldn't trigger an update then
I might be wrong, but I think it worked in #148283
// refetch data view to force react state update
// by creating new data view reference in the state
dataViews.clearInstanceCache(dataViewId);
stateContainer.actions.setDataView(await dataViews.get(dataViewId));
However, if there's an option to clone the data view on edit, I think it would also work?
…ime/kibana into enable_data_view_edit_from_floyout
@kertal The issue I saw and fixed was a bit different from the one you show in the recording. Either its ready to go OR there's something I've failed to reproduce. Screen.Recording.2023-01-27.at.7.39.21.PM.mov |
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.
Pulled and tested locally, and works as expected. Whatever the issue was with the selector seems to be working now. LGTM!
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.
LGTM 👍 Thx for bringing this over the finishing line. One thing that IMO is worth an issue, when changing the index pattern of the data view, I think the fields are not refetched, which leads to unmapped fields when e.g. switching from "commerce" to "flights" index pattern
However, before users are doing so, they are warned, that this kind of change can lead to breaking changes. So this should not block this PR, but I think it shouldn't be a big effort to fix this, and I bet once users have to option the change the data view with a flyout, they will use it more often to apply changes like this
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
## Summary Currently, changes to a data view require a round trip to management when you're in discover. This PR allows editing of data views via flyout from within discover. Closes elastic#144801 ### Checklist Delete any items that are not applicable to this PR. - [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 --------- Co-authored-by: Matthias Wilhelm <[email protected]> Co-authored-by: kibanamachine <[email protected]>
Summary
Currently, changes to a data view require a round trip to management when you're in discover. This PR allows editing of data views via flyout from within discover.
Closes #144801
Checklist
Delete any items that are not applicable to this PR.