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

Add new InsertionPosition for structural elements in metadata editor #3486

Closed
solth opened this issue Apr 20, 2020 · 5 comments · Fixed by #4365
Closed

Add new InsertionPosition for structural elements in metadata editor #3486

solth opened this issue Apr 20, 2020 · 5 comments · Fixed by #4365
Assignees
Labels

Comments

@solth
Copy link
Member

solth commented Apr 20, 2020

When creating new structural elements in the metadata editor from selected consecutive pages, an additional option should be added for adding the structural element at the position of the selected pages (e.g. the index of the first selected page in the parent structural element).

@matthias-ronge
Copy link
Collaborator

Yes and no. Actually there is no need to insert a new option, the selection has to be deleted. Seen in this way, #3601 is more precise. All other options make no sense:

Screenshot

Example: You have assigned pages 14-37 to a chapter structure.

📁 monograph
 +-(🖼️ pages 1..99)
 +- 📁 chapter
     +- 🖼️ pages 14..37

Now select pages 30-32 and select the new structure element from selected pages function to make a table (as a child of the chapter).

What would mean option 1: "As first sub-element of the current element"?

📁 monograph
 +-(🖼️ pages 1..99)
 +- 📁 chapter
     +- 📁 table
         +- 🖼️ pages 30..32
     +- 🖼️ pages 14..29, 33..37

Pages 30-32 should not appear before pages 14-29.

What would mean option 2: "As last sub-element of the current element"?

📁 monograph
 +-(🖼️ pages 1..99)
 +- 📁 chapter
     +- 🖼️ pages 14..29, 33..37
     +- 📁 table
         +- 🖼️ pages 30-32

Pages 30-32 should not appear after pages 33-37.

What would mean option 3: "As parent element of the current element"?

📁 monograph
 +-(🖼️ pages 1..99)
 +- 📁 table
     +- 🖼️ pages 30..32
     +- 📁 chapter
         +- 🖼️ pages 14..37

⚡ Child contains images not contained in parent.

@matthias-ronge
Copy link
Collaborator

Closed as duplicate to #3601

@solth
Copy link
Member Author

solth commented May 8, 2020

Since pages are re-numbered when reorderering them via drag'n'drop, it is very likely that the current numbering of pages at any given time is not necessarily final.

To take your first example: if pages 30-32 are added to a table that is the first child of the parent chapter, the pages will be re-labeled to 14-16 inside the table, and all following pages in the chapter will be re-labeled to 33-37.

We had many discussions about the re-labeling of pages on drag'n'drop manipulation, and it has been explicitely stated that resetting the ORDERLABEL attribute on drag'n'drop is one of the required consequences when assigning pages to structural elements.

Additionally, since selected pages in the gallery do not need to be consecutive, removing the current position-options when creating a new structural element would result in an ambigious position to insert the new element.

To stay with your example: if you select pages 30 and 32 (but not page 31) in the chapter and than create a new structural element from these selected pages, should it be inserted at the position where page 30 was or where page 32 was? For situations like this, the user has to select a specific position where to insert the new structural element.

@subhhwendt, @andre-hohmann, @sebastian-meyer and @oliver-stoehr : could you comment on this topic?

@solth solth reopened this May 8, 2020
@andre-hohmann
Copy link
Collaborator

As Kitodo is always more complicated as it seems and many decision lead to unforeseen options, i suggest:

  1. the options "as first sub-element of the current element", "as last sub-element of the current element" are maintained. Thus, the common approach to add structure elements still exist and e. g. chapters can be created according their logical order without complications regarding ORDER, ORDERLABEL or whatever will come. See: Remove position query when creating structure in existing structure #3601 (comment)
  2. an additional option to insert the element at the current position (first selected page of the element) is created. Then subsequently added elements can be created between existing elements. An option to select a specific image number seems to me currently quite complicated. In the worst case, the element has to me moved manually to the correct position.
  3. the option "as parent element of the current element" can be removed. I did not find a use case for it.

@matthias-ronge
Copy link
Collaborator

Related to #3476

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