* feat: add props to hide header in `RoomView`
* feat: add props to hide composer in `RoomView`
* feat: pass `RoomViewProps` to room view in `renderRoomView`
* refactor: add doc and use existing types
* test: add tests for new room view props
* strip mentions from forwarded messages
fixeselement-hq/element-web#30883
* call attachMentions() for empty m.mentions in forwarded messages
As there is no EditorModel, attachMentions() currently does nothing
* fix lint and typecheck
* update test "should be navigable using arrow keys"
* update test "forwards pin drop event"
add empty mentions to expected content
* add doc to transformEvent() & elaborate on attachMentions()
* add test "strips mentions from forwarded messages"
* fix lint
* update source of `attachMentions()` import
---------
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
* Module API experiments
* Move ResizerNotifier into SDKContext
so we don't have to pass it into RoomView
* Add the MultiRoomViewStore
* Make RoomViewStore able to take a roomId prop
* Different interface to add space panel items
A bit less flexible but probably simpler and will help keep things
actually consistent rather than just allowing modules to stick any
JSX into the space panel (which means they also have to worry about
styling if they *do* want it to be consistent).
* Allow space panel items to be updated
and manage which one is selected, allowing module "spaces" to be
considered spaces
* Remove fetchRoomFn from SpaceNotificationStore
which didn't really seem to have any point as it was only called from
one place
* Switch to using module api via .instance
* Fairly awful workaround
to actually break the dependency nightmare
* Add test for multiroomviewstore
* add test
* Make room names deterministic
So the tests don't fail if you add other tests or run them individually
* Add test for builtinsapi
* Update module api
* RVS is not needed as prop anymore
Since it's passed through context
* Add roomId to prop
* Remove RoomViewStore from state
This is now accessed through class field
* Fix test
* No need to pass RVS from LoggedInView
* Add RoomContextType
* Implement new builtins api
* Add tests
* Fix import
* Fix circular dependency issue
* Fix import
* Add more tests
* Improve comment
* room-id is optional
* Update license
* Add implementation for AccountDataApi
* Add implementation for Room
* Add implementation for ClientApi
* Create ClientApi in Api.ts
* Write tests
* Use nullish coalescing assignment
* Implement openRoom in NavigationApi
* Write tests
* Add implementation for StoresApi
* Write tests
* Fix circular dependency
* Add comments in lieu of type
and fix else block
* Change to class field
---------
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
* Make shared component build work in isolation
* Add deps that were missing because they were getting picked up
from element-web main but shared-components needs itself
* Exclude test files from dts generation
* Bump version
* Change all the shared-component import to be the built artifact
* Don't randomly inhale eslint configs in parent dirs please
* maybe we don't need this anymore?
* maybe fix build
* Maybe fix docker build
* More build faff
* build:res on the parent as part of shared component prepare
* link shared component repo inn docker build
* 💅
* 💅x2
* Try converting the translation keys to a .d.ts file manually
so it gets bundled rather than left as a relative import to the json
file
* add the script
* Add this back for 2nd time now I think
* Shouldn't need this anymore
* patch-package on prepare
because we're patching a dev dependency so it won't be there if we're
installed as a dependency
* Unused import
* Prettier compliance
* Only use counterpart from shared components
as per comment
* Import shared components CSS
* Prettier
* Call the one from shared components
rather than recurse infinitely
* Hopefully make tests work
* wake up, comment goes before import
* Fix lint errors
* Fix dupe TranslationKey export
* Update compound-web to fix type error
An update to @types.react adds the 'hint' value to the enum of the
'popover' attribute and this version of compound-web uses the maching
verson of @types/react so they don't conflict.
* Maybe, hopefully, get the types working?
Please?
* Add copyright header to i18nkeys
as eslint complains otherwise since it's now in src
* prettier
* stop running shared-component tests in EW
* update snapshots
because flex is now from an external stylesheet I guess
* More snapshots
* Manual class update
* Avoid bundling compound bits
Because a) it's silly and b) it means we end up bundling a copy of
floating-ui too which causes absolute madness with its useDelayGroup
contexts.
* ignore test util files for coverage
* Add !important
because the styles are being applied in a different order now
* Another !important because css order has changed
* Try adding it here to make the test files ignored
* More !important
* commit yarn lock change
* Add shared components coverage file
* Update snapshots
Because the line height was being overridden to 22.5px somehow by
something I can't find, and now isn't: surely the normal 1.5rem is
more sensible.
* Update snapshots, attempt 2
* Another !important
* More snapshot updates
* Add test for i18n wrappers
& add test script
* lint
* Prettier
* Hopefully run shared component tests
* don't need this bit for non-matrix
* install ew deps
* rigfht coverage location
* Rename job here too
* Try different coverage filename
* Fix copyrights & comment
* Typo
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Only set active descendant when the user starts typing.
* Fix jest tests.
* Remove aria-hidden
It was failing code quality checks and it actually wasn't addressing the issue.
* Only show highlight on arrow key navigation or updating the search query.
* Update screenshots
* Enter should not select an emoji if it is not highlighted.
* On clearing a query and using arrow kets again the highlighted emoji should be reset to the first.
* Update selector in picker tests
* Fix tooltips within context menu portals being unreliable
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* fix(list view): avoid re-create `onFocus` function at each render of the child items
* fix(room list): update `onFocus` signature
* fix(member list): update `onFocus` signature
* fix(room list): avoid re-render at the beginning and end of the scroll
* test(room list): remove scrolling test and props
* test(member list): update member tile view tests
* test(room list): update `ListView` focus test
* test(member list): add `onFocus` test for member list tile
* We should focus the node in the DOM so that the browser focus(with outline) matches the our internal RovingIndex state
* Don't move focus from the input if we are in "virtual" focus(via active descendant)
* add devtool for viewing users and their devices
* show number of devices
* apply changes from review
* Fix typo
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>
* Show timestamps when keyboard focus is within an event tile
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Ensure toolbar navigation pattern works in MessageActionBar
This requires all buttons within to be roving by using the ref callback given by useRovingTabIndex
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use PureComponent in EventTile to avoid mass re-rendering due to transitive onFocus/onBlur calls
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove unused timestamp event tile prop
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use MessageTimestamp to generate the wrapping anchor so that focusing it brings up the tooltip
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak MessageTimestamp
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Switch back to Component as we specify a shouldComponentUpdate already
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update jest tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update playwright timestamp masks
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Revert snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix IRC layout
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use PureComponent in EventTile to avoid mass re-rendering due to transitive onFocus/onBlur calls
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove unused timestamp event tile prop
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use MessageTimestamp to generate the wrapping anchor so that focusing it brings up the tooltip
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak MessageTimestamp
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Switch back to Component as we specify a shouldComponentUpdate already
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update jest tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update playwright timestamp masks
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Revert snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix IRC layout
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Lint styles
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix layout picker
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix pcss comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate Playwright
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate Playwright
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Pass roomViewStore to the RoomView and add to the RoomContext.
* lint
* lint
* Make constants more DRY
* Make constants more DRY
* Commend non-null assertion on roomViewStore property of the RoomContext
* Update tsdocs.
* Fix sort order in space hierarchy
To match spec and not add unexpected sorting by space vs room
* Update SpaceHierarchy.tsx
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update snapshot
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix highlights in messages (or search results) breaking links
Fixes#17011 and fixes#29807, by running the linkifier that turns text into links before the highlighter that adds highlights to text.
* Fix jest test
* Fix tests related to emojis and pills-inside-spoilers
* Remove dead code
* Address review comments around sanitizeParams
* Address review comment about linkify-matrix
* Fix code style
* Refactor if statement per review
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Change module API to be an instance getter
Helps with circular dependencies by not instantating the module API
on the initial evaluation of the files.
* Add basic test
* add another test
* fix: same member count in header and member list
* test: update test
* chore: use `useRoomMemberCount` to compute member count in member list
* test: add event emitter function on mocked `room.currentState`
* Move ResizerNotifier into SDKContext
so we don't have to pass it into RoomView
* Fix test
* Unused import
* Add tests
* Remove a bunch of resizeNotifier props
* Remove more resizeNotifier props
* Add resizenotifier to test
* Add more sdkcontext wrappers in tests
* More sdkcontext wrappers
* Even more sdkcontext wrappers
* Add test to make sonarcloud happy
* Context isn't always there unlike props
* Test actual resizing too
* Remove commented line
* update key storage toggle when key storage status changes
Listen for the CryptoEvent.KeyBackupStatus event and update the state
when it changes.
* fixup! update key storage toggle when key storage status changes
* add comment about handling event
* Change 'Verify Session' to 'Start Verification'
* Update strings for the verification dialog
This completes the Element Web part of
https://github.com/element-hq/element-meta/issues/2898
* fixup! Update strings for the verification dialog
Remove separate _unsent string
* Test that VerificationRequestDialog updates when phase changes
* Change the title of VerificationRequestDialog when a request is cancelled
Part of implementing
https://github.com/element-hq/element-meta/issues/2898 but split out as
a separate change because it involves making VerificationRequestDialog
listen for changes to the verificationRequest so it can update based on
changes to phase.
* Add support for emoji suggestions
To both the rich text/plain text modes of the RTE.
* Add emoji completion test to WysiwygComposer
* Fix code as per test case, do no-op for community case
* bump wysiwyg to the version with suggestions supported.
* Add more unit tests for processTextReplacement
* Simple refactor for skipLobby (and remove returnToLobby)
* Tidyup
* Remove unused tests
* Add video room support.
* Add a test for video rooms
* tidy
* Document
* Tests for VerificationRequestDialog
* Fix theoretical bug where VerificationRequestDialog uses an outdated request
We were passing on `this.props.verificationRequest` to `EncryptionPanel` but we
should be passing on the request in `this.state`. This would not cause a problem
in practice because the `EncryptionPanel` immediately overwrites the request if
you supply a `verificationRequestPromise`.
* refactor: move `humanize` in shared components
* feat: add `RichItem` component
* feat: add `RichList` component
* refactor: use `RichList` and `RichItem` in `InviteDialog`
* fix: exclude `InviteDialog` button to css override
* test: update selector in invite dialog
* test(e2e): update crypto test to use correct selector
* test(e2e): update invite dialog
* test: add test for `humanize.ts`
* fix: add space between the list and the input when the list is scrollable
* test(e2e): update screenshots