When reloading the page, navigation panel state is lost. I believe it would be more expected behavior to remember navigation state and restore it.
For me, that's the most annoying point with the new navigation.
Related: When navigating to some DB and reloading the page (the hash-page redirecting to the normal page), the navigation for the current DB is not open.
@lem9 and @roccivic, opinions?
PMA_reloadNavigation() from navigation.js contains the logic necessary to save the state of the tree and to request a new copy of the tree in the same state. So I guess that's a good place to start looking...
I discourage embedding the navigation panel state in the URL hash, though. We should store it in the session, shouldn't we?
And: Do we need to allow users to turn off the navigation state restore?
There are other cases where the status of currently opened db/table in the navi is not remembered; not sure how much work it would be to fix that. I'll try to takes notes when this happens.
@J,M: the navigation state is not stored in the url hash, it's not stored anywhere in fact and that's why it's getting lost on refresh. And a session implemetation should take into consideration that a user could have multiple tabs open...
Maybe we could add an URL parameter containing a hash pointing to a session variable with the navigation state. But, then, each navigation click would trigger a browser history entry, which I consider suboptimal.
If this is stored in the session and a user's session expires due to inactivity, I presume the navigation information would be lost? I think ideally, the user would still be able to return to their previous location even if they are inactive for an extended amount of time.
@JM: Just a heads-up, the hash part of the url is already used for the microhistory.
Also, the current state of the navigation is generated in the PMA_reloadNavigation function. We could split that function into 2 parts, one that generates the state of the tree and another that performs the ajax request to refresh it.
This would allow us to save the HTTP parameters that would be sent in the ajax request. After the page reload, we could just send an ajax request with those parameters using the second function.
It's not spectacular, but I believe that it would work. But then, again, the issue seems to be with where to save the data, right?
PMA_reloadNavigation could be split like this: https://github.com/roccivic/phpmyadmin/commit/d159bde834a2c2883bf232a38a8008a27a8c2702
I'm interested in fixing this bug as part of "User interface enhancements" in GSOC 2014. Can we use local-storage to store the state of the database tree ? We can use store.js(https://github.com/marcuswestin/store.js) or PersistJS(http://pablotron.org/?cid=1557) to support cross-browser. Can you please give your opinions about my solution ? Thank you
I checked this particular issue. For me navigation panel state for the current database doesn't get loss on reload. But if there are multiple databases expanded in the navigation panel, their states get lost. Is that what this issue is ? Please see my above comment also.
Perhaps Michael can comment on whether this is still present.
If I remember correctly, the reason the proper page is displayed again after an expired session is because the URL contains what we need; the session would have been removed and so we can't store this there.
We already use local storage as part of the User Preference feature (which uses the phpMyAdmin Configuration Storage database if present, but falls back to local storage if not). The best implementation of this would be to first look at what means is used for the user preferences and re-use some of those library functions if possible.
I think this issue is not there anymore. Did you try to reproduce it ?
I can you please confirm this? Also see my above comments. I really value your thoughts on this. I need to describe this my gsoc proposal
I think this is still happening:
I'd expect navigation tree to be same (same leafs expanded), but currently it resets to default state for current main frame.
Are you referring to the expansion of tables,columns,indexes ? Yes they get lost after reloading. I was only referring to the expansion of database. Expansion of database doesn't get lost, only it's sub elements' expansions get lost.
Expansion of database gets lost as well if you only expand it, but not select it.
Ahh yes. Got that. So what do you think about my ideas to save the state ?
2. PMA Configuration Storage
I think local storage is best choice here. Also remember that user might have more tabs open with phpMyAdmin, each having different state.
In that case we have to use Session Storage
In Session Storage
1. Values persist only as long as the window or tab in which they stored.
2. Values are only visible within the window or tab that created them.
But it only supports It supported by FF3.5+, Chrome4+, Safari4+, Opera10.5+, and IE8+. Would that be a problem ?
But I guess since it's supported by many browsers and the feature that is to be implemented is not a critical one, it's okay to Session Storage.
Let me know your thoughts
Sounds good enough.
Related to this: https://sourceforge.net/p/phpmyadmin/bugs/4439/
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.