element-hq / element-hq/element-web
Improve event re-emitter logic across codebase
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Your use case
#### What would you like to do?
See https://github.com/matrix-org/matrix-js-sdk/pull/3796
We should examine if this sort of issue happens in other parts of the codebase.
#### Why would you like to do it?
Lots of potential to cause bugs.
We should have a better way of listening to changes on objects that isn't based on manually setting up re-emitter logic.
#### How would you like to achieve it?
Requires deliberation, but observables (eg: https://rxjs.dev/) may make sense. For example, we could have an observable map of users that the memberlist would subscribe to.
### Have you considered any alternatives?
_No response_
### Additional context
_No response_
Contributor guide
Research direction
Review pull request 3796 and inspect the memberlist's proposed observable map of users as entry points. Identify other manually maintained event re-emitter logic across the codebase, then define and agree on a replacement approach and its scope; the issue does not name specific files or tests, so completion criteria need to be established first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100