Skip to content

Feat/multi tab node - #2381

Merged
Philipinho merged 16 commits into
mainfrom
feat/multi-tab-node
Oct 10, 2026
Merged

Philipinho merged 16 commits into
mainfrom
feat/multi-tab-node

Conversation

@salihudickson

@salihudickson salihudickson commented Aug 9, 2026 •

Copy link
Copy Markdown
Collaborator

@CLAassistant

CLAassistant commented Aug 9, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@salihudickson
salihudickson marked this pull request as draft August 9, 2026 19:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new multi-tab (“Tabs”) content block to the Docmost editor stack, including ProseMirror/Tiptap schema nodes, a React node-view UI, Markdown import/export support, and related drag/drop handling.

Changes:

  • Adds tabs/tab/tabLabel/tabPanel Tiptap nodes and commands (insert/move/delete/update label, set active tab).
  • Adds Markdown parsing/rendering for tab blocks (=== "Label"), plus HTML→Markdown turndown support.
  • Integrates Tabs into client UI (node-view + bubble menu + slash command) and registers extensions in client/server.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/editor-ext/src/lib/tabs/tabs.ts Adds the tabs node, commands, input rule, and keyboard behavior.
packages/editor-ext/src/lib/tabs/tab.ts Defines the tab node and its HTML attributes (id/active).
packages/editor-ext/src/lib/tabs/tab-panel.ts Defines tabPanel container node for tab content.
packages/editor-ext/src/lib/tabs/tab-label.ts Defines tabLabel node to store the label content.
packages/editor-ext/src/lib/tabs/index.ts Exports the new Tabs-related nodes/types.
packages/editor-ext/src/lib/markdown/utils/turndown.utils.ts Adds HTML→Markdown turndown rule for tabs blocks.
packages/editor-ext/src/lib/markdown/utils/tabs.marked.ts Adds Marked extension to parse/render tabbed Markdown blocks.
packages/editor-ext/src/lib/markdown/utils/marked.utils.ts Registers the new tabs Marked extension.
packages/editor-ext/src/index.ts Re-exports tabs from the editor-ext package entrypoint.
apps/server/src/collaboration/collaboration.util.ts Registers the tabs nodes in the server’s collaboration schema/extensions.
apps/client/src/features/editor/styles/tabs.css Adds editor CSS for tabs-related DOM behavior.
apps/client/src/features/editor/styles/index.css Imports the new tabs stylesheet.
apps/client/src/features/editor/page-editor.tsx Adds the Tabs bubble menu to the editor toolbar menus.
apps/client/src/features/editor/extensions/extensions.ts Registers tabs nodes and configures the Tabs node-view in the client.
apps/client/src/features/editor/extensions/drag-handle.ts Enhances drag-handle behavior for tab panel interactions.
apps/client/src/features/editor/components/tabs/tabs-view.tsx Adds the React node-view for Tabs (Mantine-based UI).
apps/client/src/features/editor/components/tabs/tabs-menu.tsx Adds the bubble menu for inserting/moving/deleting tabs.
apps/client/src/features/editor/components/slash-menu/menu-items.ts Adds a slash-menu command to insert a Tabs block.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

salihudickson and others added 7 commits August 9, 2026 20:46
- Keep the active tab in per-viewer plugin state, not in the document
- Update hidden-tab decorations incrementally; diff whole-doc remote updates
- Replace the tabs bubble menu with an in-block toolbar and per-tab actions menu
- Add rename, duplicate, move left/right and delete tab actions
- Rename a tab by double-clicking it; add tabs from a strip button
- Hide inactive tabs with hidden="until-found" and open them on beforematch
- Open the containing tab for search, TOCs, comment links and hash scrolls
- Disallow tabs inside tabs: hide slash item, flatten pastes, refuse drops
- Stop content copied or dragged out of a tab from creating a new tabs block
- Keep the selection anchor and land at the panel end when arrowing into tabs
- Let Enter add a line at the end of a tab instead of leaving the block
- Fix drag handle moves of custom nodes inside tab panels
- Keep editor focus on toolbar clicks so copy and delete work
- Export tabs to Markdown as level 4 headings; drop the tabs Markdown syntax
- Share node copy-to-clipboard between the columns and tabs toolbars
- Raise inactive tab label contrast
- Add a hidden data-drag-preview chip with the tab labels to the tabs view
- The global drag handle uses it instead of snapshotting the block and its neighbours
- Style the chip outside the editor scope since the handle clones it into the body
@Philipinho
Philipinho marked this pull request as ready for review October 10, 2026 21:57
- Keep selections out of hidden tabs and map chained tab updates
- Drive the tab strip from decorations instead of per-keystroke lookups
- Repair empty and repeated tab ids
@Philipinho
Philipinho merged commit c08d1d3 into main Oct 10, 2026
6 checks passed
@salihudickson
salihudickson deleted the feat/multi-tab-node branch October 24, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants