Previously, when LiveKit/MatrixRTC was connected the debounced send would
only go to the LiveKit data channel and skip Matrix timeline events entirely.
This meant data could be lost if the user exited before the 50 ms RTC debounce
fired, since the fire-and-forget snapshot on unmount is unreliable once the
browser begins unloading.
Changes:
- Single 500 ms debounce timer (replaces the separate 50 ms RTC / 500 ms Matrix
split). On each debounce tick:
1. save_incremental() captures pending local changes.
2. If LiveKit is connected, the delta is published via the data channel for
low-latency peer delivery.
3. The delta is ALWAYS sent as a Matrix timeline event (or
Previously, when LiveKit/MatrixRTC was connected the debounced send would
only go to the LiveKit data channel and skip Matrix timeline events entirely.
This meant data could be lost if the user exited before the 50 ms RTC debounce
fired, since the fire-and-forget snapshot on unmount is unreliable once the
browser begins unloadi- Aonly go to the LiveKit data channel and skip Matrix timeline events entiDoThis meant data could be lost if the user exited before the 50 ms RTC debounngfired, since the fire-and-forget snapshot on unmount is unreliable once the
b mbrowser begins unloading.
Changes:
- Single 500 ms debounce timer (replacd;
Changes:
- Single 500 ms
- Replace height:100% on .mx_DocumentView with flex:1 + min-height:0.
In the flex-column mx_RoomView_body, height:100% resolves to the full
parent height (not the remaining space), causing the total content to
exceed the container and flex-shrinking the 64px RoomHeader — making
the bottom border appear at the wrong vertical position. flex:1 takes
only the leftover space after the header.
- Add mx_RoomHeader_toggled class to DocumentIcon when isViewingDocument
is true, matching the same pattern used by ToggleableIcon for Threads,
Notifications, and RoomInfo buttons. The existing CSS rule
.mx_RoomHeader .mx_RoomHeader_toggled { fill: --cpd-color-icon-accent-primary }
then turns the icon green.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Three problems prevented the document editor from being usable:
1. The contentEditable div inherited composer sizing (~22px tall) so
clicks in the document content area landed outside it and bubbled up
to the mx_RoomView div[tabIndex=-1], making the whole room view flash
blue instead of focusing the editor. Fixed by making the Editor stack
fill the full content area height in _DocumentView.pcss.
2. useSetCursorPosition was not called, so even when the editor received
focus there was no selection range and no visible cursor. Added the
hook call (same pattern as WysiwygComposer).
3. Any click outside the now-tall contentEditable div (e.g. in padding)
still fell through. Added an onClick handler on the content wrapper
that calls ref.current.focus() when the click target isn't the editor
itself, ensuring any click in the document area focuses the editor.
Bonus: suppress the browser default outline on .mx_RoomView:focus so
pressing a key no longer shows a blue box around the entire room view.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Wrap DocumentView's Editor in ComposerContext.Provider so useSelection
(used internally by the Editor) has the required context, enabling
focus and keyboard input to work correctly.
- Add pnpm override pointing @vector-im/matrix-wysiwyg at the local
matrix-rich-text-editor/platforms/web build so the automerge
collaboration API (composerModel, useCollaboration, etc.) is available
when running element-web locally end-to-end.
- Remove the wysiwyg patchedDependency entry (superseded by the override).
- Update pnpm-lock.yaml to reflect the link resolution.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a new 'Document' content type alongside Timeline/Call/Widget that
shows a full-room Automerge-backed collaborative editor.
Changes:
- Add `MainSplitContentType.Document` to RoomContext enum
- Add `view_document?: boolean` to ViewRoomPayload
- Track `viewingDocument` state in RoomViewStore with `isViewingDocument()`
- Update RoomView.getMainSplitContentType to return Document when active,
and render <DocumentView> in the main split switch statement
- Add document toggle button (📄) to RoomHeader using the Compound
IconButton / Tooltip pattern
- New DocumentView component:
- Uses `useWysiwyg` for the rich text editor surface
- Loads initial document from room-state event (org.element.doc.automerge)
- Sends incremental Automerge deltas (debounced 500 ms) as
org.element.doc.delta timeline events
- Receives and applies remote deltas from other room participants
- Full-height document layout with formatting toolbar
- New _DocumentView.pcss stylesheet + import in _components.pcss
- i18n strings: room.document.open / room.document.close
The collaboration methods (save_incremental, receive_changes, etc.) are
guarded by the isCollaborative() runtime type-check so the component
degrades gracefully with the current 2.40.0 npm package until the
langleyd/automerge build is published.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Refactor DateSeparator using MVVM and move to shared-components
* Add a few more stories, tests and screenshots
* Use the shared component and viewmodel in element-web
* Renaming custom content property an updating snapshots
* Fix lint errors and update snapshot after merge
* Change lifecycle handling for DateSeparatoreViewModel in components where manual handling is preferrable over wrapper component.
* Move context menu from viewmodel to shared components - step 1
* Create a jump to date picker component in shared components
* Add tests for coverage and fix layout issues and roving indexes
* Make element-web use the new component
* Simplify context menu and adjusting tests
* The HTMLExport now render shared components and need a I18nContext.Provider
* Updating unit tests for context menu
* Changed to {translate: _t} to let scripts pick up translations
* Fix lint issue and updating screenshots after merge
* Update snaps for element web components
* Renaming MVVM view components with suffix View.
* Fixing problem with input date calendar icon and system dark theme
* Changed the rendering of the menu and added a separate button component
* Handle input control with useRef in onKeyDown
* Updating DateSeparator snapshots on unit tests
* Updating layout after compound Menu got a className property
* Move files to new subfolder after merge
* Updated snapshot after merge
* Updating lock file
* Updates to styling from PR review
* Updates to focus/blur functionality
* Fixed tabbing and export documentation to stories
* Updated snapshots
---------
Co-authored-by: Zack <zazi21@student.bth.se>
* Fix misaligned cross in complete security dialog
* It's not a dialog
* Need to wait for login to finish
* Add screenshot
* Move snapshot to thr right place
mkdir apps/web/scripts
mv scripts/{cleanup.sh,ci_package.sh,copy-res.ts,deploy.py,package.sh} apps/web/scripts
And a couple of gitignore tweaks
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>