kitodo/kitodo-production

Allow to move pages from the Gallery to the Structure tree

Opened this issue · 3 comments

Is your feature request related to a problem? Please describe.
In addition to the ideas suggested in #5926, we should better support moving pages to all the elements of the structure tree. It can be quite hard if you have to move pages from one end to the other end of the structure tree.

Describe the solution you'd like
We should enable moving pages from the gallery to the structure tree. This would allow to scroll the structure tree and the gallery to different positions of the document and in this way making drag and drop to structural elements at the other end of the tree easier.

E.g. Moving the last element in the gallery to the structural element at the beginning of the tree.
image
This should also be possible for multiple pages.

I remember that we already tried to implement this feature during the initial development of Kitodo.Production 3 a few years ago. There were however several problems that prevented us from following through with this idea in the end.

Conceptionally, it can be ambiguous when we also allow moving structure elements between structure tree and gallery, in addition to media. What should happen, for example, when moving a selected chapter from the tree to "itself" in the gallery? To prevent this, we will need to distinguish between drag'n'drop of structures within the tree (allowed) and drag'n'drop between structure tree and gallery (forbidden).

Once multiselect is enabled in the structure tree (see #3629) we will also have to prevent "mixed" selection of pages and structure in the tree, because otherwise drag'n'drop just within the tree becomes ambiguous as well. What should happen when the user selects a chapter and a page contained in the chapter with multiselect and then moves both to a different structure, for example a "section"? Should the parent-child-relation between the chapter and the page remain or should both end up as siblings within the section, because they were both dragged to the same drop position? (This question, however, is less a problem for the functionality propsed in this issue and more for multiselect in the structure tree in general)

Technically, CSS rules like overflow: scroll (required in the gallery) prevent dragging selected pages outside the containing parent element (the gallery stripe or gallery) to the structure tree, I think. @oliver-stoehr pointed this out and is better suited to elaborate on this than me, though.

Although the metadata bundle package #5935 has already been voted for by the community to be implemented in context of the development fund this year, I would propose to make this particular part of that bundle optional, because I think this ticket alone might prove much more difficult than the other tickets and could significantly impact the implementation costs.

@kitodo/kitodo-community-board