You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: floating add-comment button anchored to the selection (#95) (#438)
* feat: floating add-comment button anchored to the selection (#95)
Add a small floating 'add comment' button that appears next to the
selected text and opens the new-comment form, so users don't have to go
to the toolbar.
It's positioned inline (in #editorcontainerbox space, reusing the
new-comment popup's getXYOffsetOfRep) and clamped on-screen with the same
idea as the #192 mobile fix, so it behaves the same on desktop and narrow
/ mobile viewports — it's anchored to the text rather than the sidebar
(which is hidden below 900px). It tracks the selection via aceEditEvent,
hides when nothing is selected, on read-only pads, and while the
new-comment form is already open. mousedown.preventDefault preserves the
selection so the form still sees it.
Pure plugin change — works on the latest release (2.7.3) and develop
without a core update. Adds a Playwright test covering appear-on-select,
on-screen clamp, open-the-form, and hide-after.
Closes#95
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat: make floating comment button admin-disableable (#95)
Gate the floating add-comment button behind
ep_comments_page.floatingCommentButton (default true) so admins can turn
it off without code changes. Documented in the README.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments