Kerry
988d300258
Live location sharing: only share to beacons created on device ( #8378 )
...
* create live beacons in ownbeaconstore and test
Signed-off-by: Kerry Archibald <kerrya@element.io>
* more mocks in RoomLiveShareWarning
Signed-off-by: Kerry Archibald <kerrya@element.io>
* extend mocks in components
Signed-off-by: Kerry Archibald <kerrya@element.io>
* comment
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove another comment
Signed-off-by: Kerry Archibald <kerrya@element.io>
* extra ? hedge in roommembers change
Signed-off-by: Kerry Archibald <kerrya@element.io>
* listen to destroy and prune local store on stop
Signed-off-by: Kerry Archibald <kerrya@element.io>
* tests
Signed-off-by: Kerry Archibald <kerrya@element.io>
* update copy pasted copyright to 2022
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-22 12:05:36 +00:00
Kerry
a3a7c60dd7
LLS: Remove beacon info illegal replace relation ( #8390 )
...
* dont apply illegal replace relation to beacon_info event
Signed-off-by: Kerry Archibald <kerrya@element.io>
* only display tiles for beacon infos with live prop
Signed-off-by: Kerry Archibald <kerrya@element.io>
* copyrights
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-22 11:38:27 +00:00
Kerry
73e8387799
test functional EventUtils ( #8386 )
...
* extract poll event test util
Signed-off-by: Kerry Archibald <kerrya@element.io>
* test isContentActionable
Signed-off-by: Kerry Archibald <kerrya@element.io>
* test canEditContent
Signed-off-by: Kerry Archibald <kerrya@element.io>
* test functional eventutils
Signed-off-by: Kerry Archibald <kerrya@element.io>
* copyrights
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-21 18:14:10 +02:00
Emmanuel
9a065581e5
fix rainbow breaks compound emojis ( #8245 )
...
* fix rainbow breaks compound emojis
* use lodash split method for text splitting and add a unit test to test the behaviour
* Update _RichText.scss
* Update colour-test.ts
2022-04-20 14:49:12 +00:00
Kerry
4fb9cd6550
calculate geo bounds ( #8321 )
...
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-19 08:46:57 +02:00
Kerry
b760ec9392
Location sharing - extract isSelfLocation util ( #8279 )
...
* extract isSelfLocation into utils
Signed-off-by: Kerry Archibald <kerrya@element.io>
* replace use of isSelfLocation
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-11 13:58:35 +02:00
Travis Ralston
97efdf7094
Merge branch 'develop' into travis/remove-skinning
2022-03-31 19:25:43 -06:00
Kerry
4922e19b5a
Live Location Sharing - left panel warning with error ( #8201 )
...
* add error style to left panel beacon warning
Signed-off-by: Kerry Archibald <kerrya@element.io>
* test
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add beacon sort util
* link to latest beacon room from left panel warning
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-31 13:51:44 +02:00
Travis Ralston
888d470c56
Step 8.5: Move various room utilities out of `createRoom`
2022-03-28 14:02:31 -06:00
Travis Ralston
a987ead7d2
Step 8.1: Remove skinning setup from all tests
2022-03-28 14:02:31 -06:00
Kerry
d2b97e251e
Live location sharing - handle geolocation errors ( #8179 )
...
* display live share warning only when geolocation is happening
Signed-off-by: Kerry Archibald <kerrya@element.io>
* kill beacons when geolocation is unavailable or permissions denied
Signed-off-by: Kerry Archibald <kerrya@element.io>
* polish and comments
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-28 18:46:39 +02:00
Kerry
e9b2aea97b
Live location sharing - send geolocation beacon events - happy path ( #8127 )
...
* geolocation utilities
Signed-off-by: Kerry Archibald <kerrya@element.io>
* messy send events
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add geolocation services
Signed-off-by: Kerry Archibald <kerrya@element.io>
* geolocation tests
Signed-off-by: Kerry Archibald <kerrya@element.io>
* debounce with backup emit every 30s
Signed-off-by: Kerry Archibald <kerrya@element.io>
* import reorder
Signed-off-by: Kerry Archibald <kerrya@element.io>
* some more working tests
Signed-off-by: Kerry Archibald <kerrya@element.io>
* complicated timeout testing
Signed-off-by: Kerry Archibald <kerrya@element.io>
* publish first location immediately
Signed-off-by: Kerry Archibald <kerrya@element.io>
* move advanceDateAndTime to utils, tidy
Signed-off-by: Kerry Archibald <kerrya@element.io>
* typos
Signed-off-by: Kerry Archibald <kerrya@element.io>
* types and lint
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-28 10:48:38 +00:00
Kerry
1397652f52
Extract location utils from components ( #8152 )
...
* extract util functions from MLocationBody
Signed-off-by: Kerry Archibald <kerrya@element.io>
* disassemble mlocationbody
Signed-off-by: Kerry Archibald <kerrya@element.io>
* tidy and add copyrights
Signed-off-by: Kerry Archibald <kerrya@element.io>
* move types and utils from components/location to utils
Signed-off-by: Kerry Archibald <kerrya@element.io>
* i18n
Signed-off-by: Kerry Archibald <kerrya@element.io>
* empty line
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-25 15:36:22 +01:00
Kerry
0d513b3a2d
geo.getCurrentPosition and some testing helpers ( #8150 )
...
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-25 12:30:50 +01:00
Kerry
1495c23a14
Live location sharing: geolocation utilities ( #8126 )
...
* geolocation utilities
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove debug
Signed-off-by: Kerry Archibald <kerrya@element.io>
* comments for ts-ignores
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-23 17:08:56 +00:00
Travis Ralston
fce36ec826
Delete groups (legacy communities system) ( #8027 )
...
* Remove deprecated feature_communities_v2_prototypes
* Update _components
* i18n
* delint
* Cut out a bit more dead code
* Carve into legacy components
* Carve into mostly the room list code
* Carve into instances of "groupId"
* Carve out more of what comes up with "groups"
* Carve out some settings
* ignore related groups state
* Remove instances of spacesEnabled
* Fix some obvious issues
* Remove now-unused css
* Fix variable naming for legacy components
* Update i18n
* Misc cleanup from manual review
* Update snapshot for changed flag
* Appease linters
* rethemedex
* Remove now-unused AddressPickerDialog
* Make ConfirmUserActionDialog's member a required prop
* Remove useless override from RightPanelStore
* Remove extraneous CSS
* Update i18n
* Demo: "Communities are now Spaces" landing page
* Restore linkify for group IDs
* Demo: Dialog on click for communities->spaces notice
* i18n for demos
* i18n post-merge
* Update copy
* Appease the linter
* Post-merge cleanup
* Re-add spaces_learn_more_url to the new SdkConfig place
* Round 1 of post-merge fixes
* i18n
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2022-03-22 23:07:37 +00:00
Kerry
a80e55d38d
add helpers for beacon duration calculations ( #8101 )
...
* add helpers for beacon duration calculations
Signed-off-by: Kerry Archibald <kerrya@element.io>
* makeBeaconInfoEvent timestsamp prop
Signed-off-by: Kerry Archibald <kerrya@element.io>
* ad copyright
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-22 10:46:47 +00:00
Kerry
14653d1378
Live location share - set time limit ( #8082 )
...
* add mocking helpers for platform peg
Signed-off-by: Kerry Archibald <kerrya@element.io>
* basic working live duration dropdown
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add duration format utility
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add duration dropdown to live location picker
Signed-off-by: Kerry Archibald <kerrya@element.io>
* adjust style to allow overflow and variable height chin
Signed-off-by: Kerry Archibald <kerrya@element.io>
* tidy comments
Signed-off-by: Kerry Archibald <kerrya@element.io>
* arrow fn change
Signed-off-by: Kerry Archibald <kerrya@element.io>
* lint
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-21 12:42:58 +01:00
Travis Ralston
d8a939df5d
Use & enforce snake_case naming convention on config.json settings ( #8062 )
...
* Document and support the established naming convention for config opts
This change:
* Rename `ConfigOptions` to `IConfigOptions` to match code convention/style, plus move it to a dedicated file
* Update comments and surrounding documentation
* Define every single documented option (from element-web's config.md)
* Enable a linter to enforce the convention
* Invent a translation layer for a different change to use
* No attempt to fix build errors from doing this (at this stage)
* Add demo of lint rule in action
* Fix all obvious instances of SdkConfig case conflicts
* Fix tests to use SdkConfig directly
* Add docs to make unset() calling safer
* Appease the linter
* Update documentation to match snake_case_config
* Fix more instances of square brackets off SdkConfig
2022-03-18 10:12:36 -06:00
Germain
4e4ce65f58
Use redaction enum event type rather than hardcoded string ( #8071 )
2022-03-17 18:38:29 +01:00
Kerry
9082e07ff4
include test/utils in tsconfig ( #8024 )
...
* fix export-test.tsx
Signed-off-by: Kerry Archibald <kerrya@element.io>
* include test/utils to tsconfig
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-03-10 18:15:31 +00:00
Michael Telatynski
f25e6813bb
Mandate use of js-sdk/src/matrix import over js-sdk/src ( #7933 )
2022-03-01 20:42:05 +00:00
David Baker
1a6134e441
Fix another freeze on room switch ( #7900 )
...
* Fix another freeze on room switch
This switches permalinks to use the batch state update event and
removes the incremental updates, as commented. We now spend, on my
profiling, about 450ms in setOutOfBandMembers itself and another
120ms in permalinks.
Fixes https://github.com/vector-im/element-web/issues/21127
* Just bind to the currentstate state updates
2022-02-25 19:48:35 +00:00
David Baker
81cda7c749
Fix freeze on room switch ( #7884 )
...
* Fix freeze on room switch
updateServerCandidates was called on every room member event and
not throttled.
Fixes https://github.com/vector-im/element-web/issues/21127
* Move import
* Disable throttling in tests
* Types
Co-authored-by: Travis Ralston <travisr@matrix.org>
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-02-23 19:16:12 +00:00
Kerry
5e76d988ca
convert test-utils to typescript ( #7877 )
...
* move js utils into directory
Signed-off-by: Kerry Archibald <kerrya@element.io>
* typescripterize js test-utils
Signed-off-by: Kerry Archibald <kerrya@element.io>
* move test utils to directory
Signed-off-by: Kerry Archibald <kerrya@element.io>
* move remaining mock functions to directory
Signed-off-by: Kerry Archibald <kerrya@element.io>
* update imports
Signed-off-by: Kerry Archibald <kerrya@element.io>
* missed copyright
Signed-off-by: Kerry Archibald <kerrya@element.io>
* type wait for update
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-23 11:21:11 +00:00
Michael Telatynski
7fa01ffb06
Improve typing around event emitter handlers ( #7816 )
2022-02-22 12:18:08 +00:00
Kerry
9db59d75b9
Bump react-focus-lock ( #7858 )
...
* react-focus-lock to 2.5.1
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use enzyme in ASSD test so focus lock finds active element
Signed-off-by: Kerry Archibald <kerrya@element.io>
* findById and flushPromises to test utils
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-21 17:09:01 +00:00
Kerry
8b9263c808
Clean up some unit test logs ( #7857 )
...
* kill some unit test logs in arrays-test
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove mock logs that are asserted against anyway
* remove more logs
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix safeCOunterpartTranslate warnings in tests
Signed-off-by: Kerry Archibald <kerrya@element.io>
* more safeCounterpartTranslate warnings
Signed-off-by: Kerry Archibald <kerrya@element.io>
* lint
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove more logs
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add helper
Signed-off-by: Kerry Archibald <kerrya@element.io>
* naming
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-21 16:57:44 +00:00
Kerry
818fddd72c
Add customisation point to disable space creation ( #7766 )
...
* mock matchMedia in jest setup
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use UIComponent.CreateSpaces in space panel
Signed-off-by: Kerry Archibald <kerrya@element.io>
* lint
Signed-off-by: Kerry Archibald <kerrya@element.io>
* hide add space in spacecontextmenu
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use UIComponent customistations in space oom view add space button
Signed-off-by: Kerry Archibald <kerrya@element.io>
* copyright
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-09 17:21:40 +01:00
Kerry
292971dd0e
Upgrade to jest 27 ( #7699 )
...
* use jest@27.4.0, replace jest-environment-jsdom-sixteen with jest-environment-jsdom
Signed-off-by: Kerry Archibald <kerrya@element.io>
* polyfill setImmediate
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove done from async test cases
* useRealTimers in test relying on promise flushing
Signed-off-by: Kerry Archibald <kerrya@element.io>
* remove jest environment file
Signed-off-by: Kerry Archibald <kerrya@element.io>
* replace ts-jest mocked with jest utils mocked
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-02-02 13:02:17 +01:00
Kerry
085ecc7f5f
Chat export parameter customisation ( #7647 )
...
* use export settings and hide fields
Signed-off-by: Kerry Archibald <kerrya@element.io>
* fix exporter tests
Signed-off-by: Kerry Archibald <kerrya@element.io>
* test ExportDialog with settings
Signed-off-by: Kerry Archibald <kerrya@element.io>
* tidy debugs, rename setting to Parameters
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use reasonable 100gb limit
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use normal setting instead of UIFeature
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use a customisation
Signed-off-by: Kerry Archibald <kerrya@element.io>
* move validateNumberInRange to utils
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use nullish coalesce
Signed-off-by: Kerry Archibald <kerrya@element.io>
* use 8gb size limit for customisation
Signed-off-by: Kerry Archibald <kerrya@element.io>
* update comments
Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-01-31 12:54:14 +01:00
Michael Telatynski
fcc4939075
Fix naming of set-theory utils to match convention ( #7343 )
2021-12-13 10:57:51 +00:00
Dominik Henneke
908e938996
Keep all previously approved widget capabilities when requesting new capabilities ( #7340 )
2021-12-13 10:34:04 +00:00
Aaron Raimist
7b94e13a84
Merge branch 'develop' into sort-imports
...
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-12-09 08:34:20 +00:00
Travis Ralston
08cd8926e6
Fix a couple relative date tests ( #7184 )
2021-11-23 11:29:23 -07:00
Germain
2a20d9a7df
Display relative time in thread panel event tile ( #7068 )
...
* Null-guard for missing root event in thread panel
* Add formatRelativeTime date utility
* Display relative time format in thread panel event tiles
2021-11-03 10:16:50 +00:00
Aaron Raimist
027b3660bb
Manual fixes
...
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-10-22 17:49:12 -05:00
Aaron Raimist
bdc56be863
Auto fix
...
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-10-22 17:23:37 -05:00
Jaiwanth
94e4fb71c1
Merge branch 'develop' into export-conversations
2021-09-22 18:07:01 +05:30
Šimon Brandner
9c107ae615
Add tests for formatSeconds()
...
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-08-27 16:20:29 +02:00
Jaiwanth
7207329c15
Apply review suggestions
2021-08-13 23:44:07 +05:30
Jaiwanth
9cbdc4a613
Use throw error instead of try-catch
2021-08-13 08:34:54 +05:30
Jaiwanth
edfc8af6cf
Apply PR Suggestions
2021-08-13 08:30:50 +05:30
Jaiwanth
e396dcfb10
Remove @types/streamsaver
2021-08-10 13:22:40 +05:30
Jaiwanth
ecf0aba97c
Test for different types of events
2021-08-10 12:25:51 +05:30
Jaiwanth
900accd823
Add test for renderToString
2021-08-09 13:25:32 +05:30
Jaiwanth
850b5452a0
Add tests for reply regex
2021-08-09 12:36:06 +05:30
Jaiwanth
45ce352d02
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into export-conversations
2021-08-09 10:44:13 +05:30
Jaiwanth
c74d6c6fff
Assign replacements
2021-08-04 12:48:32 +05:30
David Baker
28f5dc483b
Update eslint plugin & fix silly indenting
...
As per https://github.com/matrix-org/eslint-plugin-matrix-org/pull/15
this caused a bunch of silly indenting to creep in, so this fixes it
back to the previous style.
2021-08-03 17:07:37 +01:00