Releases: KeitelDOG/react-advanced-comment
Release list
Display rich Comment view with Header, Content and Show More Text
Retrieving content from CommentInput is one thing, parsing it to display it in a Comment view is another. To avoid complication, a set of Components is provided and now CommentInput and CoreInput can provide content in array of objects.
Input ContentParts:
Prop contentType can be 'string' | 'parts'.
stringlike'Hello {{1}}'partslike{ type: 'text', data: 'Hello ', type: 'mention', data: { id: 1, name: 'KeitelDOG', image: 'image-url' }}
Comment:
New components:
Commentcomplete, usingCommentHeader,ShowMoreTextwrappingCommentContentCommentHeaderCommentContentShowMoreTextto wrapCommentContentif needed. It uses-webkit-line-clampand-webkit-boxdisplay with height calculation.
Keep Function name for Emoticon and At component
Useful for example to display Component name in Enzyme shallow rendered test.
Version 0.3.5 Make Rollup keeps main Components function names
Keep main Components function name in distributed codes. CommentInput, CoreInput, EmojiPicker, Mentions, Avatar. Their name will appear in Shallow test for example as <CommentInput ...> instead of <Component ... />.
Fix Avatar Component Docs
0.3.4 Version 0.3.4 Fix Avatar Component Fix
React 18 compatibility and CommentInput root div styling
Dev can now install this package in React 18, and can style the CommentInput root div with CSS Module
Make Peer Dependencies compatible from React 16.0.0 to 17.0.2
Now you can install this package while running React from 16.0.0 to 17.0.2.
Placeholder option in Input
Dev can now use optional placeholder in CommentInput and CoreInput:
<CommentInput placeholder="Give you opinion" />Export Types to root for Typescript developers
Export types to package root for developers that use typescript. So that they can import type like:
import { RenderEmojiPickerProps, RenderMentionsProps, User, Emoji } from '@keiteldog/react-advanced-comment';
(Fix for 0.2.0) Clear option with auto Users list update in Input
Old tag 0.2.0 didn't publish latest compiled dist directory. The version 0.2.1 fixed it and published the latest codes.
Clear option with auto Users list update in Input
- Input can be now cleared passing a clear prop in CommentInput and CoreInput.
- Fix empty face at left of CommentInput when Avatar is not displayed
- Allow input to automatically update users list passed in props for mention