Commit Graph

67 Commits (7f0621e84da1965076a8ad14fe76777abc8b5ce9)

Author SHA1 Message Date
Michael Telatynski f1e8e7f140
Enable `@typescript-eslint/explicit-member-accessibility` on /src (#9785)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src

* Prettier
2022-12-16 12:29:59 +00:00
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
Travis Ralston f92f7beb47
Delete the remainder of groups (#9357)
* Delete the remainder of groups

Fixes https://github.com/vector-im/element-web/issues/22770
Continues https://github.com/matrix-org/matrix-react-sdk/pull/8027

* Don't need the strings either
2022-10-05 17:44:46 +00:00
Michael Telatynski 4a23630e06
Fix soft crash around inviting invalid MXIDs in start DM on first message flow (#9281)
* Fix soft crash around inviting invalid MXIDs

* Make ts --strict happier

* Prevent suggesting invalid MXIDs

* Add tests

* Fix coverage

* Fix coverage

* Make tsc --strict happier

* Fix test

* Add tests
2022-09-16 09:03:17 +01:00
Michael Telatynski 0bc2f1c101
Fix event list summaries including invalid events (#9041) 2022-07-11 16:25:11 +01:00
Travis Ralston 7f5bb61a79
Support a module API surface for custom functionality (#8246)
* Early implementation of module API surface + functions for ILAG module

* Wire up dialog functions and ILAG-needed surface

* Ensure component renders for modules get overridden

* Respond to changes from module API interface

* Use a real module-api dependency

* Update for new Dialogs interface

* Add support for getConfigValue from module API

* Update the remainder of the module API interface

* Docs & cleanup

* Add some unit tests around module stuff

Needs end-to-end tests still.

* Appease early linters

* Break import cycles by not directly depending on Lifecycle

* Appease the linter

* Fix bad merge
2022-07-05 12:26:44 -06:00
Travis Ralston 548290b006
Run a minor code quality checker over the repo (#8524)
* Run a minor code quality checker over the repo

Largely targeted at spelling of common words and misc code issues.

* Update snapshots
2022-05-09 22:52:05 +00:00
Michael Telatynski 964c60d086
Apply corrections identified by SonarQube (#8457) 2022-05-03 22:04:37 +01:00
Robin b114c5e239
Improve performance of switching to rooms with lots of servers and ACLs (#8347)
* Improve performance of switching to rooms with lots of servers and ACLs

By not processing the *entire* list of servers and ACLs when determining
how to create permalinks, this shaves ~100 ms off of switches into
high-traffic rooms.

* Fix lint

* Ensure that permalink server candidates can't be duplicates
2022-04-17 16:50:03 +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
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
Michael Telatynski 16e67e7716
Wrap all EventTiles with a TileErrorBoundary and guard parsePermalink (#7916)
Co-authored-by: Travis Ralston <travisr@matrix.org>
2022-03-01 08:41:48 +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
Michael Telatynski 7fa01ffb06
Improve typing around event emitter handlers (#7816) 2022-02-22 12:18:08 +00:00
Michael Telatynski 760d269671
Fix relative link handling in Element Desktop (#7708) 2022-02-03 08:55:49 +00:00
J. Ryan Stinnett fad65f9582
Add body link fallback handler for in-app navigation (#7627) 2022-01-25 14:31:00 +00:00
Travis Ralston 6712a5b1c5
Parse matrix-schemed URIs (#7453)
Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
Co-authored-by: Dariusz Niemczyk <dariuszn@element.io>
Co-authored-by: Timo K <toger5@hotmail.de>

With this pr all href use matrix matrix.to links. As a consequence right-click copy link will always return get you a sharable matrix.to link.
2022-01-20 18:18:47 +01:00
Aaron Raimist 2e8a93834b Auto fix
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-12-09 09:10:23 +00:00
Dariusz Niemczyk 961fec9081
Refactor matrix-linkify module (#7279)
Refactor the module to make it easier for upgrade and proper separation of code contexts
2021-12-03 14:00:56 +00:00
Dariusz Niemczyk 5290afcc4c Replace console.warn with logger.warn
Related https://github.com/vector-im/element-web/issues/18425
2021-10-18 14:08:23 +02:00
J. Ryan Stinnett ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Aaron Raimist 946416cf87
Make serverCandidates optional
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-06-07 17:09:56 -05:00
Aaron Raimist a5bf17ff65
Revert incorrect change to forShareableRoom
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-06-07 16:54:41 -05:00
Aaron Raimist ccdd2311f4
Make "share this room" use aliases if possible
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-05-29 01:38:47 -05:00
Aaron Raimist 53ebf3b8e3
Don't include via when sharing room alias
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2021-05-29 01:37:22 -05:00
Michael Telatynski dd04b479a1 Wrap decodeURIComponent in try-catch to protect against malformed URIs 2021-05-13 10:20:27 +01:00
Travis Ralston f0f875d1e2 Merge branch 'develop' into handle-encoded-urls 2021-04-28 09:53:16 -06:00
J. Ryan Stinnett b8203043be Add types to Permalinks 2021-04-27 12:11:23 +01:00
J. Ryan Stinnett b8a915bb76 Tweak private / underscores for fields and methods 2021-04-26 14:02:53 +01:00
J. Ryan Stinnett d7e6f4b4b5 Add basic types 2021-04-23 17:05:50 +01:00
J. Ryan Stinnett 31a28b1a9e Update extensions for some files with types
This migrates one bucket of files using some amount of Flow typing to mark them
as TypeScript instead. The remaining type errors are fixed in subsequent
commits.
2021-04-23 16:05:30 +01:00
Jaiwanth f2d0a56c1f Handle encoded matrix urls
Signed-off-by: Jaiwanth <jaiwanth2011@gmail.com>
2021-04-22 16:54:51 +05:30
Michael Telatynski 1a7a0e619d extend createRoom for creating rooms in a space 2021-03-01 19:05:50 +00:00
J. Ryan Stinnett 474c029db5 Fix permalink via parsing for rooms
This adjusts the app local link parsing path to better handle `via`s in query
params. Previously this path only expected them when an event ID was also
present, but it's also valid to have `via`s without event IDs as well.

Fixes https://github.com/vector-im/element-web/issues/16345
2021-02-03 15:18:19 +00:00
J. Ryan Stinnett fd7c50f683 Move route splitting inside route parsing 2021-02-03 14:05:22 +00:00
J. Ryan Stinnett fa3ace8473 Rework message pilling to ignore event permalinks
This removes pills from event permalinks since they hide the text associated
with the link, which can cause nonsensical messages since words have been
removed. In addition, this moves away from fragile regexs to more
straightforward code to parse links and adds a test for this case.

Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/5188
Fixes https://github.com/vector-im/element-web/issues/15159
2021-01-27 11:46:20 +00:00
J. Ryan Stinnett 162a5de82e Rename and reformat Element URL pattern
This is just a code style cleanup. There are no behaviour changes in this
commit.
2020-12-21 13:05:45 +00:00
Simon Merrick 5544ee6408 extract alias handling to separate function 2020-12-06 23:29:11 +13:00
Simon Merrick cf8c98e076 More explicit reference checking 2020-12-02 12:34:43 +13:00
Simon Merrick e92ac67152 Use room alias in generated permalink for rooms
Signed-off-by: Simon Merrick <s.m3rrick@gmail.com>
2020-11-28 21:50:51 +13:00
Travis Ralston dacc7bc111 Rebrand Riot -> Element in the permalink classes 2020-11-02 21:46:48 -07:00
Michael Telatynski 1b99c11b11 tidy 2020-09-08 15:09:45 +01:00
Michael Telatynski d0c716d61c Fix permalink local linkification to not strip via servers 2020-09-08 10:26:37 +01:00
Travis Ralston d820356990 Convert alias links in room header topics to local permalinks
Fixes https://github.com/vector-im/riot-web/issues/12605
2020-03-04 13:56:58 -07:00
Travis Ralston f1ac3d2f64 Convert imports to ES6 from CommonJS
This is needed because `require()` means something different in webpack - it ends up importing the module as something we didn't expect (and is occasionally async)
2019-12-22 21:16:06 -07:00
Travis Ralston 042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Travis Ralston 806d728d59 Import from the js-sdk's src/ directory
Because ES6 and such.
2019-12-22 21:14:33 -07:00
Travis Ralston be4eeb5e07 Fix js-sdk imports for new module 2019-12-22 21:10:26 -07:00
Michael Telatynski 857f086501 Fix ?via= args in SpecPermalinkConstructor.js
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-12-03 00:05:19 +00:00