Commit Graph

138 Commits

Author SHA1 Message Date
Michael Telatynski
30429df948
Eliminate the use of MatrixClientPeg in utils (#10910) 2023-05-23 16:24:12 +01:00
Suguru Hirahara
b7cd1f00fc
Use Icon component for icons on AppTile's menu bar (#10955)
* Use icon component for buttons on mx_AppTileMenuBar_widgets

* Remove redundant declarations

* Add a Percy snapshot test

* Set color value to mx_Icon, fill and stroke with currentColor

* Iterate
2023-05-22 07:48:40 +00:00
Suguru Hirahara
c6f44d3053
Add Jest snapshots for AppTile (#10946)
- on PiP widget (PersistentApp)
- on RightPanel
2023-05-19 10:34:55 +00:00
Suguru Hirahara
8637a5d77d
Take Jest snapshots of widgets (AppTile) (#10897)
* Take a Jest snapshot of a widget (AppTile)

* Fix the comment

* Update test/components/views/elements/AppTile-test.tsx

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>

* Add container

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-05-18 08:30:55 +00:00
Michael Telatynski
2da199c41d
Remove url npm dependency and use Web URL constructor (#10930) 2023-05-17 12:50:00 +01:00
Michael Telatynski
2cee8a4b01
Specify lazy loading for avatars (#10866)
* Specify lazy loading for avatars

so browser doesn't fetch eagerly if off-screen

* Update snapshots
2023-05-11 18:29:48 +00:00
Michael Telatynski
82e32035fd
Conform more of the codebase to strictNullChecks (#10842) 2023-05-11 09:56:56 +01:00
Michael Telatynski
99ac9e5029
Ensure tooltip contents is linked via aria to the target element (#10729)
* Ensure tooltip contents is linked via aria to the target element

* Iterate

* Fix tests

* Fix tests

* Update snapshot

* Fix missing aria labels for more tooltips

* Iterate

* Update snapshots
2023-05-05 08:26:11 +00:00
Michael Telatynski
782060a26e
ARIA Accessibility improvements (#10674)
* Add missing aria-expanded attributes

* Improve autoComplete for phone numbers & email addresses

* Fix room summary card heading order

* Fix missing label on timeline search field

* Use appropriate semantic elements for dropdown listbox

* Use semantic list elements in keyboard settings tab

* Use semantic list elements in spotlight

* Fix types and i18n

* Improve types

* Update tests

* Add snapshot test
2023-04-20 17:13:30 +00:00
Michael Telatynski
a47b3eb0ee
Apply strictNullChecks to src/components/views/elements/* (#10462
* Apply `strictNullChecks` to `src/components/views/elements/*`

* Iterate

* Iterate

* Iterate

* Apply `strictNullChecks` to `src/components/views/elements/*`

* Iterate

* Iterate

* Iterate

* Update snapshot
2023-03-29 08:23:54 +01:00
Michael Weimann
aec454dd6f
Add UserProfilesStore, LruCache and cache for user permalink profiles (#10425) 2023-03-27 10:07:43 +02:00
Michael Weimann
3eb6a55b93
Tweak pill UI (#10417) 2023-03-22 13:27:24 +01:00
Michael Weimann
96d1b74ffc
Pillify event permalinks (#10392) 2023-03-21 10:23:20 +01:00
Michael Telatynski
1c9ea423c9
Conform more code to strictNullChecks (#10374)
* Apply `strictNullChecks` to `src/components/views/room_settings/*`

* Restore tsconfig.json

* Conform more code to `strictNullChecks`

* Iterate

* Update matrix-widget-api

* Conform more code to `strictNullChecks`
2023-03-16 11:07:29 +00:00
Michael Weimann
41d88ad6ae
Fix user pill click (#10359) 2023-03-13 15:43:13 +01:00
Michael Weimann
85e8d27697
Extract avatars from permalink hook (#10328) 2023-03-09 12:48:36 +01:00
Michael Weimann
ad26925bb6
Refactor pill and add tests (#10304) 2023-03-08 13:06:50 +01:00
Sebbones
0c1c3f1cde
Improved a11y for Field feedback and Secure Phrase input (#10320)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-03-08 11:32:50 +00:00
Michael Telatynski
e5291c195d
Replace react-dom tests with react testing-library tests (#10260) 2023-03-01 15:59:27 +00:00
Michael Weimann
5398db21ad
Add ESLint Jest (#10261) 2023-03-01 16:23:35 +01:00
Michael Telatyński
f40d15388c
Update tests to prefer RTL over Enzyme (#10247
* Update tests to prefer RTL over Enzyme

* Strict types
2023-02-28 08:58:23 +00:00
Michael Telatyński
9b2b3ca42e
Remove tests of non-spec-compliant behaviour (#10248) 2023-02-27 18:50:15 +00:00
Michael Telatyński
12dd799301
Fix double translation issue (#10240
* Fix double translation issue

* Remove some redundant string concatenations
2023-02-27 09:15:27 +00:00
maheichyk
7b77f76486
Widget permissions customizations using module api (#10121)
* Using module api to customize widget permissions

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

* Revert type export and use ComponentProps instead.

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>

---------

Signed-off-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
Co-authored-by: Mikhail Aheichyk <mikhail.aheichyk@nordeck.net>
2023-02-23 14:53:44 +00:00
Michael Telatynski
c29e5f18ff
Update usages of test utilities preferring RTL (#10203) 2023-02-22 10:52:55 +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
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
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 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
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
2501dad0a3
Migrate LabelledCheckbox-test to react-testing-library (#10115) 2023-02-09 12:23:34 +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 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
Clark Fischer
2417482667
Fix error when viewing source of redacted events (#9914)
* Fix viewing source of redacted events

Clicking 'View Source' in the context menu of a redacted event causes an error,
and the user gets no visible result.

This fixes <ViewSource /> to indicate that the source is unavailable when a
message has been redacted. The original source remains available.

<SyntaxHighlight /> requires a non-null string for its `content` prop, and, in
the case of redacted events, <ViewSource /> was passing `undefined`. This is
ultimately because redacting an event causes `MatrixEvent.clearEvent` to be
`undefined`, which <ViewSource /> wasn't checking.

Fixes https://github.com/vector-im/element-web/issues/24165

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

* Use correct highlight.js call

Previous call signature was deprecated.

See https://github.com/highlightjs/highlight.js/issues/2277

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

Signed-off-by: Clark Fischer <clark.fischer@gmail.com>
2023-01-15 16:22:59 +00:00
Travis Ralston
badb2c4b27
Use js-sdk imports for poll event types instead of events-sdk (#9904)
* Use js-sdk imports for poll event types instead of events-sdk

* Attempt to appease some tsc --strict errors

* Manually create poll response in cypress test
2023-01-13 10:02:33 -07: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
Johannes Marbach
214fa13d7d Update snapshots 2023-01-06 17:44:36 +01:00
Michael Weimann
3ce064731b
Migrate AppTile-Test to RTL (#9838) 2022-12-30 10:33:10 +00:00
Germain
d2763c329d
Migrate AccessibleButton-test to RTL (#9833) 2022-12-28 10:40:34 +00:00
Kerry
9a8545bf34
Fix: Editing a poll will silently change it to a closed poll (#9809)
* add failing test case

* dont reset poll disclosure on editing
2022-12-21 21:29:11 +00:00
Michael Weimann
526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Michael Telatynski
590b845f3f
Remove all usages of UNSAFE_* React methods (#9583) 2022-11-18 09:22:43 +00:00
Michael Telatynski
04bc8fb71c
Optimise Jest run in CI (#9542) 2022-11-04 10:48:08 +00:00
Hugh Nimmo-Smith
f05cc5d8f3
Refactor + improve test coverage for QR login (#9525) 2022-11-02 10:51:20 +00:00
Michael Telatynski
ee61994c05
Reset custom power selector when blurred on empty (#9508) 2022-10-26 16:14:33 +00:00
Kerry
69642544ac
Device manager - add learn more popups to filtered sessions section (#9497)
* add learn more to filtered sessions

* fullstop

* update tests and i18n for fullstop

* remove unused switch

* whitespace

* use correct card type
2022-10-26 11:04:16 +02:00
Michael Telatynski
913af09e61
Convert some tests from Enzyme to RTL (#9483) 2022-10-24 09:06:20 +01:00
Michael Telatynski
6b30a5e1c9
Migrate some enzyme tests to RTL (#9383) 2022-10-10 16:29:10 +01:00
Robin
06dbea6255
New group call experience: Room header and PiP designs (#9351)
* Update our cancel icon

The cancel icon we're using in the app has drifted out of sync with the ones used in our designs. We also had two identical-looking icons, so this consolidates them into one.

I've simultaneously updated our chevron icons, since in the case of the 'jump to unread' timeline button, it became clear that the weight of the new close icon did not match the thinner chevron.

* Don't squish bottom/top-aligned tooltips near the edge of the screen

* Close the timeline panel when returning to the fullscreen timeline view

* Add layout switching capabilities to ElementCall

* Bring the room header in line with the group call designs

* Bring the PiP header in line with the group call designs

* Fix lints

* Clarify tooltip CSS calculations

* Test PipView

* Expand RoomHeader test coverage

* Test PipView more
2022-10-07 02:27:28 +00:00
Robin
0d6a550c33
Prepare for Element Call integration (#9224)
* Improve accessibility and testability of Tooltip

Adding a role to Tooltip was motivated by React Testing Library's
reliance on accessibility-related attributes to locate elements.

* Make the ReadyWatchingStore constructor safer

The ReadyWatchingStore constructor previously had a chance to
immediately call onReady, which was dangerous because it was potentially
calling the derived class's onReady at a point when the derived class
hadn't even finished construction yet. In normal usage, I guess this
never was a problem, but it was causing some of the tests I was writing
to crash. This is solved by separating out the onReady call into a start
method.

* Rename 1:1 call components to 'LegacyCall'

to reflect the fact that they're slated for removal, and to not clash
with the new Call code.

* Refactor VideoChannelStore into Call and CallStore

Call is an abstract class that currently only has a Jitsi
implementation, but this will make it easy to later add an Element Call
implementation.

* Remove WidgetReady, ClientReady, and ForceHangupCall hacks

These are no longer used by the new Jitsi call implementation, and can
be removed.

* yarn i18n

* Delete call map entries instead of inserting nulls

* Allow multiple active calls and consolidate call listeners

* Fix a race condition when creating a video room

* Un-hardcode the media device fallback labels

* Apply misc code review fixes

* yarn i18n

* Disconnect from calls more politely on logout

* Fix some strict mode errors

* Fix another updateRoom race condition
2022-08-30 15:13:39 -04:00