Do not provide Public API frontend events for private
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.2k
- Forks
- 586
- Avg merge
- 18h 27m
- Merged PRs (30d)
- 333
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Problem
We often use @nextcloud/event-bus internally to trigger an action or change a state from one module to another.
Events in @nextcloud/event-bus are acts as Public API: they are stored in a global namespace (potential name conflicts) and used for inter-app communication (potential unexpected breaking change).
This can lead to one app breaking another in cases of:
- Event name conflict (especially general names like
show-settingswithout namespace prefix) - Breaking change from using private API
TODO
- Check which events are actually required to be public
- For public events make sure they have
talk:prefix for namespacing to avoid conflicts and deprecate old event name - For private events — remove them from public API:
- Use explicit communication: modules, function calls, application state
- In the worst case: migrate to the local event bus
Current public events
talk:unread:update- ✅ public, only used by Talk Desktop indirectly (but required a change)talk:media-settings:show- ⚠️ privatetalk:media-settings:hide- ⚠️ privatespreed:select-active-sidebar-tab- ⚠️ privateswitch-screen-to-id- ?send-reaction- ?show-settings- ?show-conversation-settings- ?hide-conversation-settings- ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by auditing the listed @nextcloud/event-bus events: talk:unread:update, talk:media-settings:show/hide, spreed:select-active-sidebar-tab, and the unnamed events. Determine which are required to remain public, then identify private-event callers and choose explicit communication or the local event bus for them. Done means public events are namespaced and private events are no longer exposed through the public API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100