Commit Graph

61 Commits

Author SHA1 Message Date
Tom Moor
23606dad1d Move image zooming back to unvendorized lib (#6980)
* Move image zooming back to unvendorized lib

* refactor

* perf: Avoid mounting zoom dialog until interacted

* Add captions to lightbox

* lightbox
2024-06-03 17:26:25 -07:00
Tom Moor
d51267b8bc JSON to client (#5553) 2024-05-24 05:29:00 -07:00
Tom Moor
1f50ce7d36 Highlight mentions of self in documents and comments 2024-04-13 22:15:01 -04:00
Tom Moor
65bbf0c455 fix: Mark editor content as unknown language to aid translation/screen readers 2024-04-12 07:53:45 -04:00
Tom Moor
fe4c2fb7d6 chore: Add eslint rule for no-shadow (#6658)
* chore: Add eslint rule for no-shadow

* fix
2024-03-09 13:04:27 -08:00
Tom Moor
193bde0bd5 fix: matchesNode error in destroyed editor transaction 2024-03-08 20:45:21 -05:00
Tom Moor
8fc5213f93 fix: Allow undo/redo handler when outside of editor focus.
closes #6533
2024-02-16 13:48:37 -05:00
Tom Moor
8d65b13b3d fix: FindAndReplace does not update to reflect changing between readOnly/editable 2023-12-05 21:38:54 -05:00
Tom Moor
6177d6f3cb fix: Comment should not appear in selection toolbar with view-only permissions. closes #6011 2023-11-16 20:36:34 -05:00
Tom Moor
df6d8c12cc Refactor Editor components to be injected by associated extension (#6093) 2023-10-31 18:55:55 -07:00
Tom Moor
d593976b4d Add a button to upload images into comments (#6092) 2023-10-29 17:42:49 -07:00
Tom Moor
6b13a32234 fix: Refactor hover previews to reduce false positives (#6091) 2023-10-29 15:31:12 -07:00
Tom Moor
ef76405bd6 Move toasts to sonner (#6053) 2023-10-22 14:30:24 -07:00
Tom Moor
6a74fdf6cf fix: Allow browser translation of documents in read-only, closes #5998 2023-10-12 23:33:57 -04:00
Tom Moor
8354a5bc37 fix: Use of view after destroyed, closes #5982 2023-10-10 19:00:12 -04:00
Tom Moor
eb71a8f933 fix: Various compounding memory leaks in editor (#5950) 2023-10-05 17:01:27 -07:00
Tom Moor
b691311f88 feat: Add find and replace interface (#5642) 2023-08-03 15:47:44 -07:00
Tom Moor
e0289aed40 chore: Enable recommended React eslint rules (#5600) 2023-07-24 18:23:54 -07:00
Tom Moor
1fd7f75929 tsc 2023-07-01 10:11:38 -04:00
Tom Moor
f214db0ab7 fix: Scroll to document header on page load 2023-07-01 09:17:37 -04:00
Tom Moor
aec190245b fix: No scroll to anchor if already exists 2023-06-30 19:07:36 -04:00
Tom Moor
89d5527d39 Handle promise linting (#5488) 2023-06-28 17:18:18 -07:00
Tom Moor
d319bb7d9a Allows commenting outside edit mode when seamless editing is disabled. (#5422) 2023-06-10 05:56:00 -07:00
Tom Moor
ba3a47d138 Cleanup observer 2023-06-01 11:03:45 +01:00
Tom Moor
5f4e942d31 stash 2023-06-01 10:25:44 +01:00
Tom Moor
aa80f5667f fix: Suggestion menus should close after typing space beyond trigger
closes #5387
2023-05-25 22:21:26 -04:00
Tom Moor
d5341a486c chore: Upgrade all of prosemirror (#5366)
Co-authored-by: Apoorv Mishra <apoorvmishra101092@gmail.com>
2023-05-24 19:24:05 -07:00
dependabot[bot]
fbd16d4b9a chore(deps-dev): bump prettier from 2.1.2 to 2.8.8 (#5372)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2023-05-22 19:14:56 -07:00
Tom Moor
169a99f21e Adds a 60px area to the left and right of editable area (#5197
* Adds a 60px area to the left and right of editable area that allows clicking to focus paragraphs

* tsc
2023-04-13 19:24:33 -07:00
Tom Moor
facf7cb19a fix: Flash of full suggestions in editor popover when closing 2023-04-13 09:54:41 -04:00
Tom Moor
60dbad765a chore: Cleanup editor menu handlers (#5174
* wip

* wip

* refactor
2023-04-10 15:50:21 -07:00
Tom Moor
db73879918 Assorted cleanup, minor bug fixes, styling fixes, eslint rules (#5165
* fix: Logic error in toast
fix: Remove useless component

* fix: Logout not clearing all stores

* Add icons to notification settings

* Add eslint rule to enforce spaced comment

* Add eslint rule for arrow-body-style

* Add eslint rule to enforce self-closing components

* Add menu to api key settings
Fix: Deleting webhook subscription does not remove from UI
Split webhook subscriptions into active and inactive
Styling updates
2023-04-08 05:25:20 -07:00
Tom Moor
c202198d61 fix: Wide selection of comment toolbar fixes (#5160
* fix: Margin on floating toolbar
fix: Flash of toolbar on wide screens

* fix: Nesting of comment marks

* fix: Post button not visible when there is a draft comment, makes it look like the comment is saved
fix: Styling of link editor results now matches other menus
fix: Allow small link editor in comments sidebar

* fix: Cannot use arrow keys to navigate suggested links
Added animation to link suggestions
Added mixin for text ellipsis

* fix: Link input appears non-rounded when no creation option

* Accidental removal
2023-04-07 15:52:57 -07:00
Tom Moor
f8a6a4b840 fix: Comment button does not appear immediately on focus of document comment input
closes #5118
2023-03-29 20:47:21 -04:00
Tom Moor
4182cbd5d0 chore: Refactoring some editor controls (#5023)
* Refactor EmojiMenu

* Refactor CommandMenu to functional component

* Remove more direct props, refactor to useEditor

* Remove hardcoded IDs

* Refactor SelectionToolbar to functional component

* fix: Positioning of suggestion menu on long paragraphs
2023-03-13 18:05:06 -07:00
Tom Moor
d3b099819d feat: Add @mention support to comments (#5001)
* Refactor, remove confusing 'packages' language

* Basic notifications when mentioned in comment

* fix: Incorrect trimming of comments

* test
2023-03-06 19:19:49 -08:00
Apoorv Mishra
de031b365c Capability to mention users in a document (#4838)
* feat: mention user

* fix: trigger api call on every letter typed

* fix: this allows command menu to re-render upon props change, shouldComponentUpdate prevented re-rendering when necessary

* fix: add node

* fix: mention node styling

* fix: Caret not visible after inserting mention

* fix: apply mentionRule

* fix: label is to be obtained from content, not attrs

* feat: add mentions table and model

* fix: typo

* fix: make all mention nodes visible in shared doc

* feat: parse mention ids from doc text

* feat: MentionsProcessor

* feat: documents.publish tests

* feat: tests for MentionsProcessor

* feat: schedule notifs for mentions

* fix: get rid of Mention model

* fix: put actor id and mention id in raw md

* Revert "fix: put actor id and mention id in raw md"

This reverts commit 3bb8a22e3c560971dccad6d2f82266256bcb2d96.

* Revert "Revert "fix: put actor id and mention id in raw md""

This reverts commit 3c5b36c40cebf147663908cf27d0dce6488adfad.

* fix: review

* fix: no need of set

* fix: show avatar

* fix: get rid of eventName

* fix: font-weight

* fix: prioritize mention notifs

* fix: store id in md

* fix: no need of prepending m

* fix: fetchPage

* fix: Avatars incorrect color

* fix: remove scanRE

* fix: test

* fix: include alphabet other than latin

* lockfile

* fix: regex should test for letters, marks and digits

---------

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2023-03-06 14:54:57 -08:00
Tom Moor
08df14618c Various commenting improvements (#4938)
* fix: New threads attached to previous as replies

* fix: Cannot use floating toolbar properly in comments

* perf: Avoid re-writing history on click in editor

* fix: Comment on text selection

* fix: 'Copy link' on comments uses wrong hostname

* Show comment buttons on input focus rather than non-empty input
Increase maximum sidebar size

* Allow opening comments from document menu

* fix: Clicking comment menu should not focus thread
2023-02-26 11:19:12 -08:00
Tom Moor
fc8c20149f feat: Comments (#4911)
* Comment model

* Framework, model, policy, presenter, api endpoint etc

* Iteration, first pass of UI

* fixes, refactors

* Comment commands

* comment socket support

* typing indicators

* comment component, styling

* wip

* right sidebar resize

* fix: CMD+Enter submit

* Add usePersistedState
fix: Main page scrolling on comment highlight

* drafts

* Typing indicator

* refactor

* policies

* Click thread to highlight
Improve comment timestamps

* padding

* Comment menu v1

* Change comments to use editor

* Basic comment editing

* fix: Hide commenting button when disabled at team level

* Enable opening sidebar without mark

* Move selected comment to location state

* Add comment delete confirmation

* Add comment count to document meta

* fix: Comment sidebar togglable
Add copy link to comment

* stash

* Restore History changes

* Refactor right sidebar to allow for comment animation

* Update to new router best practices

* stash

* Various improvements

* stash

* Handle click outside

* Fix incorrect placeholder in input
fix: Input box appearing on other sessions erroneously

* stash

* fix: Don't leave orphaned child comments

* styling

* stash

* Enable comment toggling again

* Edit styling, merge conflicts

* fix: Cannot navigate from insights to comments

* Remove draft comment mark on click outside

* Fix: Empty comment sidebar, tsc

* Remove public toggle

* fix: All comments are recessed
fix: Comments should not be printed

* fix: Associated mark should be removed on comment delete

* Revert unused changes

* Empty state, basic RTL support

* Create dont toggle comment mark

* Make it feel more snappy

* Highlight active comment in text

* fix animation

* RTL support

* Add reply CTA

* Translations
2023-02-25 12:03:05 -08:00
Tom Moor
81f655f402 fix: Links with strikethrough do not have hover preview (#4841)
* fix: Links with strikethrough do not have hover preview

* refactor
2023-02-07 19:36:15 -08:00
Tom Moor
ec2da746dc chore: Convert LinkToolbar to functional component
Co-authored-by: Ítalo Sousa <italusousa@gmail.com>
2023-01-05 21:11:28 -05:00
Tom Moor
80780eedda fix: Mermaid diagrams do not respect dark mode (#4564)
* wip

* Move event binding
2022-12-11 11:33:17 -08:00
Tom Moor
3880a956a3 Add document insights panel (#4418)
* Add document context to allow accessing editor in header, modals, and elsewhere

* lint

* framework

* Hacking together fast

* Insights

* Spacing tweak, docs
2022-11-13 10:19:09 -08:00
Tom Moor
87761e9bf2 feat: Code blocks can now optionally display line numbers (#4324)
* feat: Code blocks can now optionally display line numbers as a user preference

* Touch more breathing room
2022-10-24 06:44:46 -07:00
Tom Moor
6455b5332d feat: Cmd+Enter opens selected link, closes #4151 2022-09-22 20:53:25 -04:00
Tom Moor
e8a6de3f18 feat: Add HTML export option (#4056)
* tidy

* Add title to HTML export

* fix: Add compatability for documents without collab state

* Add HTML download option to UI

* docs

* fix nodes that required document to render

* Refactor to allow for styling of HTML export

* div>article for easier programatic content extraction
2022-09-07 04:34:39 -07:00
Apoorv Mishra
4dbad4e46c feat: Support embed configuration (#3980)
* wip

* stash

* fix: make authenticationId nullable fk

* fix: apply generics to resolve compile time type errors

* fix: loosen integration settings

* chore: refactor into functional component

* feat: pass integrations all the way to embeds

* perf: avoid re-fetching integrations

* fix: change attr name to avoid type overlap

* feat: use hostname from embed settings in matcher

* Revert "feat: use hostname from embed settings in matcher"

This reverts commit e7485d9cda4dcf45104e460465ca104a56c67ddc.

* feat: refactor  into a class

* chore: refactor url regex formation as a util

* fix: escape regex special chars

* fix: remove in-house escapeRegExp in favor of lodash's

* fix: sanitize url

* perf: memoize embeds

* fix: rename hostname to url and allow spreading entire settings instead of just url

* fix: replace diagrams with drawio

* fix: rename

* fix: support self-hosted and saas both

* fix: assert on settings url

* fix: move embed integrations loading to hook

* fix: address review comments

* fix: use observer in favor of explicit state setters

* fix: refactor useEmbedIntegrations into useEmbeds

* fix: use translations for toasts

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2022-08-26 12:21:46 +05:30
Tom Moor
1d242d44b1 chore: Add eslint rule for object shorthand (#3955) 2022-08-11 05:18:14 -07:00
Tom Moor
f9d9a82e47 fix: Cannot hit enter after sentance starting with forward slash
closes #3879
2022-07-29 09:15:48 +01:00
Tom Moor
c4006cef7b perf: Remove markdown serialize from editor render path (#3567)
* perf: Remove markdown serialize from editor render path

* fix: Simplify heading equality check

* perf: Add cache for slugified headings

* tsc
2022-05-21 12:50:27 -07:00