You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this issue it is requested to provide an improvement of the UserSession plugin to:
keep separated different elements of the map state to make users able to managed them independently
extend the native support by capturing the Search Tool state in the UserSession
Current implementation
Currently only the following are natively supported the session:
map (including map position, layers, groups ...)
feature grid state (columns checked etc...)
All the other parts of the map are not saved.
Moreover when the session is cleared, the current functionality removes the overall session saved.
We have several entry points where the session is retrieved, saved and managed. We have also a separate workflow from map and context (that could be useful if we start to centralize).
The logic supports also an override system that is managed by other clients (e.g. georchestra). For backward compatibility, we need also to check this and properly document migration.
Requested change
The intention is to extend the elements persisted in the user session to include:
Search tool:
Search Services
Bookmarks
Layers/Groups with a sub tree listing the layers to keep in session. This includes:
Annotations (already managed trough a dedicated layer in TOC)
Measurements (only if converted to TOC layers)
Other layers (including backgrounds)
Map Position (camera orientation for 3D)
Catalog tool
Feature Grid State: colun sizes and selection.
Other: all the rest of the state will be managed together through this option in the UI. In particular this entry will have an entry for each element resgistered ih registerCustomSaveHandler . The known section that have to be implemeted are:
Toc configuration toc
Playback playback
Map Templates mapTemplates to be implemented register and retrival of data
User Plugins userPlugins to be implemented register and retrival of data.
Anything else. This to clean up all the rest of the object, not explicitly known.
In order to show the labels for the user session custom entries, assign a localized string for each one of the known ones. sections, referring by "name" of the section. E.g. "userSession.sections.custom." ( userSession.sections.custom.toc. or userSession.sections.custom.playback etc ...) . If the localizes string is not present, use the entry name (e.g. if an element is registered as coolPlugin name show it as coolPlugin. If this feature will be used more in the future, we will find a better way to localize it on registration, for instance.
When the user clicks on remove User Session button in Sidebar, a confirmation dialog will be displayed so that the user can choose what need to be cleared from the session. Something like the following (DRAFT!!!)
UX aspects to consider:
By default the Everything checkbox (and all the check boxes inside) is checked, to preserve the original behavior.
As soon as the user starts deselecting, the upper checkboxes will be deselected.
The UI should be able to manage cases where many layers are in the map and manage this accordingly with a proper scrollbar or other strategies (to review in the preliminary design phase)
Evaluate to have root sub-nodes for Annotations, Measurements and All other layers (to review in the preliminary design phase)
What kind of improvement you want to add? (check one with "x", remove the others)
Minor changes to existing features
Notes about Extensibility
With extensibility we intend what is implemented in the "Other" section of the proposal above.
In fact we take an opportunity to provide an review extensibility of user session (example).
Now the extensibility support for the user session allow to save something in the session, and not in the map, that makes things a little unpredictable and confusing. To simplify things we decide to port the existing know customization to user session in the map state, with the work mentioned about registerCustomSaveHandler.
In particular the existing known customizations are the ones in the (example) provided above. The use case of the example saves the checked UserPlugins and the mapTemplates loaded. Saving these 2 information in the map (like catalogs, or search services etc...) can be useful too, also for general users, so we decided to port them.
Then modify the logic to load the templates from the map, on MAP_CONFIG_LOADED) as the other plugins ,like toc, does aside of registering the save handler.
The same for user plugins (notice. the name of the plugin is naned "UserExtensions",
So in this case, no more special cases will be needed and customization in the side project can be removed at all, and replaced with the standard plugin.
I should avoid to extend the UserSession anymore, giving more priority to the possiblity to save things on the map. If customization will be needed, we can make this saving optional, but for the moment, there is not a real use case that matches this needing.
This is the ideal and long term solution. If we are able to support the save the user session state and the map templates state in the context of this work, it could be useful to add them to the list.
If not, we can open separated issues to implement the save of the state for the 2 plugins.
The implementation could be quite simple and reproducible using this sample.
Proposed Tasks
Recover the template solution linked
Propose a final design with the information above
Implement the effective functionality on the core (relying on toc, playback etc..., that already use the custom save handlers to implement).
UserPlugins customization to use registerCustomSaveHandler
Templates customization to use registerCustomSaveHandler.
Description
With this issue it is requested to provide an improvement of the UserSession plugin to:
Current implementation
Currently only the following are natively supported the session:
All the other parts of the map are not saved.
Moreover when the session is cleared, the current functionality removes the overall session saved.
We have several entry points where the session is retrieved, saved and managed. We have also a separate workflow from map and context (that could be useful if we start to centralize).
The logic supports also an override system that is managed by other clients (e.g. georchestra). For backward compatibility, we need also to check this and properly document migration.
Requested change
The intention is to extend the elements persisted in the user session to include:
registerCustomSaveHandler
. The known section that have to be implemeted are:toc
playback
mapTemplates
to be implemented register and retrival of datauserPlugins
to be implemented register and retrival of data.When the user clicks on remove User Session button in Sidebar, a confirmation dialog will be displayed so that the user can choose what need to be cleared from the session. Something like the following (DRAFT!!!)
UX aspects to consider:
What kind of improvement you want to add? (check one with "x", remove the others)
Notes about Extensibility
With extensibility we intend what is implemented in the "Other" section of the proposal above.
In fact we take an opportunity to provide an review extensibility of user session (example).
Now the extensibility support for the user session allow to save something in the session, and not in the map, that makes things a little unpredictable and confusing. To simplify things we decide to port the existing know customization to user session in the map state, with the work mentioned about
registerCustomSaveHandler
.In particular the existing known customizations are the ones in the (example) provided above. The use case of the example saves the checked UserPlugins and the mapTemplates loaded. Saving these 2 information in the map (like catalogs, or search services etc...) can be useful too, also for general users, so we decided to port them.
For instance, for map templates:
Then modify the logic to load the templates from the map, on MAP_CONFIG_LOADED) as the other plugins ,like toc, does aside of registering the save handler.
The same for user plugins (notice. the name of the plugin is naned "UserExtensions",
So in this case, no more special cases will be needed and customization in the side project can be removed at all, and replaced with the standard plugin.
I should avoid to extend the UserSession anymore, giving more priority to the possiblity to save things on the map. If customization will be needed, we can make this saving optional, but for the moment, there is not a real use case that matches this needing.
This is the ideal and long term solution. If we are able to support the save the user session state and the map templates state in the context of this work, it could be useful to add them to the list.
If not, we can open separated issues to implement the save of the state for the 2 plugins.
The implementation could be quite simple and reproducible using this sample.
Proposed Tasks
registerCustomSaveHandler
registerCustomSaveHandler
.Other useful information
See also https://github.com/geosolutions-it/support/issues/3372#issuecomment-2245637387
The text was updated successfully, but these errors were encountered: