* Refactor className? to component property in EncryptionEventView
* Refactor extraClassNames to default react className as component property for DecryptionFailureBodyView
* Refactor className to component property for MessageTimestampView
* Refactor className and children to component properties for ReactionsRowButton
* Refactor className to component property for DisambiguatedProfile
* Refactor className to a component property in DateSeparatorView
* Fix for lint errors and EncryptionEventView unsupported icon color
* EncryptionEventView fix for icon color css specificity/order
* perf(room list): clear room list item vm only when changing space
Clearing all the item vms at every room list change is causing massive
re-render of all the room list items. References to the vms are already
removed when out of view (see RoomListViewMode.updateVisibleRooms) and
handled by GC.
* perf(room list): avoid to re-render filters at every room list update
RoomListView re-renders on update but the filters (children) don't need
to.
Add a memo to avoid excessive-rerenders.
* chore: add `keepIfSame` to do diff on vm objects
* perf(room list): avoid to create new filter ids and keys when the room list is updated
The filterKeys are passed in the virtuoso context so it should reduce
internal computing
The filter ids array has always the same value, there is no point to
create a new instance.
* test(room list): remove no longer relevant test
* test(room list): add new test to ensure that room list item vms are preserved
* Init shared component structure
* Storybook implementation
* Add snapshots of storybook examples
* ViewModel Creation + Implementation In EventTile.tsx
* Prettier
* Update HTML snapshot
* Add onhover pointer on bottons
* Added compound web tooltip
* Removed possible of undefined on label
* Update snapshots
* Update setters to use merge instead of updating full snapshot
* adapt view model test for setters change
* Actions should be passed to viewmodel fix
* replace ReactionsRowWrapper forceRender with explicit reaction state
* Update snapshot
* Refactor DateSeparator using MVVM and move to shared-components
* Add a few more stories, tests and screenshots
* Use the shared component and viewmodel in element-web
* Renaming custom content property an updating snapshots
* Fix lint errors and update snapshot after merge
* Change lifecycle handling for DateSeparatoreViewModel in components where manual handling is preferrable over wrapper component.
* Move context menu from viewmodel to shared components - step 1
* Create a jump to date picker component in shared components
* Add tests for coverage and fix layout issues and roving indexes
* Make element-web use the new component
* Simplify context menu and adjusting tests
* The HTMLExport now render shared components and need a I18nContext.Provider
* Updating unit tests for context menu
* Changed to {translate: _t} to let scripts pick up translations
* Fix lint issue and updating screenshots after merge
* Update snaps for element web components
* Renaming MVVM view components with suffix View.
* Fixing problem with input date calendar icon and system dark theme
* Changed the rendering of the menu and added a separate button component
* Handle input control with useRef in onKeyDown
* Updating DateSeparator snapshots on unit tests
* Updating layout after compound Menu got a className property
* Move files to new subfolder after merge
* Updated snapshot after merge
* Updating lock file
* Updates to styling from PR review
* Updates to focus/blur functionality
* Fixed tabbing and export documentation to stories
* Updated snapshots
---------
Co-authored-by: Zack <zazi21@student.bth.se>
* Update critical gradient for room status bar
As per design request, this has been updated to be much more subtle
https://github.com/element-hq/compound-design-tokens/pull/232
* update shared-component
* Cleanup
* Update snaps
* description fix color
* More cleanup
* Use the correct border color
* new snaps
* fix border, button placement, fonts etc
* update lock
* Update status bar
* Update playwright snaps
* Update snap icon
* Update other banners
* update snap
* fixup
* fix: in room list item, replace bottom padding by top and bottom
Outline focus is not aligned when only using a padding bottom. Replace
by a padding-top and a padding-bottom.
The padding top is not added on the first item and the padding bottom
neither on the last item
* test: update snapshot
* test: update storybook screenshot
* test: update screenshot
* chore: use css var instead of duplicating the logic
* chore: add new stories for first and last item case
* test: add new screenshots following the new stories
* feat: add visual feedback of selection in `VirtualizedList` story
* fix: keyboard navigation when focused element is no longer in the dom
* fix: selection delay when the list is scrolled
* fix: room list item scroll issue
Avoid to use margin https://virtuoso.dev/react-virtuoso/#caveats
* test: add tests
* test(e2e): update snapshots
* test: update room list item screenshot
* Add Actions to ViewModel utility types and specify `this: void` signature
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add https://typescript-eslint.io/rules/unbound-method/ linter to shared-components
also fix stray lint config which doesn't apply to SC
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add https://typescript-eslint.io/rules/unbound-method/ linter to element-web
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix genuine issues identified by the linter
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Specify this:void on i18napi
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Update Module API
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add comment for MapToVoidThis
Added utility type to map VM actions to unbound functions.
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Create a MessageTimestampView in shared components
* Switching to use shared component and view model in element-web
* Add .mx_MessageTimestamp tp _common.pcss since it is used extensively in element-web
* Added comments to view model
* Updating after Add options for consistent screenshots
* Moved rendering of late icon to EventTile
* Update shared component snaps
* Added I18nContext.Provider to Modal.tsx and HtmlExport.tsx to make them work with shared components
* Avoid circular dependencies for ModuleApi
* Adjust role and wire handlers in view model
* Change to role="link"
* Revert I18nContext.Provider changes
* Updated snapshot
* Provide I18nContext for shared-components used inside dialogs and html-export rendered in a separate root.
* Add patch for react-sdk-module-api to shared components
* Add setProps to MessageTimeViewModel and useEffect on wrappers
* Added more tests to improve coverage
* Changes after PR review
* Use specific setters in the viewmodel more relating to the business logic.
* Remove unused CSS properties
* New snapshot after merge
* Removed aria-hidden logic and display tooltips in stories
* Remove await for toolitp in HasInhibitTooltip story
* Add screenshots with visible tooltips
* Fixes after merge and review comments
* Updated snapshots for unit tests
* Removed one test since tooltips are not rendered to snapshots
* Fix playwright-screenshots.sh script
gcut is a macos thing, use awk for stability
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tweak playwright-screenshots.sh to pull image from ghcr before building
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add missing dependency in playwright-common
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add nx to prettierignore
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add continuous delivery workflow for playwright-server image
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Switch to nx affected
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Prefix calls to nx with pnpm
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Pass GITHUB_TOKEN to nx affected
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use explicit buildx builder
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Specify NX_DEFAULT_OUTPUT_STYLE
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove test trigger
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix image name
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* fix(sc): make room list item scale with large font
* fix: align room avatar view when using large font
* test(sc): add story for large font
* test(sc): update snapshots
* test(sc): add story with zoom
* Refactor EncryptionEvent using MVVM and move to shared-components
* Added viewmodel and unit tests for bothe viewmodel and component.
* Added test for custom-class
* Update EventTileFactory and RoomView to use the new component
* Clean up unused language strings from element-web
* Changed how the view model is created
* Make sure the initial snapshot mimics the previous component
* Optimizing viewmodel initial snapshot and update
* Updated playwright screenshots
* feat: add dry run of storybook build in merge queue
* Reuse build from storybook build job
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use nx to build library before building storybook
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* fix(sc): use correct icon size for room list icons
* feat(sc): implement new selection and hover design for room list item
* feat(sc): set room list item height
* chore(sc): add story for long room and message preview
* fix(sc): use correct letter-spacing for room list item
* feat(sc): use new padding for room list filters
* feat(sc): update room list header style
* test(sc): update unit tests
* test(sc): update visual tests
* test: update playwright screenshots
* doc: update figma link in item story
* test: fix sliding sync test
The notification pop up was at the top of the room list filters (less
top padding) and it was unable to click on the People filter.
* chore: fix `VirtuaalizedRoomListView` comment
* test: update playwright screenshot
* fix(sc): add ellipsis on room name
* Fix usage of nx in npm scripts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tidy project.json
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Rename playwright-screenshots script to -experimental
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Run only browser in docker for test:playwright:screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix playwright config for non-remote runs
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Prettier doesn't support nested ignore files - https://github.com/prettier/prettier/issues/17099
The eslint rules no longer applied, we fixed the issues they were ignoring
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Remove old screenshots
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add experimental playwright-screenshots.sh utility and use it for shared-components `test:storybook:update`
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Tidy up
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Iterate based on review
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
It was failing due to being unable to access pnpm-workspace.yaml so change the docker context to the root of the monorepo
Also disable pnpm-link script in the docker env and node-linking for storybook tests
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Use nx for running dev tasks
Initially only build & start
This enables caching, i.e. if you made no changes to shared-components then it can skip that build and speed up your iteration cycle time
nx will also be used for our release tooling down the line
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Drop `concurrently` - we no longer use it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Make knip happier
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Also use nx tasks for jest & tsc
so that SC gets built as needed
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add missing @nx/jest plugin
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix prebuild:rethemendex for Windows
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Fix prebuild:rethemendex for Windows
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
* Add prepack script to package.json
---------
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>