-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Discover][Embeddable] Search embeddable to keep all SO fields #204651
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
Closed
kowalczyk-krzysztof
wants to merge
1
commit into
elastic:main
from
kowalczyk-krzysztof:fix/search-embedabble-so-fields
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
hmm , I'm not familar with the embeddable code here, but if we want to keep those fields, do we need to introduce observables for all of those, even if they don't change? @jughosta , do you know ? thx
Uh oh!
There was an error while loading. Please reload this page.
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.
I asked @Heenawter about this, and apparently this is the way to go and this is where the question about whether we really want ALL of the SO properties comes 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.
yes, that's a good question, because if this is the way to go, we would need to change this part of the code every time new properties are introduced. Which doesn not happen too often, but still ... I'd prefer a way that would take care of this automatically, @Heenawter is there an alternative to his ? thx!
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.
@kertal I guess I'm a bit confused what the goal is here. When you unlink a saved search, if that saved object has state that doesn't need to be used for the embeddable, why would we want to keep track of it in the embeddable? If you want to track a piece of state, the comparators for an embeddable require an observable because it's assuming that most state is "editable" - if it's state that doesn't change and isn't required for the embeddable to function, do you really need to track it? Why keep state around that you don't need? 🤷
cc @nreese @ThomThomson
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.
I'm not exactly sure why you'd want to track all of the saved object state when the panel is no longer linked. In #203662 I also added a
rawSavedObjectAttributeswhich tracks the attributes taken directly from the saved object. So if you really need to retain that information I'd recommend storing it there.On the other hand, if there isn't a user-facing reason for this change is it really worth doing? I'd let the data discovery team weigh in on that.
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.
let's pause until @davismcphee is back from PTO in the new year, who originally requested this change
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.
Hey all, I'm back from PTO and catching up on this now. I originally raised this in the refactor review partly because it was a change from what existed in
main, and because there are scenarios where it may be unexpected.A Discover session (saved search) contains more state than what we actually use in the embeddable panel, e.g. breakdown field and Lens vis config. If I create a Discover session with a custom Lens vis and add it as a dashboard panel, clicking "Open in Discover" will include my custom vis. This could be useful for users who want to kick off an investigation from a dashboard to a fully configured Discover view (especially as Discover sessions evolve for One Discover). But after the refactor, unlinking a Discover session panel removes all but the panel state, so the custom vis is gone when navigating to Discover. We don't have save and return support in Discover currently, but the same situation would apply there too.
So it's mainly a question of expectations. As a user, I would personally expect all of my Discover state to be preserved when unlinking or save-and-returning to support these cases (especially if
rawSavedObjectAttributesmakes this easy), but I don't feel super strongly about it. If others disagree, we could leave it as is and revisit if we receive feedback or it impacts later work.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.
I don't have anything of value to add to this discussion but I would appreciate if some kind of decision could be made on how to proceed with this issue. This started as a papercut but I'm not sure if that still would be the case now and if I should be involved in this.
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.
Thanks for working on this and bearing with us @kowalczyk-krzysztof. The team is all back from holidays now so I've added an agenda item for us to discuss this in our team sync next Monday, and we'll followup with the decision. If we decide we need something more complex than what you have here, we can take over the remainder of the work.
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.
@kowalczyk-krzysztof Looks like you noticed and closed already, but for future reference we discussed this in our team sync today and decided to leave this as a known issue for now unless a user raises it again or it blocks later work. Apologies that you worked on this only to have us close it, but we appreciate the effort regardless!