Commit Graph

1993 Commits (2b39eac7b514c8ff02d233b0a6cd90111e8fbcb8)

Author SHA1 Message Date
Kerry 17bbd4eaac
Polls: show warning about undecryptable relations (#10179)
* add decryption error message to MPollBody

* test poll undecryptable message

* tidy + ling

* remove unused file
2023-02-22 10:51:44 +00:00
Florian Duros 58b8df9868
Display "The sender has blocked you from receiving this message" error message instead of "Unable to decrypt message" (#10202) 2023-02-22 11:39:09 +01:00
grimhilt fbeddba782
Add link to next file in the export (#10190)
Co-authored-by: grimhilt <grimhilt@users.noreply.github.com>
2023-02-22 10:29:49 +00:00
Kerry 168f6df7c8
Filter NSFW content in room directory (#10196)
* add SpotlightSearch.showNsfwPublicRooms setting

* use setting in publicroomsearch

* add nsfw keyword filter and setting for room directory

* unit tests

* remove assertions
2023-02-22 10:23:52 +00:00
Kerry d141fedff6
port BeaconViewDialog unit test to rtl (#10180) 2023-02-21 21:32:37 +00:00
Kerry b870f6166c
port SpotlightDialog unit test to rtl (#10194) 2023-02-21 09:06:43 +01:00
Kerry d66248c17c
Poll history: fetch last 30 days of polls (#10157)
* use timeline pagination

* fetch last 30 days of poll history

* add comments, tidy

* more comments

* finish comment

* wait for responses to resolve before displaying in list

* dont use state for list

* return unsubscribe

* strict fixes

* unnecessary event type in filter

* add catch
2023-02-20 20:07:57 +00:00
Kerry 3fafa4b58d
Port location unit tests from enzyme to react-testing-library (#10181)
* SmartMarker test to rtl

* LocationPicker to rtl

* LocationViewDialog to rtl

* LocationShareMenu to rtl

* use toBeDisabled assertion
2023-02-20 18:35:39 +00:00
Kerry a06163ee98
Poll history - ended polls list items (#10119)
* wip

* remove dupe

* use poll model relations in all cases

* update mpollbody tests to use poll instance

* update poll fetching login in pinned messages card

* add pinned polls to room polls state

* add spinner while relations are still loading

* handle no poll in end poll dialog

* strict errors

* render a poll body that errors for poll end events

* add fetching logic to pollend tile

* extract poll testing utilities

* test mpollend

* strict fix

* more strict fix

* strict fix for forwardref

* add filter component

* update poll test utils

* add unstyled filter tab group

* filtertabgroup snapshot

* lint

* update test util setupRoomWithPollEvents to allow testing multiple polls in one room

* style filter tabs

* test error message for past polls

* sort polls list by latest

* extract poll option display components from pollbody

* add ended poll list item component

* use named export for polllistitem

* test POllListItemEnded

* comments

* strict fixes

* extract poll option display components

* strict fixes

* strict
2023-02-20 18:19:50 +00:00
Germain 8c22584f64
Remove threads labs flag and the ability to disable threads (#9878) 2023-02-20 14:46:07 +00:00
Hugh Nimmo-Smith a854e941cc
Release Sign in with QR out of labs (#10182) 2023-02-17 09:27:57 +00:00
Kerry 62f968be7c
fix broken test (#10171) 2023-02-16 22:27:03 +00:00
Michael Telatynski 4574c665ea
Conform more code to strict null checking (#10167)
* Conform more code to strict null checking

* Delint

* Iterate PR based on feedback
2023-02-16 17:21:44 +00:00
alunturner 73360026ab
Convert remaining hook tests to RTL (#10166)
* convert useProfileInfo to RTL
* convert useLatestResult to RTL
2023-02-16 14:13:05 +00:00
Michael Weimann 8feed1a225
Try to resolve emails before creating a DM (#10164) 2023-02-16 14:17:43 +01:00
Hugh Nimmo-Smith f0359a5c18
Revert "Release Sign in with QR out of labs (#10066)" (#10176) 2023-02-16 12:10:52 +00:00
Michael Telatynski e8b92b308b
Conform more code to strict null checking (#10169)
* Conform more code to strict null checking

* delint

* Iterate

* delint

* Fix bad test
2023-02-16 09:38:44 +00:00
Hugh Nimmo-Smith 5123d7e641
Release Sign in with QR out of labs (#10066) 2023-02-16 09:18:12 +00:00
Janne Mareike Koschinski 477de46814
Disable poll response loading test (#10168) 2023-02-15 15:06:23 +01:00
Michael Telatynski 145a5a8a8d
Conform more code to strict null checking (#10153)
* Conform more code to strict null checking

* Conform more code to strict null checking

* Iterate

* Iterate
2023-02-15 13:36:22 +00:00
alunturner a4ff959aa1
Convert useUserDirectory tests to RTL (#10160) 2023-02-14 16:01:10 +00:00
alunturner 731ef1b1ea
Convert useSlidingSyncRoomSearch tests to RTL (#10161) 2023-02-14 15:04:13 +00:00
alunturner 4012f0c591 Convert usePublicRoomDirectory to RTL (#10162)
* convert enzyme to rtl
* sort out TS issues
2023-02-14 15:02:52 +00:00
Michael Weimann 6ab44fd2cb
Fix email lookup in invite dialog (#10150) 2023-02-14 13:21:29 +01:00
alunturner 18c9b2bed2
Hide indent button in rte (#10149)
* add conditional rendering for indent and unindent buttons
* bump rte to 1.1.1
2023-02-14 11:07:36 +00:00
Suguru Hirahara ea4000cf1e
Fix 'Failed check: Ellipsis' on Weblate (#10144)
* Fix 'Failed check: Ellipsis' on Weblate

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Fix tests

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove white space characters before the horizontal ellipsis from RoomPreviewBar

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* yarn run i18n

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Additional change

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

---------

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-02-14 09:05:01 +00:00
Michael Weimann 742fc25a11
Migrate LiveDurationDropdown-test.tsx to react-testing-library (#10151) 2023-02-14 08:53:36 +01:00
Kerry b4565f5024
add Ended poll text to ended poll reply formatted body (#10146) 2023-02-13 22:34:47 +00:00
Johannes Marbach d0e9331f07
Merge branch 'develop' into johannes/find-myself 2023-02-13 20:16:04 +01:00
Michael Telatynski da7aa4055e
Conform more of the code base to strict null checking (#10147)
* Conform more of the code base to strict null checking

* More strict fixes

* More strict work

* Fix missing optional type

* Iterate
2023-02-13 17:01:43 +00:00
Michael Telatynski 61a63e47f4
Comply with noImplicitAny (#9940)
* Stash noImplicitAny work

* Stash

* Fix imports

* Iterate

* Fix tests

* Delint

* Fix tests
2023-02-13 11:39:16 +00:00
Michael Weimann a6eee32c66
Examine all m.direct rooms to find a DM as fallback (#10127) 2023-02-13 08:46:53 +01:00
Kerry 1c6b06bb58
Poll history - extract poll option display components (#10107)
* wip

* remove dupe

* use poll model relations in all cases

* update mpollbody tests to use poll instance

* update poll fetching login in pinned messages card

* add pinned polls to room polls state

* add spinner while relations are still loading

* handle no poll in end poll dialog

* strict errors

* render a poll body that errors for poll end events

* add fetching logic to pollend tile

* extract poll testing utilities

* test mpollend

* strict fix

* more strict fix

* strict fix for forwardref

* add filter component

* update poll test utils

* add unstyled filter tab group

* filtertabgroup snapshot

* lint

* update test util setupRoomWithPollEvents to allow testing multiple polls in one room

* style filter tabs

* test error message for past polls

* sort polls list by latest

* extract poll option display components

* strict fixes
2023-02-13 02:55:39 +00:00
Kerry 18ab325eaf
Poll history - filter by active or ended (#10098)
* wip

* remove dupe

* use poll model relations in all cases

* update mpollbody tests to use poll instance

* update poll fetching login in pinned messages card

* add pinned polls to room polls state

* add spinner while relations are still loading

* handle no poll in end poll dialog

* strict errors

* render a poll body that errors for poll end events

* add fetching logic to pollend tile

* extract poll testing utilities

* test mpollend

* strict fix

* more strict fix

* strict fix for forwardref

* add filter component

* update poll test utils

* add unstyled filter tab group

* filtertabgroup snapshot

* lint

* update test util setupRoomWithPollEvents to allow testing multiple polls in one room

* style filter tabs

* test error message for past polls

* sort polls list by latest

* move FilterTabGroup into generic components

* comments

* Update src/components/views/dialogs/polls/types.ts

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

* Apply suggestions from code review

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

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-02-13 09:19:45 +13:00
Michael Weimann f14414eacd
Migrate OwnBeaconStatus-test.tsx to react-testing-library (#10133) 2023-02-10 15:16:08 +01:00
Michael Weimann bb4b07fdc9
Migrate InteractiveAuthDialog-test.tsx to react-testing-library (#10134) 2023-02-10 14:00:02 +01:00
Johannes Marbach 985d9983a3 Revert accidental changes in PictureInPictureDragger-test.tsx.snap 2023-02-10 10:14:34 +01:00
Johannes Marbach 886ecbcc58 Update snapshots 2023-02-10 08:48:37 +01:00
Michael Weimann 671fdc8665
Migrate RoomView to support MSC3946 (#10088) 2023-02-10 08:40:38 +01:00
Johannes Marbach 6ee6accfc6 Merge branch 'develop' into johannes/find-myself 2023-02-10 08:26:16 +01:00
Johannes Marbach 039824c0ee Move error handling to separate effect 2023-02-10 08:25:59 +01:00
Germain 8fe5714673
Fix predecessor tests broken (#10123) 2023-02-09 12:46:17 +00:00
Andy Balaam c4a6cc8e65
Fix test failures: provide isIntialSyncComplete on mock client (#10122) 2023-02-09 11:36:02 +00:00
Michael Weimann 2501dad0a3
Migrate LabelledCheckbox-test to react-testing-library (#10115) 2023-02-09 12:23:34 +01:00
Michael Weimann 9868d8f39d
Migrate SpaceContextMenu-test.tsx to react-testing-library (#10120) 2023-02-09 12:23:22 +01:00
Adarsh Singh f24db71753
fix: correctly identify emoticons (#10108)
Signed-off-by: Adarsh Singh <thakurluckysinghbrh@gmail.com>
2023-02-08 17:29:12 +01:00
Johannes Marbach f842e319de
Merge branch 'develop' into johannes/find-myself 2023-02-08 16:42:14 +01:00
Michael Weimann 2c30e6d909
Migrate `ZoomButtons-test` to react-testing-library (#10104) 2023-02-08 09:31:24 +01:00
Johannes Marbach 69268856cf Update snapshot 2023-02-08 08:38:12 +01:00
Kerry 583050c8c0
Render poll end events in timeline (#10027)
* wip

* remove dupe

* use poll model relations in all cases

* update mpollbody tests to use poll instance

* update poll fetching login in pinned messages card

* add pinned polls to room polls state

* add spinner while relations are still loading

* handle no poll in end poll dialog

* strict errors

* render a poll body that errors for poll end events

* add fetching logic to pollend tile

* extract poll testing utilities

* test mpollend

* strict fix

* more strict fix

* strict fix for forwardref

* update poll test utils

* implicit anys

* tidy and add jsdoc
2023-02-07 21:12:39 +00:00
Johannes Marbach e5e2a825fb Make geolocate update with allowGeolocate 2023-02-07 20:46:10 +01:00
Johannes Marbach c5fa3fc796 Merge branch 'develop' into johannes/find-myself 2023-02-07 20:35:06 +01:00
Michael Telatynski 54a6ce589f
Fix wrongly grouping 3pid invites into a single repeated transition (#10087) 2023-02-07 10:09:46 +00:00
Michael Weimann 4648fa3c8c
Add PiP move threshold (#10040) (#10033) 2023-02-07 10:14:28 +01:00
Kerry Archibald 06d8755f6b add tests for geolocate self on map views 2023-02-07 16:51:58 +13:00
Johannes Marbach fdac94a841 Update snapshot 2023-02-04 20:58:53 +01:00
Johannes Marbach 2b97de7a47 One more type fix 2023-02-04 20:38:27 +01:00
Andy Balaam a756b33fe9
Rename RoomCreate -> RoomPredecessorTile (#10047) 2023-02-03 16:58:52 +00:00
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
Janne Mareike Koschinski f1a08cd572
Gitter sunsetting: Use findPredecessor in EventTileFactory (#10075) 2023-02-03 15:36:37 +00:00
Michael Weimann 97506cbcdb
Migrate SpotlightDialog for dynamic room predecessors (#10076) 2023-02-03 15:47:07 +01:00
Andy Balaam add23e4d5d
Pass the dynamic predecessor feature flag when listing rooms (#10068) 2023-02-03 14:09:31 +00:00
Michael Weimann cfba1b07c6
Broadcast time left should never be negative (#10070) 2023-02-03 13:49:43 +01:00
Michael Weimann 27bd04a875
Use findPredecessor in RoomNotifs#getUnreadNotificationCount (#10067) 2023-02-03 13:00:33 +01:00
Germain 6dd578e5a7
Devtools for stuck notifications (#10042) 2023-02-03 11:07:24 +01:00
Florian Duros 469228f45e
Fix new line created when enter is pressed (#10064) 2023-02-03 10:48:12 +01:00
Andy Balaam b7cd28bd29
Support MSC3946 in RoomListStore (#10054) 2023-02-03 09:14:44 +00:00
Michael Telatynski 2bde31dcff
Switch to linkify-react for element Linkification as it handles React subtrees without exploding (#10060
* Switch to linkify-react instead of our faulty implementation

Fixes a series of soft crashes where errors include "The node to be removed is not a child of this node."

* Improve types

* Fix types

* Update snapshots

* Add test

* Fix test
2023-02-03 08:59:21 +00:00
Michael Weimann 089557005a
Autofocus security key field (#10048) 2023-02-03 09:39:25 +01:00
Kerry ebb8408f28
Poll history - read only list of polls in current timeline (#10055)
* add settings while under development

* very basic tests for roomsummarycard

* empty poll history dialog and option in room summary

* pollS history in settings

* render an ugly list of polls in current timeline

* readonly poll history list items

* fix scroll window

* use short year code in date format, tidy

* no results message + tests

* strict fix

* mock intldatetimeformat for stable date formatting

* extract date format fn into date-utils

* jsdoc
2023-02-02 21:39:23 +00:00
Kerry 544baa30ed
use Poll model with relations API in poll rendering (#9877)
* wip

* remove dupe

* use poll model relations in all cases

* update mpollbody tests to use poll instance

* update poll fetching login in pinned messages card

* add pinned polls to room polls state

* add spinner while relations are still loading

* handle no poll in end poll dialog

* strict errors

* strict fix

* more strict fix
2023-02-02 20:22:26 +00:00
Johannes Marbach d3f378240e Appease the linter 2023-02-02 20:38:42 +01:00
Johannes Marbach f3fd027db4 Merge branch 'develop' into johannes/latest-room-in-space 2023-02-02 20:21:17 +01:00
Johannes Marbach 568042b9e7 Move test setup to describe scope 2023-02-02 20:20:57 +01:00
Andy Balaam e43d447535
Support MSC3946 in RoomCreate tile (#10041) 2023-02-02 13:39:13 +00:00
Andy Balaam b416e15cbd
Tests for RoomListStore's predecessor handling (#10046) 2023-02-02 13:22:30 +00: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
Kerry 923ad4323b
Poll history - setup labs setting (#10039)
* add settings while under development

* very basic tests for roomsummarycard

* empty poll history dialog and option in room summary

* pollS history in settings

* use more user-centric selectors in roomsummarycard test
2023-02-01 20:57:48 +00:00
Johannes Marbach 3766b39361 Merge branch 'develop' into johannes/latest-room-in-space 2023-02-01 19:54:40 +01:00
Johannes Marbach bf94d50be2 Prettyfy 2023-02-01 19:53:01 +01:00
Johannes Marbach c63daf62ed Add snapshot test 2023-02-01 19:51:37 +01:00
Andy Balaam 33b89a5709
Use Room.findPredecessor when rendering RoomCreate tiles (#10012)
* Use Room.findPredecessor to render RoomCreate tiles

* Handle state updates

* Handle missing predecessor

* Check for missing a room
2023-02-01 15:44:46 +00:00
Michael Weimann 7feb5b1f6b
Add PiP move threshold (#10040) 2023-02-01 13:55:10 +01:00
Michael Weimann c6f6fa62f7
Implement broadcast UTD handling (#10021) 2023-02-01 13:32:49 +01:00
Florian Duros afda774471
Add RTE keyboard navigation in editing (#9980)
Add Keyboard navigation in editing
2023-02-01 13:12:12 +01:00
Germain 8161da1054
Remove threads beta feedback button (#10038) 2023-02-01 09:50:15 +00: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
Germain 703587b8e9
Cleanup pre MSC3773 thread unread notif logic (#10023) 2023-01-31 16:59:24 +00:00
Michael Telatynski 0d1fce37b2
Fix layout and visual regressions around default avatars (#10031) 2023-01-31 13:56:48 +00:00
grimhilt 5a08859e37
fix regional emojis converted to flags (#9294)
Co-authored-by: grimhilt <grimhilt@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Faye Duxovni <duxovni@duxovni.org>
Co-authored-by: Faye Duxovni <fayed@element.io>
Fixes https://github.com/vector-im/element-web/issues/19000
2023-01-31 13:08:35 +00: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 53a9b6447b
Fix MessageEditHistoryDialog crashing on complex input (#10018)
* noImplicitAny fixes for MessageDiffUtils

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

* Add tests for MessageDiffUtils

Adds mostly snapshot tests for MessageDiffUtils to guarantee consistent
behavior.

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

* Strict mode fixes for MessageDiffUtils

Gets `MessageDiffUtils` to pass under `tsc --strict`.

Fixes https://github.com/vector-im/element-web/issues/23665 - no longer errors,
though it still isn't correct.

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

* Remove obsolete DiffDOM workaround

Workaround is no longer necessary as of DiffDOM 4.2.1

See https://github.com/fiduswriter/diffDOM/issues/90

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

---------

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
2023-01-31 09:55:20 +00:00
Robin 43c67ce4bf
Add ignore user confirmation dialog (#6116)
Signed-off-by: Robin Townsend <robin@robin.town>
2023-01-31 09:42:18 +00:00
Michael Weimann 269d1622b9
Implement more robust broadcast chunk header detection (#10006) 2023-01-31 09:48:30 +01:00
Germain e9d723269f
Use CopyableText in devtools (#9993)
Co-authored-by: Alun Turner <alunt@element.io>
2023-01-30 17:01:54 +00:00
Michael Telatynski 5095bc0427
Fix new tests introduced by html export tweaks (#10022) 2023-01-30 15:52:38 +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
Andy Balaam a21929dba0
Convert RoomCreate to a functional component (#9999) 2023-01-30 10:02:32 +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