-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Discuss] URL/Undo handling in applications #35812
Comments
++ I could see a scenario where we develop some sort of unified interface for managing transient application state, which is provided to all application developers as a service. Such a service could abstract away the actual caching of the data (in localStorage or wherever), while also managing changes to the state to allow for undo/redo functionality. As an application developer, you just throw the objects at it that you want to cache. When a user returns to your app, you can use the service to check for any unsaved state that you wish to restore. |
To add some context to the Maps-app approach. It does not accomodate two use-cases, which would be valuable for maps.
|
This is related to #8887. Feel free to close it if you feel it's outdated. |
also somewhat related: #25247 |
We currently have no aligned implementation and behavior of handling state via URLs and undo in Kibana. This means every application handles this slightly different leading us to an overall bad usability, since a user might need to change adopt when switching applications within Kibana to different behaviors, which can also be harmful in a way, that if they try to use one pattern in another app (like pressing browsers back button), they'll suddenly lose all their progress. I think we should start discussion about aligning those behaviors across apps.
The current ways we do state/undo handling:
Complete state handling via URL
This is the current behavior in Visualize/Dashboard/Discover (aka the initial way Kibana handled that). We'll basically store the whole state of your (unsaved) work into the URL. Undo will thus work by just pressing the browser back button.
Pros:
Cons:
Auto-saving state (the Canvas way)
The canvas URL will stay to an id of the saved canvas worksheet and every change will immediately persisted to that save sheet. Undo is handled internally by the application and will be saved to the same workpad again.
Pros:
Cons:
Manual saving, short URLs (the Maps way)
Maps require the user to save their state. At this point the URL will point to that saved map, which will always represent the latest saved state of that Map. Temporary changes are not represented in the URL. Undo needs to be handled by the application internally.
Pros:
Cons:
I personally think the approach of Maps is my most favorite one right now, if we would extend it for something like (local) auto-drafts (to prevent easy loss of your unsaved state), and potentially give the user a manual possibility to create a URL pointing to your unsaved state, that they can share.
cc @peterschretlen @rayafratkina @stacey-gammon @thomasneirynck @clintandrewhall @ppisljar @skearns64
I won't label all application teams for now, to prevent pinging all team members, so please subscribe if you want to follow.
The text was updated successfully, but these errors were encountered: