status-im / status-mobile

a free (libre) open source, mobile OS for Ethereum
https://status.app
Mozilla Public License 2.0
3.88k stars 984 forks source link

Reorganise event handlers inside `status-im/contexts.chat.events` #19020

Open seanstrom opened 6 months ago

seanstrom commented 6 months ago

Related to the recent work in #19001

Problem

It seems the amount of events being registered in the status-im.contexts.chat.events namespace has grown to a large size, and it would be beneficial to begin grooming these event handlers into different categories or namespaces.

https://github.com/status-im/status-mobile/blob/bf1a734c4e99bdbb5d04bd85ba20d0921d839afd/src/status_im/contexts/chat/events.cljs#L1-L433

Implementation

Base on a previous discussion. It seems desirable to reorganise the event handlers based around categories, for example:

Acceptance Criteria

Ideally the amount of event handlers will shrink to the essential ones needed for the status-im.contexts.chat.events namespace. And other event handlers will find a new home inside existing namespaces (if appropriate) or new namespaces (depending on categories).

Notes

It may be important to get a nice overview of the existing event handlers that are already organised nearby to the event handlers found in status-im.contexts.chat.events. There may be some useful observations or relationships between event handlers to help group them together.

clauxx commented 6 months ago

I'd suggest tackling this issue outside the crews and better after we're done with this iteration of crews to avoid conflicting with the work we do in the "chatting crew". Not a big issue, but better to be safe imo as it's not urgent.

seanstrom commented 6 months ago

@clauxx happy to wait on this issue and find it a new home 🙏 Do we have a tag or label for issues like these?

clauxx commented 5 months ago

hmm, not sure. Maybe E:Mobile Developer XP?