* 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>
* 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>
* 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
* 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 variant of ResetIdentityBody for when the user has no verif. methods
* no longer distinguish between the using having a passphrase or not
* use vertical stack of buttons via EncryptionCard
and update wording
* swap logic order to match rendering order
* use the same dialog when no verification options available
* make it agree with the design more
* allow signing out on initial login
* apply styling changes and remove duplicate elements
* fix and add tests
* add missing snapshot
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* use a boolean property to disable blurring instead of adding a class
* change string identifiers
* apply changes from review -- simplify logic
* change class name to avoid confusion
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Fix local room encryption status always not enabled
* refactor: put back the e2e test after merge
* fix: look at e2eStatus in composer of local room
* doc: add docs to `LocalRoom.isEncryptionEnabled`
* test(e2e): check composer doesn't display unencrypted state
* test: update existing tests
* test(e2e): update existing tests
* refactor: move room encryption check in a dedicated function
* refactor: make `isEncryptionEnabled` cleaner
* test: add tests for `LocalRoom.isEncrypted`
* doc: fix `useIsEncrypted` comment
---------
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
* fix: improve aria role and label on pinned message banner
* fix: change pinned message badge background for contrast
* fix: link pinned message button to content
* test: update tests
* fix: add aria-describedby on pinned message badge
* feat: use `aria-describedby` instead of `aria-description`
* test: update room view snapshot
* test: update snapshot
* fix: put id only textual body upper div
* fix: use lodash uniqueId
* test: update snapshots
* Remove NoOneHere disabled reason.
This was used to prohibit starting calls if the user is alone in the room.
Since there are currently issues with the user count calculation this can disable the button even when not appropriate.
On top of that, there is a reason to start a call if the room was just created and the user is still waiting for the others to join the room to then join the call.
Signed-off-by: Timo K <toger5@hotmail.de>
* some ci fixes
Signed-off-by: Timo K <toger5@hotmail.de>
* fix test snapshots
Signed-off-by: Timo K <toger5@hotmail.de>
* fix test to expect enabled call buttons
* Update snapshot for unit-tests/components/views/rooms/RoomHeader/RoomHeader-test.tsx
---------
Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: fkwp <github-fkwp@w4ve.de>
* Show a blue lock instead of a grey shield for unencrypted rooms
* Update screenshots and snapshot
* Update snapshots and fix e2e test that used to expect the grey shield
* lint and add tests for shield
* Update more screen shots
* finish unit test for left icon
* Remove unneeded check
* Don't bother adding stray props to E2EIcon for data-testid
* Upate snapshots
* Add support for Module API 1.3.0
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add missing import
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix import
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Bump module API
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update module API and remove jest stub
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix test mocks
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* types
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Better handle for resizer for new room list that doesn't support collapsing.
* Add unit test
* Test the new guards/checks on resize
* Finish cleaning up mock resets
* [create-pull-request] automated change
* First pass of fixing tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Second pass of fixing tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Third pass of fixing tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Update for compatibility with v12 rooms
Stop using powerLevelNorm and reading PL events manually.
To support https://github.com/matrix-org/matrix-js-sdk/pull/4937
* Add test for leave space dialog
* Don't compute stuff if we don't need it
* Use room.client
* Use getSafeUserId
* Remove client arg
* Use getJoinedMembers
and add doc
* Fix tests
* Fix more tests
* Fix other test
* Clarify comment
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* MatrixChat-test: clean up better in `afterEach`
Make the MatrixChat tests behave better by letting them finish their work in an
`act` in afterEach. Otherwise we can end up mounting new components during
cleanup, which run tasks in the background
* MatrixChat-test: clean up dispatcher test
This test was kicking off a dispatcher job which would then open a
UserDeviceSettings dialog once the test had finished. That would then throw
exceptions because some of the mock environment had been torn down.
We're just testing that it opens the right dialog, so better to intercept
`createDialog`.
Aso add an `act` to reduce warnings, and replace a `flushPromises` with a
`waitFor` to make the test more robust.
* Use nav for new room list and label sections
The old room list had a nav element but it was missed in the new one,
so add it and albel the sections. Also remove the test ID and use
this instead.
* Update snapshots
* Use the function we define above
* basic implementation of an /share?msg=foo endpoint
* SharePayload
* add sharing html & md while we're at it
* remove whitespace from imports to appease linter
* lint
* Add unit test
* More tests
* Test for showScreen
* Use one of the typed strings
* Test nasty tags stripped out
* Add playwright test
* Fix flake
by not relying on the name being synced as soon as we load
---------
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
* Dispatch an action when room is forgotten
* Dispatch an action when room is forgotten
* Remove room on action
* Add test
* Write test for matrixchat
* Add payload info to comment
* Debug flaky jest test
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Discard changes to jest.config.ts
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Switch from defer to PromiseWithResolvers
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add modernizr check
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Allow jumping to message search from spotlight
replaces the message search hint which referenced the old UX
Fixes#29831
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update RoomSummaryCard.tsx
* Update actions.ts
* Delete src/hooks/useTransition.ts
* Update RoomSummaryCard.tsx
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate
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>