Skip to content

Refactor EventTile using the MVVM pattern#32855

Draft
rbondesson wants to merge 100 commits intoelement-hq:developfrom
ZacksBot:refactor/event-tile
Draft

Refactor EventTile using the MVVM pattern#32855
rbondesson wants to merge 100 commits intoelement-hq:developfrom
ZacksBot:refactor/event-tile

Conversation

@rbondesson
Copy link
Copy Markdown
Contributor

@rbondesson rbondesson commented Mar 18, 2026

Checklist

Refactor EventTile using the MVVM pattern

Summary

  • Replaced the EventTile component with a new aligning to the MVVM pattern (view, model, presenter)
  • No playwright tests have been updated in this PR

Changes

New component

  • Created a new MVVM view and barrel under src/components/views/rooms/EventTile/...
  • Created a new MVVM view model under src/viewmodels/room/timeline/event-tile
  • Extracted leaf components to reduce the file size of the component
  • Extracted public types to avoid circular references between view and view model
  • Implemented changes for better rendering performance, memory allocation, readability and documentation

Codebase migration

  • Adjusted imports of public types in other components
  • Aligned rendering paths in TextualEventViewModel

Test plan

  • Verify that the component renders correctly in the time line, threads list and message edit history
  • Run unit tests for the new component in apps/web/...
  • Run unit tests for affected components in apps/web/...
  • Run visual tests for affected components in apps/web/...

@github-actions github-actions Bot added the Z-Community-PR Issue is solved by a community member's PR label Mar 18, 2026
@rbondesson rbondesson added the T-Task Tasks for the team like planning label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning Z-Community-PR Issue is solved by a community member's PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants