Skip to content

Redesign Share UI to emphasize difference between Original URLs and Snapshot URLs.#8157

Closed
cjcenizal wants to merge 18 commits intoelastic:masterfrom
cjcenizal:improvement/share-ui-snapshot-vs-original
Closed

Redesign Share UI to emphasize difference between Original URLs and Snapshot URLs.#8157
cjcenizal wants to merge 18 commits intoelastic:masterfrom
cjcenizal:improvement/share-ui-snapshot-vs-original

Conversation

@cjcenizal
Copy link
Copy Markdown
Contributor

@cjcenizal cjcenizal commented Sep 2, 2016

Redesign Share UI to emphasize difference between Original URLs and Snapshot URLs.

Discover

Unsaved

image

Saved

image

Short URL

image

Dashboard

Unsaved

image

Saved

image

Short URL

image

Visualization

Unsaved

image

Saved

image

Short URL

image

spalger and others added 17 commits August 19, 2016 18:53
Kibana currently stores it's entire application state in the URL by rison encoding it and sticking it into a query string parameter, _a for AppState and _g for GlobalState.

This has functioned fine for a while, but Internet Explorer's short URL length restriction are starting to become a problem for more and more users. To provide these users with a workaround this adds an advanced config option that will store the state in sessionStorage instead of the URL.

This is accomplished by hashing the serialized version of the state, storing a short version of the hash in the URL, and storing the whole serialized state in sessionStorage using the hash + state-type as a key.

Since sessionStorage is limited in size, we must clean up old stored states after they become unreachable to the application. This is done using the new `LazyLruStore` class, a wrapper around sessionStorage. This wrapper helps us maintain the list of stored states based on the time they are accessed (On each set the access time is updates).

It's cleanup style is configured with it's maxItems, idealClearRatio, and maxIdealClearPercent configurations. The defaults for which should be sufficient.

`maxItems`: limits the store to n items, removing the oldest item when the list overflows
`idealClearRatio+maxIdealClearPercent`: when `store.setItem(key, value)` throws an error we try to clear space equal to `idealClearRatio * (key+value).length`, but no more space than `totalSize * maxIdealClearPercent`
…age/refactor-pure-functions

Refactor state-hashing files into state_hashing and state_storage subdirectories.
…age/refactor-storage-naming

Rename HashingStore interface methods for consistency and clarity.
…age/simplify-hashing-store-interface

Simplify HashingStore interface.
- Replace with HashedItemStore, createStateHash, and isStateHash.
- Refactor stubBrowserStorage.
…age/simplify-lazy-lru-store

Another approach to managing persisted states.
@cjcenizal cjcenizal changed the title Redesign Share UI to empha Redesign Share UI to emphasize difference between Original URLs and Snapshot URLs. Sep 2, 2016
@cjcenizal cjcenizal force-pushed the improvement/share-ui-snapshot-vs-original branch 3 times, most recently from b9eb2be to 331d2ed Compare September 6, 2016 15:40
…napshot URLs.

- Remove share_object_url.
- Remove clipboard npm dependency.
@cjcenizal cjcenizal force-pushed the improvement/share-ui-snapshot-vs-original branch from 331d2ed to b188da2 Compare September 6, 2016 19:00
@cjcenizal
Copy link
Copy Markdown
Contributor Author

I got some design feedback from @alt74 and we updated the UI to look like this:

image

@cjcenizal cjcenizal deleted the improvement/share-ui-snapshot-vs-original branch April 17, 2017 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants