-
Notifications
You must be signed in to change notification settings - Fork 8
Consider implementing URLs for pages to allow sharing via bookmarks #133
Comments
Interesting, seems like a good approach to me. I can take this up!! |
@portante @npalaska @dbutenhof What would the server-side do with this "session sharing URL" ? |
We'll need to figure out some way to wrap this sort of thing into the default routing in the I've debated internally whether we should think about issuing a read-only authorization token for this; but unless we get into more generic role support I don't think we need it. You can share some encapsulation of the current dashboard state as a URL, via bookmark, email, embedded in a document, and the dashboard can "reconstitute" itself from that link. At worst, this would be essentially the "saved view" that the dashboard is doing now in GraphQL metadata, but expressed in a generated URL link something like This might be something like |
As Dave outlined, hopefully the URL in its raw form will not reach the server. The idea is for the URL to contain sufficient information to allow the Dashboard to recreate a view which someone previously saved/shared. Presumably, the Dashboard would make requests to the server in order to render the contents of the requested view, but nothing about the view itself would be saved on the server (or in the Dashboard/browser, or anywhere else other than in the URL). As Dave said, if we can put it all into the URL, then the view can be saved in a browser bookmark, or it can be pasted into an email or a Google doc, or embedded into a web page, such that anyone can click on it and see what the original author saw (assuming that they have sufficient access to view the data). |
Today, the dashboard has a notion of a "session" where the Redux state can be saved to a GraphQL instance under a URL that can be shared. This requires saved state in some database that has to be managed.
Instead, we should consider the principle of not implementing behaviors that are already solved by well accepted / known methods.
If we encode the state of a page as a URL in the browser, and removed the need to save the state in a GraphQL instance, it would allow us to:
The text was updated successfully, but these errors were encountered: