Skip to content
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

"Share saved search" message needs to change because user doesn't always see the most recent saved version of the search. #10165

Closed
bhavyarm opened this issue Feb 2, 2017 · 5 comments
Labels
bug Fixes for quality problems that affect the customer experience

Comments

@bhavyarm
Copy link
Contributor

bhavyarm commented Feb 2, 2017

Kibana version: 5.2.0 (same behaviour in 5.1.2)

Elasticsearch version: 5.2.0

Original install method (e.g. download page, yum, from source, etc.): download page

Description of the problem including expected versus actual behavior: Assume you want to share a search with a certain query search results. You can share a search as either "share saved search" or "share snapshot".

For sharing "saved search", Kibana displays the message that "You can share this URL with people to let them load the most recent saved version of this search." But if you save and share a search and make changes to the original search and save it again, that change isn't really reflected on the shared search link. Kibana is behaving as intended I think, but if user is hitting refresh upon the assumption that shared search URL is reflecting the most recent saved search results, then she won't see the new search results. The shared search URL needs to be copied again to reflect the query changes. For sharing as a snapshot search, there is no such confusion in the message Kibana displays.

Steps to reproduce:

  1. In discover save a search, click on share and under "share saved search", copy the share url
  2. Paste the url in a new tab and you can see the search results
  3. No in the original kibana(?) window, modify your search query and save the results.
  4. Hit refresh or reload the page on the tab where you loaded the original share URL. You can't really see the latest search results.

Sharing visualizations and dashboard have the same problem for sharing a saved search.

@bhavyarm bhavyarm added :Sharing bug Fixes for quality problems that affect the customer experience labels Feb 2, 2017
@Bargs
Copy link
Contributor

Bargs commented Feb 14, 2017

At first I felt like this was definitely a bug, but thinking about it more I'm not so sure. I bet Discover is looking at some stale app state after refresh instead of looking to the updated saved search as the ultimate source of truth. But let's say the user had edited the query after loading the saved search. Should refreshing the page blow away the user's edits? In any case, we should make sure this behaves consistently across Discover, Visualize, and Dashboard.

@tbragin tbragin added the P3 label Feb 14, 2017
@stacey-gammon
Copy link
Contributor

Pretty sure this is essentially a duplicate of #9523

@Bargs
Copy link
Contributor

Bargs commented Mar 28, 2017

I think they're slightly different, because the Dashboard panel's saved state isn't at play here.

@LeeDr
Copy link
Contributor

LeeDr commented Apr 13, 2017

@bhavyarm and I went through this again yesterday (I was running a 5.4.0-SNAPSHOT). The shared link would indeed reflect the changes saved to the visualization.
The problem is that when you open that shared link Kibana replaces the URL with the actual query (or something like that). And so when you refresh your page, you're refreshing the initial actual query from the shared link.
If you start from scratch and open the shared link again you WILL get the changes that were saved in the Visualization.
But because of the way Kibana replaces the URL, the user can't easily save the correct link from their browser. They need to save the shared link, but they can't help but save the actual query that Kibana replaces it with.

@stacey-gammon
Copy link
Contributor

Visualize and dashboard do behave the same way.

I think this is WAI, for better or worse, and not a bug. What would be cool is if you loaded a saved dashboard and then had an indication that this dashboard has changed [refresh]? which is something I've been thinking about. It could prevent two people working on the same dashboard simultaneously from overwriting the other's edits. Or we could do something fancy and try to update it on the fly like Google Docs.

But that would be a pretty big endeavor and probably something that would fit better with the new platform system, if there was a way to subscribe to change events.

Perhaps an easier way to fix this would be to only store stuff in state as it is manually changed, just like we do with uiState for colors and columns. So if you open a dashboard and don't change the query, a subsequent refresh would pull in the latest query. if you do change the query, it'll never update because you've overridden the original state with your manual overrides.

That could actually be a way to cut back on URL length as well, especially for people just viewing dashboards. If you aren't interested in editing a dashboard, and haven't changed any panel state, why do we need to store all of it in the url? We'd only need it for the Share Snapshot feature.

I'm going to close this as working as intended. I don't think the message should change because it's accurate in that it lets them load the most recent saved version of this object when they navigate to the url. It's just that subsequent refreshes won't reflect new changes.

I also opened #14455 which will keep track of the url changes as an enhancement request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience
Projects
None yet
Development

No branches or pull requests

6 participants