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

Added isCustomViewBottom Prop #1298

Merged
merged 9 commits into from Jul 10, 2019

Conversation

Projects
None yet
2 participants
@Lsleiman
Copy link
Contributor

commented Jul 5, 2019

Seems like this feature request keeps coming back. Most frequent use case is having Accept/Reject buttons rendered underneath the message text.

Users can now determine if their custom view is rendered before or after bubble message, image or video.

Lsleiman added some commits Jul 5, 2019

added customViewPosition prop
Allows user to determine whether the CustomView is rendered before custom image, video  and/or text.
added customViewPosition prop
['top' or 'bottom']

@Lsleiman Lsleiman changed the title Added ustomViewPosition Prop Added CustomViewPosition Prop Jul 5, 2019

@Lsleiman

This comment has been minimized.

Copy link
Contributor Author

commented Jul 5, 2019

See #1246 and #1201

@xcarpentier
Copy link
Collaborator

left a comment

Hi, thanks,
Can you provide typescript definition and update GiftedChat interface too ?

Lsleiman added some commits Jul 8, 2019

added renderCustomViewBottom boolean
changed customViewPosition (string) to renderCustomViewBottom (boolean)
added renderCustomViewBottom boolean
changed customViewPosition (string) to renderCustomViewBottom (boolean)
added renderCustomViewBottom boolean
changed customViewPosition (string) to renderCustomViewBottom (boolean)
@Lsleiman

This comment has been minimized.

Copy link
Contributor Author

commented Jul 8, 2019

I went ahead and changed the propType to Boolean with a default value of false. Let me know if i missed anything.
CustomView will display at the top unless users specifically set renderCustomViewBottom = true.

Show resolved Hide resolved src/GiftedChat.tsx Outdated
@xcarpentier

This comment has been minimized.

Copy link
Collaborator

commented Jul 10, 2019

Sorry but I don't think this is a cristal clear name of props renderCustomViewBottom.
When boolean props I prefer something like isCustomViewBottom.
Even if some other props look like that. I will uniformise props name asap.

@Lsleiman

This comment has been minimized.

Copy link
Contributor Author

commented Jul 10, 2019

mmm, I basically used renderAvatarOnTop as reference, but will change and resubmit.

@Lsleiman Lsleiman changed the title Added CustomViewPosition Prop Added isCustomViewBottom Prop Jul 10, 2019

@xcarpentier xcarpentier merged commit e6aa87d into FaridSafi:master Jul 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.