* Refactor Mjolnir body to use render-only view model actions
* Extracted isMjolnirBodyAllowed from MessageEvent
* Converted the new test file to vitest
* fixed collpased url preview logo aspect ratio for chrome because chromium doesnt understand that aspect ratio means aspect ratio
* updated pngs
* update snapshot
* Add functionality to UIStore
- Make it possible to query if the window is currently being resized
- Emit WidthIncreased/WidthDecreased events
* Change resize behaviour of panel
So that the panel does not become smaller when the window is resized.
This is consistent with the old room-list design.
* Introduce a `CollapseHandler` object
This should be used by the collapse behaviours to collapse/expand the
panel. There's a good reason to not have the behaviours depend directly
on the react-resizable-panels API methods: We dont want the collapse/expand
calls to conflict with each other. See the comments in the code for more
information.
* Introduce a base class for collapse behaviour logic
Behaviours should extend this class to describe when the panel should
automatically collapse and expand.
* Add the window resize collapse behaviour
* Create a central file from which to export all behaviours
* Add a class to orchestrate the collapse behaviours
ResizerViewModel will only have a dependency on this class.
* Collapse panel on app start if necessary
For eg, if the app is started with a small window width, the panel should be
collapsed.
* Wire auto collapse code into the viewmodel
* Write jest tests
* Fix e2e tests
* Fix lint error
* Fix e2e test failures
* Expand the panel before taking screenshot
Fixes incorrect narrow screenshots in RTE.spec.ts and CIDER.spec.ts
* Make comments consistent
* Move tests from jest to vitest
* Fix lint errors
* Improve comment
* Remove variable
* Remove mock
* Fix comment formatting
* Fetches link previews for all links in message (instead of just the first one)
* message url component to display preview for multiple urls
* Revert visible behaviour back to only showing one URL preview
While fetching all link previews in the text message.
* Moved URL preview VM to MessageComposer
* Added com.beeper.linkpreviews to messages sent with the markdown compositor
* MSC 4452 implemented for the older (markdown) composer
* claude told me to use logger instead of console
* Previews generated with snapshot instead of vm
* moved attachPreviews to a separate file
* added attach URL previews to rich text editor
* don't let attachUrlPreviews block clearning the composer
* fixed linter errors
* moved url preview behind labs feature gate
* passed linters
* moved lab feature checking to where attach preview is used
* claude wrote some unit tests for url previewing
* fixed linter errors
* added feature to labs.md
* fixed linter errors
* fixed oxfmt error
* set previews to none if all previews failed
* resolved PR reviews besides the ones that requires a larger code change
* moved url preview VM creation to message composer
* removed delay when clearing composer url preview on message send
* Collpased URL previews in timeline
* CSS for collapsed URL previews
* fixed typo thing?
* update class for this component
* remove dead code from css
* minor changes to stop using globals everywhere
* moved debouncing responsibility to urlpreviewVM
* minor lint fixes
* added comment
* remove composer content from the state of urlpreview, moved it to the vm
* urlpreviewwrapper depends on the vm only
* added comments
* edited the comment
* one slow preview no longer blocks up the current batch of previews from loading
* show failed and loading url previews
* collapsed urlpreview styles to match the expanded preview
* css formtting
* composer url preview summary bar
* prefer site icon
* Revert "Merge branch 'url-preview-loading-indicator' into collapsed-url-previews"
This reverts commit b7a1ccb0e74661458e16c128814ba1939bdf400e, reversing
changes made to 1340b216407cf9af95741174819f97a144c13bb3.
* updated shared-components Punit test snapshots
* updated snapshots
* wait for tall image to load before capturing snapshot (claude wrote this)
* try remove requestanimation frame
* use semantic tokens instead of specifying hard values in some places
* Update packages/shared-components/src/room/timeline/event-tile/UrlPreviewGroupView/LinkPreview/LinkPreview.tsx
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
* changed css so previews looks less horrendous on different front sizes, particularly very small font sizes
* updated unit test snapshots
* regenerated playwright story screenshots
---------
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
* Make the text copy button use IconButton
This obviously should be a shared component, but design is looking at
what it will actually look like long term, so until then, let's at
least make it use compound's IconButton so it gets the hover background
state, and sort out the padding & margins.
Requires https://github.com/element-hq/compound-web/pull/528
* snapshots & add aria-label
* more snapshots
* Remove unnecessary width & height
update other screenshots with expected changes
* One more screenshot
* This really shouldn't be necessary: see what test fails
* Fix test to look in screen for the labels
Because the labels from the tooltip don't go in the container, they
get added to the dom at the top level in a floaty bit.
* update snapshots again
* Fix button size
and also add comment to the other place where we fudge the padding
* Update snapshots
* Align to center
* Screenshots
* Conform to oxlint rule jsx-a11y/role-has-required-aria-props
* Conform to oxlint rule jsx-a11y/role-supports-aria-props
* Conform to oxlint rule jsx-a11y/interactive-supports-focus
* Conform to oxlint rule jsx-a11y/click-events-have-key-events
* Update snapshots
* Add user status to autocomplete suggestion
* Add test for PillCompletion titleIcon
* Convert to vitest
* Add test for UserStatusIcon
* Switch the user status icon view to be a view model based component
* Screenshots
* Add .catch
* Add test for UserProvider
* Upgrade to TypeScript 7
for massive tsc speed gains
Those on WebStorm will want to upgrade to EAP to reap the benefits of the new TSGo compiler
Some things (module-api & shared-components) which utilise unplugin-dts (and api-extractor) need to hold a copy of ts6 for its conventional lib format and API. TS7 ships with no API until TS7.1.
Other things which use eslint also need ts6 for typescript-eslint.
Some type changes were necessary as TS7 caught some issues.
* Add knip exception
* Fix bad merge
* Fetches link previews for all links in message (instead of just the first one)
* message url component to display preview for multiple urls
* Revert visible behaviour back to only showing one URL preview
While fetching all link previews in the text message.
* Moved URL preview VM to MessageComposer
* Added com.beeper.linkpreviews to messages sent with the markdown compositor
* MSC 4452 implemented for the older (markdown) composer
* claude told me to use logger instead of console
* Previews generated with snapshot instead of vm
* moved attachPreviews to a separate file
* added attach URL previews to rich text editor
* don't let attachUrlPreviews block clearning the composer
* fixed linter errors
* moved url preview behind labs feature gate
* passed linters
* moved lab feature checking to where attach preview is used
* claude wrote some unit tests for url previewing
* fixed linter errors
* added feature to labs.md
* fixed linter errors
* fixed oxfmt error
* set previews to none if all previews failed
* resolved PR reviews besides the ones that requires a larger code change
* moved url preview VM creation to message composer
* removed delay when clearing composer url preview on message send
* minor changes to stop using globals everywhere
* moved debouncing responsibility to urlpreviewVM
* minor lint fixes
* added comment
* remove composer content from the state of urlpreview, moved it to the vm
* urlpreviewwrapper depends on the vm only
* added comments
* edited the comment
* updated snapshots
* claude fixed tests
* enable feature for tests that requires MSC4095
* updated snapshot
* Add a common view snapshot type
This will contain the common snapshot values used by both dm ongoing
call tile view and room ongoing call tile view.
* Implement the common join button component
* Implement the call icon component
* Implement the common container component
* Support single digit minutes in existing clock component
* Implement the view for duration component
* Add static profile pics to be used in storybook tests
* Implement view for member avatar component
* Implement view for face pile component
* Implement RoomOngoingCallTileView
* Implement DmOngoingCallTileView
* Support the new tiles in RootTileView
* Export all the views
* Update all the screenshots
* Add a comment about the 10px margin
* Add comments to explain css heights and widths
* Add user status in user info right panel card
Adds a very simple view component to do so, which will be reused
in the DM room header.
Also comment the other status view so the difference is clear.
* Add screenshot
* Add test
* Rename snapshot
* Add back Favourites and Low Priority filter into shared components
* Wireup RoomList.showSections and filters in room list vm
* Add e2e test for filters and showSection setting
* Center long user ids in the user menu
The span itself was centered but the text wasn't centered in the span
so long user IDs would be left justified once they wrapped onto two
lines.
* Update screenshot
* Snapshot
* Implement tombstone tile view for a room
* Implement tombstone tile view for a DM
* Implement root call tile view
* Export all the views
* Add screenshots
* Remove old view code
* Implement vm for tombstone tile in a room
* Implement vm for tombstone tile in a DM
* Implement root tile vm
* Use new tile in the event factory
* Remove old vm
* Exclude mock code from code checks
* Add new settings to enable/disable the sections
* Add `RoomList.showSections` settings to preference user settings
* Hide sections ui in room list header
- Hide the collapse/expand button and the *new section* entry in the
menu.
- Display the *start chat* button instead of the compose menu when the
only action available is to create a DM
* Hide sections ui in context menu of room item
* Listen to show section settings in room list item vm
* Listen to show sections setting in room list header vm
* Put all the rooms inside the chat section when sections are disabled
When the chat section is the only section, the room list is in "flat
list mode". Putting all the rooms inside the chat section.
The section filters (aka custom section, favourites etc) are not passed
to the skip list.
* Update preferences settings screenshot
* Add e2e test for RoomList.showSections toggle
* Hide "Chat moved" toast when a room is tagged when RoomList.showSections is disabled
* First stage
1. Make avatar BIGGER!
2. Move status button out to its own component so we can reuse it
* Working version
but using context menu rather than dropdown menu which almost looks
right but not quite.
* Commit the set status view component
* Change to use dropdown with custom trigger
* Show full set status component in user menu
and styling tweaks
* In user menu, clicking takes you to settings
* Add the view model
* oxfmt
because apparently mine had decided to go away
* Fix type import
* Pass set status viewmodel in story
* Bump compound-web
for customisable dropdown
* Snapshot
* Add explicit aria label
as combobox role things don't just inherit from their inner text
* snapshot again
* Only show user status if feature flag enabled
* Make status btton view not a button
because it doesn't need to be. Also rename accordingly.
* Screenshots
* Disable in settings if feature flag off
* Snapshot
* Snapshot again
* Update screenshots
including room settings one which wasn't really supposed to change
although the avatar now takes up the space it's in - leaving it for
design to check.
* Fix size & positioning of the status button
* Update screenshots
* Screenshots
* Test for SetStatusViewModel
* Update set status view on status change
* Use a link component for the status button
which has built in hover state
* Float the status button in a 28px container
vs making it actually 28px min height
* Separate user menu profile into two sections
With 8px gap between things in the two sections and 12px gap between
sections (ie. in practice, 12px gap between the status control and username).
* Screenshot
* Screenshots
* Pass set status view model in the state
rather than as an extra prop. Fixes it in the story too.
* Pass ownprofilestore into the viewmodel
* Don't use snapshot for testing the view model
Avoids getting all the random stuff from the sub VM in the snapshot
and better to test what we care about anyway.
* don't mention the bad word
* Here too
* Don't show user status for guests
* Update guest story to remove user status
* Update npm non-major dependencies
* Hold back oxfmt due to postcss support being broken
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Virtuoso's rangeChanged was forwarded to updateVisibleRooms unmapped:
- In grouped mode the range is in entry space (one slot per section
header), while updateVisibleRooms slices the rooms-only array. The
retained window was shifted down by the number of headers above it,
so the view models of the top rendered rooms were disposed and
recreated on every range change.
- Virtuoso's endIndex is inclusive but slice() is end-exclusive, so
the boundary row's view model was disposed and recreated on nearly
every range change.
* Modify LinkPreview to export shared atomics
* Implement MessageComposerUrlPreviewView
* Create UrlPreviewFetcher utility function
* Modify view models
* Implement in composer
* Support running tests in dom-less vitest environment
* Add a playwright test
* hide another one
* fmt
* cleanup
* test rte too
* fixup
* Add back docstring
* cleanup
* off by one
* remove description check
* Cleanup hacks
* Remove another hack
* cleanup
* one more
* fixup window here too
* whoops type
* Rename to be cleaeer
* Trim URLs first
* fix bug
* Fix more menu focus issue when focused with no hover.
* Use a js based solution for focus
* Return focus to the menu trigger when closing the menu with Escape
Keep the keyboard-focus marker set while a row/section-header menu is open
(focus is then in the portaled popover, outside the element). This keeps the
trigger revealed so the menu's own focus restoration lands on it when closed
with Escape, instead of dropping to <body>.
* test: cover keyboard-focus reveal of the room list hover menus
Adds unit tests that focus a room row / section header via the keyboard
(:focus-visible on mount) and assert the hover menu is revealed, then cleared
when focus leaves. Brings diff coverage of the focus handlers to 100%.