Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganization of sub-themes and it's map layers by dragging? #285

Open
Sanni975 opened this issue Nov 8, 2022 · 4 comments
Open

Reorganization of sub-themes and it's map layers by dragging? #285

Sanni975 opened this issue Nov 8, 2022 · 4 comments

Comments

@Sanni975
Copy link

Sanni975 commented Nov 8, 2022

Hi, I'm referring to previous issue (#284), where our user encountered a problem regarding Tampere city Oskari mapservice:
Hi, our user in Tampere city encountered a bug when renaming sub-themes in Oskari mapservice. The issue was as follows: When renaming subthemes, the newly updated subthemes jump as a main theme. The user managed to fix the problem by creating entirely new sub-themes under correct main theme and transferred all of the maplayers back to correct subtheme.
I tested this in demo Oskari and there was no problem when renaming sub-themes, which is excellent.

However, the user told that back in the days it was possible to move the sub-themes and it's layers under different category by dragging. I tested in demo Oskari, but there was no possibility to move the sub-themes by dragging. Maybe there was a good reason why this function was disabled? Would this function be something that could be updated back to Oskari, if it doesn't affect negatively to it's other properties?

@ZakarFin
Copy link
Member

ZakarFin commented Nov 8, 2022

The dragging functionality was part of the older (now removed) layer listing implementation. The current one doesn't have the dragging functionality as it wasn't trivial to implement when the implementation was migrated from jQuery to React.js. There was also an unsolved issue: since a layer can be listed under multiple groups, what should happen if the user moves a layer to a group that already has that same layer. Should it be listed there twice or should it disappear? If duplicated we can't use the layer id itself to reference a layer for technical purposes when doing the listing so it involves some under-the-hood refactoring as well. And it would be even more complex displaying that duplicated layer on a single group on the layer edit form. Maybe dropping a layer to a group that already has the same layer should be disabled on the dragging implementation instead?

There has been some talks about having the group change by dragging implemented in the "edit group" dialog or at least a dropdown menu to select a new parent for a group. Obviously it should restrict moving a group under a subgroup of itself etc. For layers I think moving a single layer from a list of tens or hundreds of other layers under another group is easier to do by opening the layer in edit mode and selecting another group for it than dragging it. But I'm not opposed to having some drag-n-drop functionality added if someone is up for implementing it properly.

@Sanni975
Copy link
Author

Thank you for explaining this in detail. The dropdown menu to select a new parent for a group sounds more stable option to control the reorganization of layer groups. When dragging objects, mistakes can occur more easily and cause more headache for users.

The double layers inside the same group is a very good question. At this moment in Oskari mapservice, we don't see usage for duplicate layers within the same group if the function, style and attributes of the layers are identical. However, if the system idenfies that there is identical layer in the destination group, it would be beneficial to get a warning with information, before the user takes action. This would give the user possibility to check the layer and maybe delete the identical layer before any reorganization takes place.

When it comes to the double layers,I think this divides users based on their needs. If listed twice, there might be feedback. If the duplicate layer would just disappear, there might also be feedback. I will have to survey opinions to this issue from our team and get back to this case when there is more information from the users.

@ZakarFin
Copy link
Member

ZakarFin commented Nov 10, 2022

When it comes to the double layers,I think this divides users based on their needs. If listed twice, there might be feedback. If the duplicate layer would just disappear, there might also be feedback. I will have to survey opinions to this issue from our team and get back to this case when there is more information from the users.

I think the best option would be disabling the dragging of a layer to a group that already has that same exact layer (same id) as this would solve a lot of weird edge-cases both for implementation and for end-users. I thnink the question is more if dragging needs to be implemented at all? The layer edit form has the list of groups where user can deselect a group for the layer and select another, hence moving the layer from group to another.

@rekjuh
Copy link
Contributor

rekjuh commented Oct 28, 2024

@Sanni975 is this still something you wish the Oskari team would work on or have you find a workaround or another solution? We're moving all the issues to Oskari-documentation repo. If you wish to keep this open and get updates, please create a new issue here: https://github.com/oskariorg/oskari-documentation/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants