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鈥檒l 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

The future of GiftedChat 馃帀 #1775

merged 21 commits into from Apr 14, 2022

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

Well done

@danielmejiadev
Copy link
Contributor

@danielmejiadev 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

@xcarpentier xcarpentier commented Jun 18, 2020

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

@danielmejiadev danielmejiadev commented Jun 18, 2020

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

@danielmejiadev danielmejiadev commented Jun 22, 2020

@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 Jun 24, 2020
@xcarpentier
Copy link
Collaborator Author

@xcarpentier xcarpentier commented Jun 24, 2020

@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 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 xcarpentier commented Jun 25, 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?

It鈥檚 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 Jun 26, 2020
@xcarpentier xcarpentier marked this pull request as draft Jun 26, 2020
@xcarpentier xcarpentier marked this pull request as ready for review Jun 26, 2020
@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 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

@Johan-dutoit Johan-dutoit commented Apr 7, 2022

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 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

@Johan-dutoit Johan-dutoit commented Apr 10, 2022

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

@Johan-dutoit Johan-dutoit commented Apr 13, 2022

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 Apr 14, 2022
@jamonholmgren
Copy link

@jamonholmgren jamonholmgren commented Apr 15, 2022

@Johan-dutoit Thank you for your work on this! I鈥檒l be trying it out soon for an app I鈥檓 building.

Johan-dutoit
Copy link
Collaborator Author

@Johan-dutoit Johan-dutoit commented on 2d87705 Apr 16, 2022

Choose a reason for hiding this comment

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

Are you referring to the safe area context? The added support in 4.1.2, I can't remember if it's backwards compatible (I thought it was, but will do some digging to confirm).

If you're having issues with it, let's track it in a new issue instead.

Johan-dutoit
Copy link
Collaborator Author

@Johan-dutoit Johan-dutoit commented on 2d87705 Apr 16, 2022

Choose a reason for hiding this comment

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

@shamilovtim I deleted your comment... by mistake! Sorry. Please see my response above!

@Johan-dutoit
Copy link
Collaborator

@Johan-dutoit Johan-dutoit commented Apr 16, 2022

@Johan-dutoit Thank you for your work on this! I鈥檒l be trying it out soon for an app I鈥檓 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 myckhel commented Apr 16, 2022

@Johan-dutoit Thank you for your work on this! I鈥檒l be trying it out soon for an app I鈥檓 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

@adamalexander adamalexander commented May 13, 2022

@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
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.

None yet