Skip to content

fix: improve Docs table menus and comment interactions - #7871

Merged
DR-Univer merged 2 commits into
devfrom
feat/docs-ui-menus-and-comments
Oct 14, 2026
Merged

DR-Univer merged 2 commits into
devfrom
feat/docs-ui-menus-and-comments

Conversation

@DR-Univer

Copy link
Copy Markdown
Member

Keep the whole-table menu accessible while a Docs table is focused, and let users select comment text and open saved hyperlinks.

  • Give the focused table menu an independent target and lifetime from the paragraph hover menu. Close its open panel on Escape, scrolling, or outside interactions while retaining the focused trigger, and release listeners and popup resources on disposal.
  • Preserve the trailing paragraph when dragging a whole table at the end of a document, so the resulting document remains renderable and undoable.
  • Use a lighter theme-aware table-menu border and render paragraph placeholders at 50% opacity without affecting subsequent canvas drawing.
  • Render safe comment hyperlinks as native links, preserve hyperlink metadata through editor conversions, and keep comment-card navigation from interrupting native text selection.
  • Export the package-owned ParagraphSettingMenuFactory for the companion Pro table-context integration. Existing menu callers retain their default behavior; no model schema changes or breaking changes are introduced.

No linked issue; these changes address user-reported Docs and comment interaction problems.

Companion PR and merge order

Companion Pro PR: https://github.com/dream-num/univer-pro/pull/5795

Merge this OSS PR first. Then let the repository workflow synchronize the Univer submodule reference into Pro before making the Pro PR ready. The Pro PR does not commit the submodule gitlink manually.

Validation

  • Docs UI: 1,184 tests passed across 107 files.
  • Thread Comment UI: 62 tests passed across 10 files.
  • Both packages passed tsc --noEmit and their package bundle builds (univer-cli build).
  • ESLint checked all ten changed files: zero errors, 19 warnings. Normal commit hooks also passed.
  • The shared Pro convention check passed with zero errors and 430 warnings.
  • Both repositories passed diff checks and have no tracked AI-review fingerprints.
  • Full-monorepo tests and a fresh browser check of these delivery branches were not run.

For manual verification, focus a table after preceding text, open its T menu, and dismiss the panel with Escape or an outside click. Check that the trigger remains available while the table stays focused, that a hovered paragraph does not replace its target, and that permissions and document disposal remove it. Drag a final table and undo/redo the move. In a comment, select text and activate a saved hyperlink; selection should remain intact and the link should open without navigating the document to the comment.

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 56.52174% with 60 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.33%. Comparing base (f75d89e) to head (46c1dbc).

Files with missing lines Patch % Lines
packages/docs-ui/src/views/ParagraphMenu.tsx 0.00% 50 Missing ⚠️
...docs-ui/src/services/doc-paragraph-menu.service.ts 84.12% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #7871      +/-   ##
==========================================
- Coverage   81.33%   81.33%   -0.01%     
==========================================
  Files        3088     3088              
  Lines      199924   200031     +107     
  Branches    51894    51608     -286     
==========================================
+ Hits       162602   162689      +87     
- Misses      37262    37282      +20     
  Partials       60       60              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DR-Univer
DR-Univer merged commit 37238bf into dev Oct 14, 2026
14 checks passed
@DR-Univer
DR-Univer deleted the feat/docs-ui-menus-and-comments branch October 14, 2026 13:18
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.

2 participants