Repository navigation
Select multiple sections to extract into fragment - #2521
Merged
Merged
Conversation
Give feedback that clicking adds a content element to the selection before the click happens. The preview usually does not have keyboard focus while the pointer is above it, so the modifier state is also read from mouse moves.
Fragments of sections could only be created from all sections of a chapter. Let the editor pass an arbitrary set of sections, which are copied in document order into a new fragment chapter of the shared library.
Offer an item in the section menu that copies the section into a new fragment of the shared library. The item takes a list of sections, so it can be reused once several sections can be selected. It shares dialog, states and error handling with the item that adds content elements to the shared fragments via a common base.
Let other views reuse the round check button of the files explorer including its Font Awesome icons and selection handling. Add ListSelection#isActive to tell whether check buttons need to be offered and skip events for calls of start and stop that change nothing.
The chapters of a newly shown storyline tab were not collapsed while the outline menu still offered finishing the reordering. Let TabsView trigger a change event and end reordering when the tab changes.
The outline now holds a section selection. Clicking a section thumbnail with the Ctrl or Cmd key held marks the section and thereby activates the selection. While it is active, section thumbnails show the check circles of the files explorer. The circle's button covers the whole thumbnail, so clicking anywhere on it marks or unmarks the section and scrolls the preview to it. Marked thumbnails shrink a little to reveal the selection color behind them. Drag handles and section menus are hidden and sections cannot be reordered meanwhile.
The outline menu offers selecting sections and, while the selection is active, ending it. During the selection, a bar between storyline tabs and chapters sticks to the top of the sidebar. It shows the number of marked sections and offers adding them to the shared fragments, styled like the selection bar of the files view. Adding the sections or ending the selection unmarks all sections and hides the check circles again. Selecting sections, reordering chapters and switching storyline tabs end each other.
The editor can now start a multi selection of content elements in selection mode. While it is active, plain clicks add content elements to or remove them from the selection, the copy cursor is shown over all content elements and the selection stays a multi selection even when only a single content element is left. Pressing Escape or a message from the editor ends the mode but keeps the selection. Clicking a section outside of content elements replaces the selection as before.
Selecting several content elements required knowing about clicking them with the Ctrl or Cmd key held. Offer an item in the actions menu of a content element that starts the selection mode in the preview instead. While it is active, the sidebar explains how to add content elements and offers a button to end the mode.
Selecting sections in the outline covers adding a whole chapter while also allowing to pick sections across chapters. Drop the chapter menu item together with the endpoint behind it.
Name the endpoint that inserts a sections fragment into a chapter section_fragment_insertions, next to section_fragment_extractions and the content_element_fragment_* endpoints. Rename FragmentLibrary#copy_fragment_to to copy_sections_to accordingly.
Style the banner shown while reordering chapters like the section selection banner: smaller padding, button on its own line at the right and with a compact height. Drop the important padding override of the button.
Move the selection of marked sections from the outline view to ScrolledEntry#markedSections. Other parts of the editor like the controller that talks to the preview can thereby access and change marks. Navigating away from the outline ends marking.
When the fragments feature is enabled, clicking sections with the Ctrl or Cmd key held extends the selection to a multi selection of type sectionSettings. Reducing it to a single section reverts to selecting the settings of that section. Multi selections of type section, which the outline will post, are carried over. Sections in either kind of multi selection are rendered with the section frame.
Post marked sections to the preview as multi selection of type section to render them with the section frame. Multi selections of section settings created in the preview mark the sections and show the outline. Selecting anything else in the preview ends marking without resetting the new selection of the preview. Remember the section last selected in the preview and include it when marking starts via a modifier click in the outline. Marking sections in the outline only scrolls the preview instead of selecting the section, which would replace the multi selection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.