Skip to content

Feature/tiptap#17

Merged
akshad-exe merged 14 commits into
mainfrom
feature/tiptap
Feb 9, 2026
Merged

Feature/tiptap#17
akshad-exe merged 14 commits into
mainfrom
feature/tiptap

Conversation

@akshad-exe

Copy link
Copy Markdown
Collaborator

No description provided.

- Implemented `useResizeOverlay` for handling table selection resizing.
- Created `TableSortRowColumnButton` and `useTableSortRowColumn` for sorting table rows and columns.
- Added `TableTriggerButton` with a grid selector for inserting tables.
- Introduced `TableGridSelector` for visual table dimension selection.
- Enhanced styling for table grid and buttons.
- Added utility functions for table insertion and sorting checks.
…tions and types for enhanced editor suggestions
Copilot AI review requested due to automatic review settings February 9, 2026 02:16
@akshad-exe

Copy link
Copy Markdown
Collaborator Author

@copilot delete the table-node and all its file from this pr this solves the merge conflits

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@akshad-exe I've opened a new pull request, #18, to work on those changes. Once the pull request is ready, I'll request review from you.

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 set of new TipTap UI utilities and editor extensions (suggestion menu + floating element), and substantially expands table and image editing capabilities (table handles/menus/actions, table styling, resizable image node view). It also updates the existing slash menu implementation and its TipTap suggestion integration.

Changes:

  • Refactor SlashMenu keyboard handling and scrolling behavior; integrate with TipTap slash suggestion.
  • Add reusable TipTap UI utilities (SuggestionMenu, FloatingElement) to standardize floating menus/toolbars.
  • Add a comprehensive table UI/actions suite (handles, menus, add/delete/duplicate/move/sort/fit-to-width, overlay resize loop) and a resizable image node implementation + new editor state/alignment/list-normalization extensions.

Reviewed changes

Copilot reviewed 89 out of 89 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
editor/ui/SlashMenu.tsx Refactors slash menu focus/keyboard behavior and scrolling + styling tweaks.
editor/extensions/slash-suggestion.tsx Updates TipTap slash suggestion key handling and menu lifecycle flags.
editor/components/tiptap-ui-utils/suggestion-menu/suggestion-menu.tsx New generic TipTap suggestion menu component with Floating UI + keyboard nav.
editor/components/tiptap-ui-utils/suggestion-menu/suggestion-menu-utils.ts Adds suggestion helper utilities (start position, filtering/sorting).
editor/components/tiptap-ui-utils/suggestion-menu/suggestion-menu-types.ts Adds shared types for suggestion menu items/props.
editor/components/tiptap-ui-utils/suggestion-menu/index.tsx Barrel exports for suggestion-menu utilities.
editor/components/tiptap-ui-utils/floating-element/index.tsx Barrel exports for floating-element utilities.
editor/components/tiptap-ui-utils/floating-element/floating-element.tsx New Floating UI wrapper tied to TipTap selection and editor events.
editor/components/tiptap-ui-utils/floating-element/floating-element-utils.ts Adds helper to detect whether a click/target is within the editor.
editor/components/tiptap-node/table-node/ui/table-trigger-button/use-table-trigger.ts New hook for table insertion trigger button behavior.
editor/components/tiptap-node/table-node/ui/table-trigger-button/table-trigger-button.tsx New table insert trigger button with popover + grid selector UI.
editor/components/tiptap-node/table-node/ui/table-trigger-button/table-grid-selector.tsx New table size grid selector component.
editor/components/tiptap-node/table-node/ui/table-trigger-button/table-grid-selector.scss Styles for the table grid selector UI.
editor/components/tiptap-node/table-node/ui/table-trigger-button/index.tsx Barrel exports for table trigger button components/hooks.
editor/components/tiptap-node/table-node/ui/table-sort-row-column-button/table-sort-row-column-button.tsx New button wrapper for row/column sort action.
editor/components/tiptap-node/table-node/ui/table-sort-row-column-button/index.tsx Barrel exports for sort row/column button.
editor/components/tiptap-node/table-node/ui/table-selection-overlay/use-resize-overlay.ts New hook to sync overlay during column resize via rAF loop.
editor/components/tiptap-node/table-node/ui/table-selection-overlay/index.tsx Barrel export for table selection overlay.
editor/components/tiptap-node/table-node/ui/table-move-row-column-button/table-move-row-column-button.tsx New button wrapper for moving rows/columns.
editor/components/tiptap-node/table-node/ui/table-move-row-column-button/index.tsx Barrel exports for move row/column button.
editor/components/tiptap-node/table-node/ui/table-merge-split-cell-button/use-table-merge-split-cell.ts New hook for merge/split cell actions.
editor/components/tiptap-node/table-node/ui/table-merge-split-cell-button/table-merge-split-cell-button.tsx New button wrapper for merge/split cell actions.
editor/components/tiptap-node/table-node/ui/table-merge-split-cell-button/index.tsx Barrel exports for merge/split cell UI.
editor/components/tiptap-node/table-node/ui/table-header-row-column-button/use-table-header-row-column.ts New hook for header row/column toggle behavior.
editor/components/tiptap-node/table-node/ui/table-header-row-column-button/table-header-row-column-button.tsx New button wrapper for toggling header row/column.
editor/components/tiptap-node/table-node/ui/table-header-row-column-button/index.tsx Barrel exports for header row/column UI.
editor/components/tiptap-node/table-node/ui/table-handle/use-table-handle-positioning.ts New handle positioning hook using Floating UI + virtual rects.
editor/components/tiptap-node/table-node/ui/table-handle/table-handle.tsx New main table handle renderer integrating state + handle menus.
editor/components/tiptap-node/table-node/ui/table-handle/index.tsx Barrel exports for table handle UI.
editor/components/tiptap-node/table-node/ui/table-handle-menu/table-handle-menu.scss Styles for handle menu button states (open/dragging, row/column).
editor/components/tiptap-node/table-node/ui/table-handle-menu/index.tsx Barrel exports for table handle menu UI.
editor/components/tiptap-node/table-node/ui/table-fit-to-width-button/use-table-fit-to-width.ts New hook implementing “fit table to width” behavior.
editor/components/tiptap-node/table-node/ui/table-fit-to-width-button/table-fit-to-width-button.tsx New button wrapper for fit-to-width action.
editor/components/tiptap-node/table-node/ui/table-fit-to-width-button/index.tsx Barrel exports for fit-to-width UI.
editor/components/tiptap-node/table-node/ui/table-extend-row-column-button/use-table-extend-row-column.ts New positioning hook for extend row/column controls.
editor/components/tiptap-node/table-node/ui/table-extend-row-column-button/table-extend-row-column-button.tsx New drag-to-add/remove row/column controls.
editor/components/tiptap-node/table-node/ui/table-extend-row-column-button/table-extend-row-column-button.scss Styles for extend row/column controls.
editor/components/tiptap-node/table-node/ui/table-extend-row-column-button/index.tsx Barrel exports for extend row/column UI.
editor/components/tiptap-node/table-node/ui/table-duplicate-row-column-button/use-table-duplicate-row-column.ts New hook to duplicate a row/column including cell content.
editor/components/tiptap-node/table-node/ui/table-duplicate-row-column-button/table-duplicate-row-column-button.tsx New button wrapper for duplicate row/column.
editor/components/tiptap-node/table-node/ui/table-duplicate-row-column-button/index.tsx Barrel exports for duplicate row/column UI.
editor/components/tiptap-node/table-node/ui/table-delete-row-column-button/use-table-delete-row-column.ts New hook for deleting a row/column.
editor/components/tiptap-node/table-node/ui/table-delete-row-column-button/table-delete-row-column-button.tsx New button wrapper for delete row/column.
editor/components/tiptap-node/table-node/ui/table-delete-row-column-button/index.tsx Barrel exports for delete row/column UI.
editor/components/tiptap-node/table-node/ui/table-clear-row-column-content-button/table-clear-row-column-content-button.tsx New button wrapper to clear row/column content.
editor/components/tiptap-node/table-node/ui/table-clear-row-column-content-button/index.tsx Barrel exports for clear content UI.
editor/components/tiptap-node/table-node/ui/table-cell-handle-menu/table-cell-handle-menu.tsx New cell handle menu with merge/split/clear + color/alignment menus.
editor/components/tiptap-node/table-node/ui/table-cell-handle-menu/table-cell-handle-menu.scss Styles for the expandable cell handle menu button.
editor/components/tiptap-node/table-node/ui/table-cell-handle-menu/index.tsx Barrel exports for table cell handle menu.
editor/components/tiptap-node/table-node/ui/table-alignment-menu/table-alignment-menu.tsx New nested alignment menu for table cells/rows/columns.
editor/components/tiptap-node/table-node/ui/table-alignment-menu/index.tsx Barrel exports for alignment menu.
editor/components/tiptap-node/table-node/ui/table-align-cell-button/table-align-cell-button.tsx New button wrapper for aligning table cells.
editor/components/tiptap-node/table-node/ui/table-align-cell-button/index.tsx Barrel exports for align cell UI.
editor/components/tiptap-node/table-node/ui/table-add-row-column-button/use-table-add-row-column.ts New hook for inserting rows/columns (before/after, left/right).
editor/components/tiptap-node/table-node/ui/table-add-row-column-button/table-add-row-column-button.tsx New button wrapper for add row/column actions.
editor/components/tiptap-node/table-node/ui/table-add-row-column-button/index.tsx Barrel exports for add row/column UI.
editor/components/tiptap-node/table-node/table-trigger-button.scss Removes legacy table trigger button styles (replaced by new UI).
editor/components/tiptap-node/table-node/table-selection-overlay.scss Removes legacy overlay styles (replaced by new approach/styles).
editor/components/tiptap-node/table-node/table-node.scss Removes legacy table node styles (replaced by new styles).
editor/components/tiptap-node/table-node/table-handle.scss Removes legacy table handle styles (replaced by new styles).
editor/components/tiptap-node/table-node/table-extend-row-column-button.scss Removes legacy extend button styles (replaced by new styles).
editor/components/tiptap-node/table-node/table-cell-handle-menu.scss Removes legacy cell handle menu styles (replaced by new styles).
editor/components/tiptap-node/table-node/styles/table-node.scss Adds new table styling and alignment/resize/dropcursor styles.
editor/components/tiptap-node/table-node/styles/prosemirror-table.scss Adds ProseMirror table base styles.
editor/components/tiptap-node/table-node/hooks/use-table-handle-state.ts Adds hook to subscribe to table handle plugin state events.
editor/components/tiptap-node/table-node/extensions/table-node-extension.ts Adds extended table node view and table kit configuration.
editor/components/tiptap-node/table-node/extensions/table-handle/table-handle.ts Adds TipTap extension for table handle plugin + commands.
editor/components/tiptap-node/table-node/extensions/table-handle/index.ts Barrel exports for table handle extension.
editor/components/tiptap-node/table-node/extensions/table-handle/helpers/create-image.ts Adds helper to create styled drag images for row/column dragging.
editor/components/tiptap-node/table-node/TableTriggerButton.tsx Removes legacy table trigger button component.
editor/components/tiptap-node/table-node/TableSelectionOverlay.tsx Removes legacy table selection overlay component.
editor/components/tiptap-node/table-node/TableHandle.tsx Removes legacy table handle component.
editor/components/tiptap-node/table-node/TableExtendRowColumnButtons.tsx Removes legacy extend buttons component.
editor/components/tiptap-node/table-node/TableCellHandleMenu.tsx Removes legacy cell handle menu component.
editor/components/tiptap-node/image-node/image-node-view.tsx Adds resizable image node view with optional caption handling.
editor/components/tiptap-node/image-node/image-node-view.scss Styles for resizable image node view + handles + caption placeholder.
editor/components/tiptap-node/image-node/image-node-floating.tsx Adds floating toolbar controls for selected image nodes.
editor/components/tiptap-node/image-node/image-node-extension.ts Adds custom Image extension (caption support + Mod-A behavior + node view).
editor/components/tiptap-extension/ui-state-extension.ts Adds UI state storage/commands extension for editor UI features.
editor/components/tiptap-extension/node-alignment-extension.ts Adds generic node alignment commands + global attributes.
editor/components/tiptap-extension/list-normalization-extension.ts Adds list normalization backspace behavior to auto-join adjacent lists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread editor/extensions/slash-suggestion.tsx
Comment thread editor/components/tiptap-extension/ui-state-extension.ts
Comment thread editor/ui/SlashMenu.tsx
Comment on lines +97 to +106
if (e.key === 'ArrowDown') {
e.preventDefault();
setSelectedIndex((prev) => (prev + 1) % filteredItems.length);
return
}

if (e.key === 'ArrowUp') {
e.preventDefault();
setSelectedIndex((prev) => (prev - 1 + filteredItems.length) % filteredItems.length);
return

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

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

Arrow key navigation uses modulo with filteredItems.length. When the query filters to 0 items, (prev + 1) % 0 yields NaN, which will poison selectedIndex and break further navigation/selection. Guard for filteredItems.length === 0 before updating index (and before handling Enter).

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Comment thread editor/ui/SlashMenu.tsx
Comment thread editor/ui/SlashMenu.tsx
Comment thread editor/ui/SlashMenu.tsx
if (!tableHandleView) return null

if (
tableHandleView === undefined ||

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

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

Variable 'tableHandleView' is of type object, but it is compared to 'undefined' of type undefined.

Suggested change
tableHandleView === undefined ||

Copilot uses AI. Check for mistakes.

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@akshad-exe I've opened a new pull request, #19, to work on those changes. Once the pull request is ready, I'll request review from you.

@akshad-exe

Copy link
Copy Markdown
Collaborator Author

@copilot give me a small pr description for this pr

Copilot AI commented Feb 9, 2026

Copy link
Copy Markdown
Contributor

@akshad-exe I've opened a new pull request, #20, to work on those changes. Once the pull request is ready, I'll request review from you.

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.

3 participants