Repository navigation
Feat/multi tab node - #2381
Merged
Merged
Feat/multi tab node#2381
Conversation
salihudickson
marked this pull request as draft
August 9, 2026 19:41
Contributor
There was a problem hiding this comment.
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/tabPanelTiptap 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.
- 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
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
approved these changes
Oct 10, 2026
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.
closes: https://github.com/docmost/issue-tracker/issues/1
Screenshot:
