APYDataGridBundle icon indicating copy to clipboard operation
APYDataGridBundle copied to clipboard

Session-distinct Grids

Open nurikabe opened this issue 12 years ago • 6 comments

Something to consider for this version or 3.0. I have users who often open many tabs of the same grid. We manage grid state exclusively in the session, which means that although multiple tabs are open, only one filtered state is available for all of the tabs. Can be confusing.

nurikabe avatar Sep 24 '13 12:09 nurikabe

I agree but how do you suggest that ? how do you know which filter is for each tab ?

Cookie ? ( https://github.com/chrisdew/subsession ) localStorage HTML5 SessionStorage ? (Data stored using sessionStorage do not persist across browser tabs, even if two tabs both contain webpages from the same domain origin. In other words, data inside sessionStorage is confined to not just the domain and directory of the invoking page, but the browser tab in which the page is contained in.)

If we can do that, we can have three states of persistence. (false, session, tab) It could be great.

Abhoryo avatar Sep 24 '13 14:09 Abhoryo

I was thinking about keeping it simple and adding some kind of key to the url. For example:

/app_dev.php/usersgrid/?abc123
/app_dev.php/usersgrid/?abc456

Each url above would have a distinct grid state.

If we went with this approach, it's probably something we would want users to be able to turn on/off. Some will want distinct grid states, some will want "clean" urls. That said, if I was using the Ajax grids then the above approach would work and I'd still get clean urls.

Hadn't thought about HTML5 SessionStorage. Might be the way to go if it's not overkill.

nurikabe avatar Sep 25 '13 11:09 nurikabe

I think only cookie can perform this task. Html 5 storage is local and isn't compatible with all browsers.

Abhoryo avatar Sep 25 '13 12:09 Abhoryo

Or user have to add plugin in them browser to have one session per tab.

Abhoryo avatar Sep 25 '13 12:09 Abhoryo

Query parameters should be good for this.

alibahsisoglu avatar Nov 23 '13 21:11 alibahsisoglu

+1 @alibahsisoglu I need filters and sorting parameters in query string, I need this to make a shareable (between users) grids with pre-setted filter values and column orders.

@Abhoryo news?

bigfoot90 avatar Dec 29 '14 20:12 bigfoot90