Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The future of GiftedChat 🎉 #1775

Merged
merged 21 commits into from
Apr 14, 2022
Merged

Conversation

xcarpentier
Copy link
Collaborator

@xcarpentier xcarpentier commented May 8, 2020

Roadmap

  • Rewriting into a functional component way
  • Use more new context API (ie. locale and action sheet and hope more)
  • Add more unit tests with react-native-testing-library
  • Move all defaultProps into FC params const fn = ({ something = 42 }: Props) => { // ... }
  • Refactor IMessage using TypeScript features like tag literals to determine type of message (ie. text, video, audio, image, system and also status: 'sent' | 'received' | 'read', ...)
  • use recyclerListView (cc @myckhel)

Reviewers

Please I need to have some reviewers. 🙏

@xcarpentier xcarpentier self-assigned this May 25, 2020
Copy link
Contributor

@danielmejiadev danielmejiadev left a comment

Choose a reason for hiding this comment

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

Well done

@danielmejiadev
Copy link
Contributor

danielmejiadev commented Jun 18, 2020

@xcarpentier would be great if you merge this PR, So we can continue with migration to functional components based on this.

My idea is migrate the current user into context API you built so, we avoid to pass user prop around the tree.

@xcarpentier
Copy link
Collaborator Author

Hi!
Another way will be to create a PR from this branch and I will merge it.
What do you think?

@danielmejiadev
Copy link
Contributor

Hi
That seems great to me. So I'm gonna work on that and create the PR, so you could check it out.
Thank you.

@danielmejiadev
Copy link
Contributor

@xcarpentier What did you say is necessary in order to merge this PR?

@xcarpentier xcarpentier force-pushed the rewrite/functionnal_component branch 2 times, most recently from 3d82ace to e824e56 Compare June 24, 2020 20:40
@xcarpentier
Copy link
Collaborator Author

@xcarpentier What did you say is necessary in order to merge this PR?

Please read the comment here
And if you have other ideas please share ;)

@danielmejiadev
Copy link
Contributor

danielmejiadev commented Jun 24, 2020

@xcarpentier
In order to complete the first item, should we rewrite all components to FC?
Would be great to implement sound and video message type. What do you say?

@xcarpentier
Copy link
Collaborator Author

@xcarpentier

In order to complete the first item, should we rewrite all components to FC?

Would be great to implement sound and video message type. What do you say?

It’s not the structural kind of improvement I suggest for this PR.

But I already think about GiftedChat components rendering and customization by a splitting it into small independent parts; with monorepo technic (lerna+workspace).

That will mean a core and plugin small components into it like message video, audio, etc.

Also I would like use build tool like tsdx for this project.

@xcarpentier xcarpentier force-pushed the rewrite/functionnal_component branch from 3c6046d to c814443 Compare June 26, 2020 09:22
@xcarpentier xcarpentier marked this pull request as draft June 26, 2020 09:23
@xcarpentier xcarpentier marked this pull request as ready for review June 26, 2020 09:23
@xcarpentier xcarpentier changed the title The future of GiftedChat The future of GiftedChat 🎉 Jun 26, 2020
@stale stale bot added the wontfix label Aug 8, 2020
@stale stale bot closed this Aug 13, 2020
Repository owner deleted a comment from stale bot Aug 13, 2020
@xcarpentier xcarpentier reopened this Aug 13, 2020
@stale stale bot removed the wontfix label Aug 13, 2020
@alistairholt

This comment was marked as outdated.

@MattAgn

This comment was marked as outdated.

@ziyaddin
Copy link

ziyaddin commented Apr 18, 2021

Clipboard is being imported from react-native package, which is the outdated one, instead of @react-native-clipboard/clipboard, which is the latest one. Usage of the outdated one results in this warning:

Warning: Clipboard has been extracted from react-native core and will be removed in a future release.
It can now be installed and imported from '@react-native-clipboard/clipboard' instead of 'react-native'.
See https://github.com/react-native-clipboard/clipboard

import {
Text,
Clipboard,
StyleSheet,
TouchableWithoutFeedback,
View,
StyleProp,
ViewStyle,
TextStyle,
} from 'react-native'

@shamilovtim

This comment was marked as outdated.

@Duell10111

This comment was marked as outdated.

@shamilovtim

This comment was marked as outdated.

package.json Outdated Show resolved Hide resolved
@xcarpentier

This comment was marked as outdated.

@shamilovtim

This comment was marked as outdated.

@myckhel

This comment was marked as outdated.

@sujitgawas

This comment was marked as outdated.

@ebarahona

This comment was marked as outdated.

@kesylo

This comment was marked as outdated.

@shamilovtim

This comment was marked as outdated.

@Johan-dutoit
Copy link
Collaborator

If maintainer role can be given, alongside access to npm publishing, then progress can be made.
Alternatively- fork, update and release a new/independent chat library.

@Johan-dutoit
Copy link
Collaborator

Johan-dutoit commented Apr 8, 2022

I was looking at merging this PR, however at two years old, this rewrite will likely need additional changes.
Thoughts?

@Johan-dutoit
Copy link
Collaborator

With some minor changes (mostly test & lint fixes), I pushed the branch to npm with the next tag. I haven't tested this and will be doing so over the next couple of days.

I'll be taking whatever feedback is posted here, along with what I find during testing to decide the path forward with this branch.

package.json Outdated Show resolved Hide resolved
@Johan-dutoit
Copy link
Collaborator

In case anyone wanted to know my thinking

  • Merging this into master
  • Renaming master to main
  • Abandoning/closing old PR's that don't seems relevant
  • Abandoning/closing issues that don't seems relevant
  • Working with smaller changes

I'll likely action this in the next 24 hours or so, to allow time for challenges.

@Johan-dutoit Johan-dutoit merged commit a8d0a73 into master Apr 14, 2022
@Johan-dutoit Johan-dutoit deleted the rewrite/functionnal_component branch April 14, 2022 13:16
@jamonholmgren
Copy link

@Johan-dutoit Thank you for your work on this! I’ll be trying it out soon for an app I’m building.

@Johan-dutoit
Copy link
Collaborator

Johan-dutoit commented Apr 16, 2022

@Johan-dutoit Thank you for your work on this! I’ll be trying it out soon for an app I’m building.

Hah I'd love to take the credit @jamonholmgren, but I'm simply carrying @xcarpentier's work over the line.
Let me first make significant contributions before accepting too much praise 🤣

@myckhel
Copy link
Contributor

myckhel commented Apr 16, 2022

@Johan-dutoit Thank you for your work on this! I’ll be trying it out soon for an app I’m building.

Hah I'd love to take the credit @jamonholmgren, but I'm simply carrying @xcarpentier's work over the line. Let me first make significant contributions before accepting too much praise 🤣

Carrying the work also worth the credits 👌

@adamalexander
Copy link

@xcarpentier
"use recyclerListView (cc @myckhel)"
or better yet; react-native-android-recyclerview for android.

Repository owner locked as resolved and limited conversation to collaborators May 16, 2022
@kesha-antonov
Copy link
Collaborator

Hi

I think we should give a try to https://github.com/shopify/flash-list

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.