Commit Graph

282 Commits (73fdef2174a5d01d9f2c449b2bcc9ed63e3dcbc5)

Author SHA1 Message Date
Florian Duros 2b66cfc25f
Open message in editing mode when keyboard up is pressed (RTE) (#10079)
Move to previous message when arrow up is pressed in the main composer (RTE)
2023-02-03 17:43:02 +01:00
Florian Duros 469228f45e
Fix new line created when enter is pressed (#10064) 2023-02-03 10:48:12 +01:00
Michael Telatynski 21c3967010
Revert "Member avatars without canvas" (#10057
* Revert "Apply more general fix for base avatar regressions (#10045)"

This reverts commit 371a3c0d36.

* Revert "Fix layout and visual regressions around default avatars (#10031)"

This reverts commit 0d1fce37b2.

* Revert "Member avatars without canvas (#9990)"

This reverts commit a8aa4de4b4.

* Update snapshots
2023-02-02 10:22:19 +00:00
Florian Duros afda774471
Add RTE keyboard navigation in editing (#9980)
Add Keyboard navigation in editing
2023-02-01 13:12:12 +01:00
Florian Duros 918f151384
Add indentation increasing/decreasing to RTE (#10034)
Add indent and unindent actions to RTE
2023-01-31 18:13:24 +01:00
Clark Fischer 431afaafc6
Unify unread notification state determination (#9941)
* Add tests for unread notification facilities

Add some tests to guarantee some consistency in `useUnreadNotifications` and
`RoomNotificationState`.

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Add RoomNotifs#determineUnreadState

Intended as a singular replacement for the divergent implementations before.

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Unify room unread state determination

Have both the class-based facility and the hook use the new unified logic in
`RoomNotifs#determineUnreadState`.

Addresses https://github.com/vector-im/element-web/issues/24229

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

---------

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-01-31 09:58:17 +00:00
Clark Fischer 4c1e4f5127
Fix "[object Promise]" appearing in HTML exports (#9975)
Fixes https://github.com/vector-im/element-web/issues/24272
2023-01-30 14:31:32 +00:00
Germain 3e2bf5640e
Update to supportsThreads (#9907) 2023-01-30 12:20:11 +00:00
Clark Fischer a8aa4de4b4
Member avatars without canvas (#9990)
* Strict typechecking fixes for Base/Member/Avatar

Update the core avatar files to pass `--strict --noImplicitAny` typechecks.

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Add tests for Base/Member/Avatar

More thoroughly test the core avatar files. Not necessarily the most thorough,
but an improvement.

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Extract TextAvatar from BaseAvatar

Extracted the fallback/textual avatar into its own component.

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Use standard HTML for non-image avatars

Firefox users with `resistFingerprinting` enabled were seeing random noise
for rooms and users without avatars. There's no real reason to use data
URLs to present flat colors.

This converts non-image avatars to inline blocks with background colors.

See https://github.com/vector-im/element-web/issues/23936

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

* Have pills use solid backgrounds rather than colored images

Similar to room and member avatars, pills now use colored pseudo-elements
rather than background images.

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>

---------

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
Co-authored-by: Andy Balaam <andy.balaam@matrix.org>
2023-01-30 09:50:08 +00:00
Florian Duros 406edfc27d
Fix link creation with backward selection (#9986)
Fix link creation with backward selection
2023-01-26 10:08:23 +00:00
Florian Duros 1da78fa6bc
Fix RTE focus behaviour in threads 2023-01-23 15:41:01 +01:00
alunturner 9dbc5f3773
Add quotes to rich text editor (#9932)
* bump rich text editor to 0.20.0
* add new svg for the button
* show the button
* make the composer display look like the timeline display
2023-01-20 10:55:46 +00:00
alunturner a63da74f06
Add code blocks to rich text editor (#9921)
* Applies small changes to code block display in timeline
* Makes the composer code block look like the timeline display, but without line numbers
* Adds a button to allow code blocks to be implemented
* Adds tests for the new button
2023-01-19 15:49:21 +00:00
alunturner 8a2e386531
Add disabled button state to rich text editor (#9930)
* add disabled css state
* conditionally apply disabled css state
* hides disabled tooltips
2023-01-19 09:24:29 +00:00
Florian Duros b47588fc5c
Fix {enter} press in RTE (#9927)
Fix enter combination in RTE
2023-01-19 09:17:18 +00:00
Florian Duros e4a9684d76
Fix cypress RTE flaky test (#9920)
* Update @matrix-org/matrix-wysiwyg to 0.19.0
* Press {enter} to send message
2023-01-18 10:09:25 +01:00
alunturner 6052db1e8a
Add list functionality to rich text editor (#9871)
* adds buttons to toggle bulleted and numbered lists on and off
* adds icons for those buttons
* css changes to timeline display
* adds tests for the new buttons, refactors existing tests
2023-01-13 15:44:35 +00:00
Germain d4f247d1fe Merge branch 'develop' into gsouquet/threads-forceenablelabsflag 2023-01-11 11:51:57 +00:00
Patrick Cloke da2640b7ba
Display rooms & threads as unread (bold) if threads have unread messages. (#9763)
Co-authored-by: Germain <germain@souquet.com>
Co-authored-by: Germain <germains@element.io>
Fixes https://github.com/vector-im/element-web/issues/23907
2023-01-11 11:49:03 +00:00
Florian Duros a691e634b0
Add edit and remove actions to link in RTE (#9864)
Add edit and remove actions to link in RTE
2023-01-11 10:10:55 +00:00
Travis Ralston edc44922c2 Revert "Revert "Remove unused/disabled room list drag&drop tests (#9883)""
This reverts commit 0453283bed.
2023-01-10 13:43:10 -07:00
Travis Ralston 0453283bed Revert "Remove unused/disabled room list drag&drop tests (#9883)"
This reverts commit 34f0229d75.
2023-01-10 13:32:11 -07:00
Travis Ralston 34f0229d75
Remove unused/disabled room list drag&drop tests (#9883)
It's been years since we've had drag and drop - just delete the test.
2023-01-10 09:20:02 -07:00
Michael Weimann 4627456837
Prevent starting a voice message while recording a broadcast (#9844) 2023-01-10 15:51:20 +01:00
Germain 7ca1b385d9 Force enable threads labs flag 2023-01-09 12:38:19 +00:00
Michael Weimann ab9152044c
Use the same avatar colour when creating 1:1 DM rooms (#9850) 2023-01-05 17:05:21 +01:00
grimhilt ecfd1736e5
combine search results when the query is present in multiple successive messages (#9855)
* merge successives messages

* add tests

* fix styles

* update test to match the expected parameters

* fix types errors

* fix tsc types errors

Co-authored-by: grimhilt <grimhilt@users.noreply.github.com>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2023-01-05 11:37:58 +00:00
alunturner 432ce3ca31
Improve switching between rich and plain editing modes (#9776)
* allows switching between modes that retains formatting
* updates rich text composer dependency to 0.13.0 (@matrix-org/matrix-wysiwyg)
* improves handling of enter keypresses when ctrlEnterTosend setting is true in plain text editor
* changes the message event content when using the new editor
* adds tests for the changes to the plain text editor
2023-01-04 12:57:09 +00:00
Florian Duros 6b155620e4
Fix emoji in RTE editing (#9827)
Fix emoji in RTE editing
2023-01-03 15:35:14 +00:00
alunturner b034ada6fd
Convert enzyme to rtl: BasicMessageComposer (#9839) 2022-12-29 20:52:51 +00:00
Florian Duros fe0273b1a6
Add link creation to rich text editor (#9775)
Add link creation to RTE
2022-12-23 11:34:15 +00:00
Florian Duros 88c3864682
Replace some enzyme tests by @testing-library/react (#9822)
* Replace MessageComposerButtons-test.tsx enzyme by @testing-library/react

* Replace HtmlUtils-test.tsx enzyme by @testing-library/react
2022-12-23 10:46:14 +00:00
Michael Weimann b81582d045
Improve live voice broadcast detection by testing if the started event has been redacted (#9780) 2022-12-22 10:37:07 +00:00
Florian Duros 7db2ee749f
Fix rte flaky test (#9811) 2022-12-21 11:22:17 +00:00
Germain bef8e077f6
Unify notifications panel event design (#9754) 2022-12-21 10:25:50 +00:00
Florian Duros d6e447b934
Load RTE component only when needed (#9804)
Use react lazy to load rte component
2022-12-20 14:59:18 +00:00
Richard van der Hoff dc29317445 Improve display of edited events 2022-12-20 11:19:47 +00:00
Faye Duxovni 4724506320
Improve decryption error UI by consolidating error messages and providing instructions when possible (#9544)
* Improve decryption error UI by consolidating error messages and providing instructions when possible

* Fix TS strict errors

* Rename .scss to .pcss

* Avoid accessing clipboard, Cypress doesn't like it

* Display DecryptionFailureBar alongside other AuxPanel bars

* Add comments

* Add small margin off-screen for visible decryption failures

* Fix some more TS strict errors

* Add unit tests for DecryptionFailureBar

* Add button to resend key requests manually

* Remove references to matrix-js-sdk crypto internals

* Add hysteresis to visible decryption failures

* Add comment

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Add comment

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Don't create empty div if we're not showing resend requests button

* cancel updateSessions on unmount

* Update unit tests

* Fix lint and implicit any

* Simplify visible event bounds checking

* Adjust cypress test descriptions

* Add percy snapshots

* Update src/components/structures/TimelinePanel.tsx

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Add comments on TimelinePanel IState

* comment

* Add names to percy snapshots

* Show Resend Key Requests button when there are sessions that haven't already been requested via this bar

* We no longer request keys from senders

* update i18n

* update expected text in cypress test

* don't download keys ourselves, update device info in response to updates from client

* fix ts strict errors

* visibledecryptionfailures undefined handling

* Fix implicitAny errors

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-12-15 17:24:33 +00:00
Germain 2d2755d145
🧵 Enable threads by default (#9736)
* Delabs threads

* remove threads reload when labs is toggled

* Fix ts strict

* fix rebase mistake

* remove .only

* fix pr comments

* re-introduce backwards compat

* Fix export test

* Fix SearchREsultTile test

* strict ts
2022-12-13 15:09:15 +00:00
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Florian Duros 73986faa7d
Add inline code to rich text editor (#9720)
Add inline code to rich text editor
2022-12-09 14:06:15 +01:00
Florian Duros 65f9843576
Add emoji handling for plain text mode (#9727)
Add emoji handling for plain text mode
2022-12-09 11:38:14 +01:00
Andy Balaam 0f17728aa1
Merge branch 'develop' into feat/emoji-picker-rich-text-mode 2022-12-08 09:39:30 +00:00
Florian Duros 7943f83858
Change formatting buttons behavior (#9715)
Change formatting buttons behaviour
2022-12-07 12:13:35 +01:00
Florian Duros bc001c2b88
Fix types 2022-12-06 16:45:25 +01:00
Florian Duros 1bd560d350
Merge remote-tracking branch 'origin/develop' into feat/emoji-picker-rich-text-mode 2022-12-06 16:38:46 +01:00
Florian Duros 27139ca68e
Add test for emoji 2022-12-06 16:38:25 +01:00
Germain 3a501003e2
Add setting to hide bold notifications (#9705) 2022-12-06 09:59:17 +00:00
Michael Weimann 474f464e48
Voice broadcast indicator in room list (#9709) 2022-12-06 10:56:29 +01:00
Florian Duros f5efa85882
Fix types and console.log 2022-12-05 17:40:33 +01:00