Skip to content

Element fragments - #2520

Merged
tf merged 8 commits into
codevise:masterfrom
tf:el-fragments
Oct 27, 2026
Merged

tf merged 8 commits into
codevise:masterfrom
tf:el-fragments

Conversation

@tf

@tf tf commented Oct 27, 2026

Copy link
Copy Markdown
Member

No description provided.

tf added 8 commits October 27, 2026 13:33
Selected content elements are copied into a single section of a
chapter of the shared fragment library that is marked with kind
contentElements. Backdrop content elements become regular content
elements since nothing would display them as backdrop of the fragment
section.

Move rewriting of file references out of SectionsCopy so that
ContentElementsCopy can reuse it.
Fragments read their kind from the fragment chapter. Chapters without
kind predate content elements fragments and contain sections. The
fragment library dialog only offers section fragments.
Offer an action in the multi selection menu and in the actions menu
of a single content element that asks for a name and copies the
content elements into the fragment library. The name dialog now
receives the prefilled title instead of reading it from a chapter.
Respond with type names and configurations of the content elements of
a fragment, with file references rewritten to files that are now used
in the entry. The editor inserts them like new content elements, so
text blocks can be split and merged with adjacent text blocks whose
file links already point to files of the entry. Rewriting only once
both sides refer to files of the same entry is what makes that merge
safe.
Prepare rendering fragment thumbnails in the insert content element
dialog.
With the fragments feature, the insert element dialog gets a tab bar
with content element types and shared fragments. The tab bar's border
is the only full width rule, so category names turn into small labels
without dividers. Libraries are loaded the first time the fragments
tab is shown.
Clicking a fragment prepares its content elements on the server and
inserts them via a batch like new content elements. That way a
fragment can split a text block and its outer text blocks merge with
adjacent text blocks. Fragments can not be inserted as backdrop.
Thumbnails in the insert element dialog take layout, appearance and
invert of the target section.
@tf tf added this to the v17.3 milestone Oct 27, 2026
@tf
tf merged commit 27d7a76 into codevise:master Oct 27, 2026
18 checks passed
@tf
tf deleted the el-fragments branch October 27, 2026 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant