* Fix soft crash of room list when trying to open a room (#32864)
* fix: soft crash of room list trying to get item vm
* test: add test to check roomMap recovery and cleared when needed
(cherry picked from commit 9358096ac6ebf1fed4b6097658bc75b21c8fc366)
* test: fix room list vm usage in test
https://github.com/element-hq/element-web/pull/32819 has renamed the vm
but this PR isn't in the base branch of the backport
---------
Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
* feat: add section header
* refactor: remove index and role related to list box from RoomListItemView
* feat: add wrapper to RoomListItemView to handle different accessiblity pattern
* feat: add section support to VirtualizedRoomListView
* feat: add sections support to RoomListView
* test: add screenshot for sections header
* test: add/update screenshots for sections
* feat: force flat list on view model
This is an intermediary step before implementing sections in the vm. We
force the flat list but we use the underneath the view supporting
sections.
* test: update RoomListViewModel test
* test: fix breaking test
* chore: rename `getSectionViewModel` to `getSectionHeaderViewModel`
* chore: add missing `RoomListItemAccessibilityWrapper` export
* chore: merge `react` imports
* chore: simplify and add comment to `getItemKey` and `getHeaderKey`
* chore add comments to `getItemComponent` variants
* chore: fix typo in example doc
* Port over linkifyJS to shared-components.
* Drop rubbish
* update lock
* quickfix test
* drop group id
* Modernize tests
* Remove stories that aren't in use.
* Complete working version
* Add copyright
* tidy up
* update lock
* Update snaps
* update snap
* undo change
* remove unused
* More test updates
* fix typo
* fix margin on preview
* move margin block
* snapupdate
* prettier
* Port url preview logic to a view model.
* More fiddling with VM logic
* Note to self
* Refactor away into a shared component.
* Even more lovely lovely code that makes it look prettier
* translation cleanup
* Even more stuff that I need to fix yay
* Remove .last-run.json
* Update snaps
* Ensure we set showUrlPreview
* Cleanup tests
* lint + add png support
* Add a label
* Cleanup
* Add snaps
* Update snaps
* update playwright
* Refactors
* update snap
* Add missing snap
* Remove editing code (we check this in a better way in componentDidUpdate)
* Add README
* fix the one unused import
* Style shuffling
* Update vis tests
* Finally fix the tooltip
* Remove unused prop
* Add some padding
* fix lint issue
* Design improvements
* new screens
* Update snaps
* Fix CSS specificity
* Remove stale screenshot
* Rename function to match reality
* Port viewmodel tests to snapshots
* finish documenting types
* Stop being dangerous
* Use Linkify+decode for description
* Remove ability for VM to do linkifying.
* Port over linkifyJS to shared-components.
* Drop rubbish
* update lock
* quickfix test
* drop group id
* Modernize tests
* Remove stories that aren't in use.
* Complete working version
* Add copyright
* tidy up
* update lock
* Update snaps
* update snap
* undo change
* remove unused
* More test updates
* fix typo
* fix margin on preview
* move margin block
* snapupdate
* prettier
* cleanup a test mistake
* Fixup sonar issues
* Don't expose linkifyjs to applications, just provide helper functions.
* Add story for documentation.
* remove $
* Use a const
* typo
* cleanup var name
* remove console line
* Changes checkpoint
* Convert to context
* Revert unrelated change.
* more cleanup
* Add a test to cover ignoring incoming data elements
* Make tests happy
* Update tests for LinkedText
* Underlines!
* fix lock
* remove unused linkify packages
* import move
* Remove mod to remove underline
* undo
* fix snap
* another snapshot fix
* More cleanup
* Tidy up based on review.
* fix story
* Pass in args
* update snap
* cleanup
* use source image
* oops
* remove client peg
* Remove unused state
* tidy up code
* Ensure we update the preview when the event content may have changed.
* s/global/globalThis/
* Ensure we don't stretch images
* Update screenshots
* Cleanup
* Refactor MFileBody using MVVM and move to shared component
* Simplyfing rendering properties
* Create a first version of view model for the component
* Simplifying component properties and make it possible to override module css using data-* attributes
* Create a MBodyFactory in element-web and use it to render MFileBodyView from MessageEvent
* Use <MediaBody instead of <button to support legacy rendering
* Updated styling and comments
* Refactoring className from snapshot to component property
* Rename MFileBody* to FileBody*
* Rename MFileBody* to FileBody*
* Refactoring render branches to allow for displaying nothing
* Fix styling issues
* Fix lint errors
* Fix for css selectors in playwright tests
* Remove the MFileBody component and change all callers to use MBodyFactory:FileBodyView
* Remove unused strings in element-web
* Revert to render text in story iframes
* Fix for prettier error
* Fix playwright test css selectors
* Apply legacy styling in element-web
* Add legacy styling for mx_MFileBody
* Restore file
* Change from <div to <button
* Calculate span width ad update screenshots
* Remove width calculation and update snapshots
* Fix for letter-spacing and better content in story
* Updated playwright screenshots
* Updated snapshots
* Fixing Sonar errors/warnings
* Removed extra parentheses
* Changes after review
* Change border-radius to px and updated snapshots
* Fix typo in description
* And another typo fix
* Changes after review
* Add support for Widget & Room Header Buttons module APIs
To support https://github.com/element-hq/element-modules/pull/217
* Update for new api
* Test addRoomHeaderButtonCallback
* Extra mock api
* Test for widgetapi
* Convert enum
* Convert other enum usage
* Add tests for widget context menu move buttons
Which have just changed because of the enum
* Add tests for moving the widgets
* Fix copyright
Co-authored-by: Florian Duros <florianduros@element.io>
* Update module API
* A little import/export
---------
Co-authored-by: Florian Duros <florianduros@element.io>
* Disable changing automaticErrorReporting unless sentry is configured.
* Ensure we reload on change
* Remove automaticErrorReporting labs flag
* remove stray import
* I thought I had killed you
* poke ci
* do not indirect tsc commands via tsc
Currently, `nx lint:types` is configured to indirect its `tsc` incantations via
pnpm. As far as I can tell, this is unnecessary; worse, it means we seem to hit
a pnpm reentrancy bug which causes pnpm not to run those commands at all if the
top level pnpm has `--if-present`.
* Reinstate indirection via pnpm
... to evade knip.
* refactor: extract most of the logic from the virtualized list
The VirtualizedList component is renamed FlatVirtualizedList and most of
the logic is extracted. In order to prepare the introduction of the
GroupedVirtualizedList which will share most of the behaviour.
* refactor: use `FlatVirtualizedList` instead of `VirtualizedList`
* feat: add grouped virtualized list to shared components
* feat: add accessiblity helps for virtualized list
* test: use one test suite for the two virtualized lists
* test: update storybook screenshots
* feat: add keyboard navigation on header
* test: make a11y test pass
* chore: delete old screenshot
* doc: a11y docs to list stories
* chore: fix copyright
* Port over linkifyJS to shared-components.
* Drop rubbish
* update lock
* quickfix test
* drop group id
* Modernize tests
* Remove stories that aren't in use.
* Complete working version
* Add copyright
* tidy up
* update lock
* Update snaps
* update snap
* undo change
* remove unused
* More test updates
* fix typo
* fix margin on preview
* move margin block
* snapupdate
* prettier
* cleanup a test mistake
* Fixup sonar issues
* Don't expose linkifyjs to applications, just provide helper functions.
* Add story for documentation.
* remove $
* Use a const
* typo
* cleanup var name
* remove console line
* Changes checkpoint
* Convert to context
* Revert unrelated change.
* more cleanup
* Add a test to cover ignoring incoming data elements
* Make tests happy
* Update tests for LinkedText
* Underlines!
* fix lock
* remove unused linkify packages
* import move
* Remove mod to remove underline
* undo
* fix snap
* another snapshot fix
* Tidy up based on review.
* fix story
* Pass in args
* refactor: move pinned message badge into shared-components
* Update lint errors
* Fix for Vitest issue with CI on shared components
* Update related to the pr comments and requests
* Prettier Fix
* Update, remove view since it was just moved and not actually MVVMed
* Removed view suffix since it was only moved and not mvvmed
* Update snapshots
* Removal of unused screenshots
* Added Image that we need
* Update to Module API v1.11.0
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove stale state field to make CQL happy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Bump npm dep
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Improve coverage
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add zizmor CI & make it happy
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix zizmor job
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* chore: remove unused `ManualAlgorithm`
In the old room list ui, we can"t manually sort the rooms or the
sections. Neither in a menu or by drag and drop
* fix: add `undefined` to `tagRoom` signature since the code allows it
* test: add tests to `RoomListActions`
* chore: remuve unuseful comment
* refactor: remove unused ``newIndex
* doc: remove typing in tsdoc
* [create-pull-request] automated change
* Use a dedicated string for public access in settings.
* Fix tests due to copy changes.
* Fix tests due to copy changes.
* Fix tests due to copy changes.
* Fix tests due to copy changes.
* Fix tests due to copy changes.
* Updated visual tests screenshots due to copy changes.
* Updated visual tests screenshots due to copy changes.
---------
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: mxandreas <andreass@element.io>
* Fix playwright html report missing in CI
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update paths for playwright html report in workflow
* Add if-no-files-found option to upload step
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>