We move all of the event tile rendering into a factory manager for a couple reasons:
1. `EventTile` is uncomfortably large for a file
2. A simple map isn't possible anymore (can't convert the existing maps like `eventTileTypes` to `Record<string, typeof React.Component>` because the types are actually incompatible)
So, by having a factory manager place we can more easily render components without having to use `getComponent()` all over the place, and without lying to ourselves about how simple the event rendering path is.
This change also moves quite a bit of the rendering path into the new `EventTileFactory` file so it can be easily seen by future developers.
* Add utility for getting connected voice participants
* Allow voice room members to send connected device state
* Update connected devices when connecting/disconnecting voice
* Show voice room participants in room tile when not connected
* Update voice room tests
* Add null types and guards
* 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>
* Add voice room labs flag
Signed-off-by: Robin Townsend <robin@robin.town>
* Add more widget actions for interacting with Jitsi
Signed-off-by: Robin Townsend <robin@robin.town>
* Factor out a more generic Jitsi creation utility
Signed-off-by: Robin Townsend <robin@robin.town>
* Add utilities for managing voice channels
Signed-off-by: Robin Townsend <robin@robin.town>
* Enable creation of voice rooms
Signed-off-by: Robin Townsend <robin@robin.town>
* Force a maximized view of voice channel widgets
Signed-off-by: Robin Townsend <robin@robin.town>
* Add voice channel store
Signed-off-by: Robin Townsend <robin@robin.town>
* Factor out a more generic FacePile
Signed-off-by: Robin Townsend <robin@robin.town>
* Implement room tile changes for voice rooms
Signed-off-by: Robin Townsend <robin@robin.town>
* Add interactive radio component to the left panel
Signed-off-by: Robin Townsend <robin@robin.town>
* Test voice rooms
Signed-off-by: Robin Townsend <robin@robin.town>
* Update name of call room type
Signed-off-by: Robin Townsend <robin@robin.town>
* Clarify that voice rooms are under development
Signed-off-by: Robin Townsend <robin@robin.town>
* Use readonly
Signed-off-by: Robin Townsend <robin@robin.town>
* Move acks to the end of handlers
Signed-off-by: Robin Townsend <robin@robin.town>
* Add comment about avatar URLs coming from Jitsi
Signed-off-by: Robin Townsend <robin@robin.town>
* Don't use unicode ellipses
for translation reasons?
Signed-off-by: Robin Townsend <robin@robin.town>
* Fix tests
Signed-off-by: Robin Townsend <robin@robin.town>
* Fix tests, again
Signed-off-by: Robin Townsend <robin@robin.town>
* Remove unnecessary export
Signed-off-by: Robin Townsend <robin@robin.town>
* Ack Jitsi events when we wait for them
Signed-off-by: Robin Townsend <robin@robin.town>
* 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
* Don't assume that widget IDs are unique
Signed-off-by: Robin Townsend <robin@robin.town>
* Don't remove live tiles that don't exist
Signed-off-by: Robin Townsend <robin@robin.town>
* Add unit test for AppTile's live tile tracking
Signed-off-by: Robin Townsend <robin@robin.town>
* Allow pinning polls
Signed-off-by: Robin Townsend <robin@robin.town>
* Show responses to pinned polls
Signed-off-by: Robin Townsend <robin@robin.town>
* Use enums more
Signed-off-by: Robin Townsend <robin@robin.town>
* UIComponent flag: Explore rooms
To disable the room directory access on the Home space. Can be controlled with the existing ComponentVisibilityCustomisation
* Make "plus menu" respect component visibility
* UIComponent flag: Add integrations
To disable the widgets section of the room info card and addwidget slashcommand. Can be controlled with the existing ComponentVisibilityCustomisation
* Make sure invite users component applies to space rooms too
* Appease the linter
* 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
* 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>
* Don't pillify code blocks
Signed-off-by: Robin Townsend <robin@robin.town>
* Test that pills do not appear in code blocks
Signed-off-by: Robin Townsend <robin@robin.town>
* Use snapshot instead for test
Signed-off-by: Robin Townsend <robin@robin.town>
MSC: https://github.com/matrix-org/matrix-doc/pull/2918
Fixes https://github.com/vector-im/element-web/issues/18698
Fixes https://github.com/vector-im/element-web/issues/20648
**Requires https://github.com/matrix-org/matrix-js-sdk/pull/2178**
**Note**: There's a lot of logging in this PR. That is intentional to ensure that if/when something goes wrong we can chase the exact code path. It does not log any tokens - just where the code is going. Overall, it should be fairly low volume spam (and can be relaxed at a later date).
----
This approach uses indexeddb (through a mutex library) to manage which tab actually triggers the refresh, preventing issues where multiple tabs try to update the token. If multiple tabs update the token then the server might consider the account hacked and hard logout all the tokens.
If for some reason the timer code gets it wrong, or the user has been offline for too long and the token can't be refreshed, they should be sent to a soft logout screen by the server. This will retain the user's encryption state - they simply need to reauthenticate to get an active access token again.
This additionally contains a change to fix soft logout not working, per the issue links above.
Of interest may be the IPC approach which was ultimately declined in favour of this change instead: https://github.com/matrix-org/matrix-react-sdk/pull/7803
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.
* Move all polls processing to events-sdk
This makes polls support the full range of extensible events (both parsing and generation).
* Appease the linter
* Fix & update tests
* Update events-sdk for polls bugfix
* Update events-sdk for typechecking
* Add missing type cast
* Update per review
* Move user avatar to Space panel
* Add room list header for 'Home' or 'Space Name' to room list
Add existing Space context menus to room list header
* Re-add pending room join spinner
* Iterate RoomListHeader plus context menu
* Iterate space context menu
* Iterate room list + interactions
* Move DND to new iA model
* Replace composer custom status management with usermenu one
* Cull Quick Actions
* Iterate minimized room list state
* delint
* Merge the RoomListNumResults into the RoomListHeader
* Make the search shortcut prompt semi-bold
* Iterate RoomListHeader based on design review
* Iterate UserMenu based on feedback
* Add name to expanded spacepanel usermenu button
* i18n
* Make room sub list aux button components more generic
* Change left panel explore button to only refer to room directory
* Iterate RoomListHeader
* Fix custom user status input field width in Chrome
* Bring back Notification settings button
* delint
* i18n
* post-merge fix
* iterate pr
* Remove unused state
* update copy
* Apply suggestions from PR review
* delint
* Update invite iconography
* Iterate Space context menu to match Figma
* Fix chevron alignment
* Fix edge case for RoomListHeader on metaspaces
* Wire up general rageshake-driven feedback mechanism
* Add IA1.1 info toast
* add missing alt attribute
* delint
* delint
* tweak ia toast priority
* e2e test account for new toast
* autofocus feedback field and remove old subheading
* tweak copy
* Iterate space panel colours to match Figma
* Iterate PR
* delint
* Fix feedback submission with object setting values
* iterate based on review
* Tweak colours and update splash image
* Tweaks based on review
* Remove room list prompt, made redundant by the big fat `+`
* Fix edge cases around User Menu positioning and dnd
* Add missing import, bad merge?
* Update aria label in e2e test
* Fix room list space rooms context menu explore button behaviour
* Tweak copy
* Revert order of options in the UserMenu
* Tweak copy
* i18n
* Display started polls in timeline (without votes)
* Update i18n info
* Keep original background colour of poll options, even on hover
* Show full avatar above a poll message
* Fix infinite rerender loop when editing message
* Refactor "edit_event" to Action.EditEvent
* Make up-arrow edit working in Threads
* Properly handle timeline events edit state
* Properly traverse messages to be edited
* Add MatrixClientContextHOC
* Refactor RoomContext to use AppRenderingContext
* Typescriptify test
Co-authored-by: Germain <germains@element.io>
* develop: (22 commits)
Fix long display names in call toasts
Fix import
Add MatrixEvent type
Convert CrossSigningPanel to TS
Fix PiP of held calls
Use new call state icons
Add declined call buttons
Add "No answer" state
Left align call tiles
Fix tab trapping behaviour
add comment
Iterate PR based on feedback
Iterate PR, merge types with @types/PushRules
Remove misplaced bracket in a translation string
delint and improve ts
Convert SearchResult, InteractiveAuth, PushProcessor and Scheduler to Typescript
remove dead code and fix some types
delint
post-merge fixes, the new keybindings stuff made it messy
Improve VoiceOver & WebKit accessibility support
...
* origin/develop: (1278 commits)
Add a little padding
Keep number field in focus when pressing dialpad buttons (#6520)
Remove old version
Fix video call persisting when widget removed
Update link to matrix-js-sdk CONTRIBUTING file (#6557)
$toast-bg-color -> $system
$system-... -> $system
Iterate PR based on feedback
Remove unnecessary code
Use AccessibleTooltipButton
Just upload the PR object itself
Edit PR Description instead of commenting
publish the right directory
Fix Netflify builds from fork PRs
This doesn't need to be here as it was moved into CallViewButtons
Make scrollbar dot transparent
Iterate PR based on feedback
Don't set hidden RRs labs setting at account level
Add a comment for weirdly placed div
Add full class names to animations.scss
...
With help from Palid.
This does two major things:
1. Makes the tile part of a file body clickable to trigger a download.
2. Refactors a lot of the recyclable code out of the DownloadActionButton in favour of a utility. It's not a perfect refactoring, but it sets the stage for future work in the area (if needed).
The refactoring still has a heavy reliance on being supplied an iframe, but simplifies the DownloadActionButton and a hair of the MFileBody download code. In future, we'd probably want to make the iframe completely managed by the FileDownloader rather than have it only sometimes manage a hidden iframe.