#1426 (ok 4.3) Navigation state lost on reload

GSOC 2014 (25)

When reloading the page, navigation panel state is lost. I believe it would be more expected behavior to remember navigation state and restore it.


1 2 > >> (Page 1 of 2)
  • Ann + J.M.

    Ann + J.M. - 2013-05-12

    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?

  • Rouslan Placella

    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...

  • Ann + J.M.

    Ann + J.M. - 2013-05-12

    I discourage embedding the navigation panel state in the URL hash, though. We should store it in the session, shouldn't we?

  • Ann + J.M.

    Ann + J.M. - 2013-05-12

    And: Do we need to allow users to turn off the navigation state restore?

  • Marc Delisle

    Marc Delisle - 2013-05-12

    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.

  • Rouslan Placella

    @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...

  • Ann + J.M.

    Ann + J.M. - 2013-05-13

    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.

  • Isaac Bennetch

    Isaac Bennetch - 2013-06-14

    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.

  • Rouslan Placella

    @JM: Just a heads-up, the hash part of the url is already used for the microhistory.

  • Rouslan Placella

    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?

  • Marc Delisle

    Marc Delisle - 2013-12-05
    • labels: --> GSOC 2014
    • assigned_to: Marc Delisle
  • Marc Delisle

    Marc Delisle - 2014-01-24
    • assigned_to: Marc Delisle --> Isaac Bennetch
    • Group: Needs_decision --> Next_release
  • Viduranga Wijesooriya

    Hi ,
    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

  • Viduranga Wijesooriya

    Hi Marc,
    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.
    Thank you

  • Isaac Bennetch

    Isaac Bennetch - 2014-03-07

    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.

  • Viduranga Wijesooriya

    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

    Thank you

  • Michal Čihař

    Michal Čihař - 2014-03-12

    I think this is still happening:

    1. Open phpMyAdmin.
    2. Expand something in the navigation tree.
    3. Reload the page in the browser.

    I'd expect navigation tree to be same (same leafs expanded), but currently it resets to default state for current main frame.

    Last edit: Michal Čihař 2014-03-12
  • Viduranga Wijesooriya

    Hi Michal,
    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.

    I think the reason PMA manages to expand the database after reload is because url contains the database name. But I don't think its convenient to add table names to the url too. We need to store them elsewhere. Can we use cookies or local-storage ?

  • Michal Čihař

    Michal Čihař - 2014-03-13

    Expansion of database gets lost as well if you only expand it, but not select it.

  • Viduranga Wijesooriya

    Ahh yes. Got that. So what do you think about my ideas to save the state ?
    1. local-storage
    2. PMA Configuration Storage
    3. Cookies

  • Michal Čihař

    Michal Čihař - 2014-03-14

    I think local storage is best choice here. Also remember that user might have more tabs open with phpMyAdmin, each having different state.

  • Viduranga Wijesooriya

    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

  • Michal Čihař

    Michal Čihař - 2014-03-18

    Sounds good enough.

1 2 > >> (Page 1 of 2)

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks