unify / unify

Unify Project
http://www.unifyjs.com
Other
152 stars 16 forks source link

Navigation.register new permanent argument does not do what the doc says #117

Open dominikg opened 12 years ago

dominikg commented 12 years ago

and even if it did, i'd question it's use.

What it actually does: If a viewmanager has been registered with the permanent argument set to true, a change of this viewmanagers path results in persisting the whole navigationpath into localstorage.

If a viewmanager has been registered without the permanent argument (or false as argument value), this viewmanagers path is still part of the game and it's path gets persisted to localstorage once the path of another viewmanager that has been registered with permanent=true changes.

What it should do to fullfill it's intended use: instead of building the path over all viewmanagers in __onSubPathChange, it sould only take the permanent ones into consideration

Why i think it is a bad idea to do this: If you don't want the ViewManager to be managed by Navigation, don't register it in the first place, it works. You just have to manage it from your Application (e.g. show it).

What is the purpose of only persisting a part of the navigation path? This may cause the application to change if the user returns to it without a path in the url and persisting the path was originally done to achieve just that, return to the last used application state.