Skip to content

Conversation

@OnestarLee
Copy link
Collaborator

@OnestarLee OnestarLee commented May 21, 2025

External Contributions

This project is not yet set up to accept pull requests from external contributors.

If you have a pull request that you believe should be accepted, please contact
the Developer Relations team [email protected] with details
and we'll evaluate if we can setup a CLA to allow for the contribution.

For Internal Contributors

[CLNP-6807](https://sendbird.atlassian.net/browse/CLNP-6807)

Description Of Changes

Added flatListComponent to GroupChannelFragment to support customization

Types Of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply_

  • Bugfix
  • New feature
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance (ex) Prettier)
  • Build configuration
  • Improvement (refactor code)
  • Test

@OnestarLee OnestarLee changed the title chore: add support for custom FlatList component in message list feat: add support for custom FlatList component in message list May 21, 2025
@codecov-commenter
Copy link

codecov-commenter commented May 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 11.49%. Comparing base (16e793c) to head (4450d97).

Files with missing lines Patch % Lines
...react-native/src/components/ChatFlatList/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #242      +/-   ##
==========================================
- Coverage   11.49%   11.49%   -0.01%     
==========================================
  Files         358      358              
  Lines        8489     8490       +1     
  Branches     2394     2395       +1     
==========================================
  Hits          976      976              
- Misses       7438     7439       +1     
  Partials       75       75              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@OnestarLee OnestarLee changed the title feat: add support for custom FlatList component in message list [CLNP-6807] feat: add support for custom FlatList component in message list May 21, 2025
@OnestarLee OnestarLee requested review from bang9 and Copilot May 21, 2025 09:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for a custom FlatList component in the message list by introducing a new optional prop ("flatListComponent") and propagating it through the GroupChannelFragment, ChannelMessageList, and ChatFlatList components.

  • Introduces "flatListComponent" prop in the GroupChannelFragment and corresponding TypeScript types.
  • Updates ChatFlatList to use the provided custom FlatList component or fallback to the default internal component.
  • Propagates the prop through ChannelMessageList to enable custom FlatList rendering.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/uikit-react-native/src/fragments/createGroupChannelFragment.tsx Adds the "flatListComponent" prop and passes it to the message list.
packages/uikit-react-native/src/domain/groupChannel/types.ts Updates types to include the optional "flatListComponent".
packages/uikit-react-native/src/components/ChatFlatList/index.tsx Adjusts ChatFlatList to conditionally render the custom FlatList.
packages/uikit-react-native/src/components/ChannelMessageList/index.tsx Passes the "flatListComponent" prop down to ChatFlatList.

Copy link
Collaborator

@bang9 bang9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@OnestarLee OnestarLee enabled auto-merge May 22, 2025 00:50
@OnestarLee OnestarLee disabled auto-merge May 22, 2025 00:50
@OnestarLee OnestarLee added this pull request to the merge queue May 22, 2025
Merged via the queue into main with commit 331c1bf May 22, 2025
6 checks passed
@OnestarLee OnestarLee deleted the feat/supprot-custom-flatlist branch May 22, 2025 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants