refactor: channel details cleanup#3669
Open
szuperaz wants to merge 9 commits into
Open
Conversation
Contributor
SDK Size
|
6be5c58 to
f450bcf
Compare
c5bc666 to
ec5915d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Goal
A cleanup for channel details, the main focus is to make it easier for integrators to reuse the specific building blocks, the implementation details describes all changes in detail,
🛠 Implementation details
Add members button extracted to its own component
Why? If an integrator wants a separate "list members screen" and want to add "add members" button to the screen, they can reuse
<ChannelAddMembersButton >component. The default implementation opens the add member modal, but it's possible to provideonPressfor custom navigation.Move props from
ChannelDetails/ChannelDetailsContextProviderto the relevant component-levelWhy? Having all props in a single place is comfortable when using the
ChannelDetailscomponent directly, but it's unintuitive when integrators mix and match the building blocks. Now, if someone usesChannelDetailsthey can customize the building blocks by overriding them and setting the specific props.All channel details related components rely on
ChannelDetailsContextWhy? Previously, the
ChannelDetailscomponent accepted its ownchannelprop, but if someone wanted to mix and match building blocks, they needed to use theChannelDetailsContextProvider. This approach is simpler, because all components rely on theChannelDetailsContextProvidernot almost all.Simplify contexts for channel edit and add members
Why? The
ChannelAddMembersContextandChannelDetailsEditContextcontain the notification provider too, so if an integrator is building their own screens, they have one less context to provide here.Some spacing fixes
Fix modal padding on Android in edge-to-edge mode
🎨 UI Changes
No UI changes
🧪 Testing
☑️ Checklist
developbranch