1 | # Change Log
|
2 |
|
3 | All notable changes to this project will be documented in this file.
|
4 | This project adheres to [Semantic Versioning](http://semver.org/).
|
5 |
|
6 | ## To be released
|
7 |
|
8 | - Remove legacy lifecycle hooks
|
9 | - Require react 16.3 and above version
|
10 | - Migrate styles to linaria
|
11 | - Hide internals in single bundle
|
12 | - Add esm support
|
13 | - Use lodash-es in esm bundle
|
14 | - Added open and onOpenChange required props to make state controlled outside and prevent reacting on suggestions list
|
15 | - onOpen and onClose callbacks are removed in favour of onOpenChange
|
16 | - Made suggestions prop required (pass empty array for async suggestions)
|
17 | - Remove prevState and state from positionSuggestions
|
18 |
|
19 | ## 3.1.5
|
20 |
|
21 | - removed deprecated draft-js hooks (onUpArrow, onDownArrow, onEscape, onTab) usage
|
22 |
|
23 | ## 3.1.4
|
24 |
|
25 | - Allow draft-js v0.11
|
26 | - Remove unused dependencies
|
27 |
|
28 | ## 3.1.3
|
29 |
|
30 | - Force update regex's `lastIndex` to avoid infinite loop
|
31 | - Fixed replace issue while `mentionTrigger` is empty
|
32 |
|
33 | ## 3.1.2
|
34 |
|
35 | - Allow empty `mentionTrigger` with `supportWhitespace: true` #1182
|
36 |
|
37 | ## 3.1.1
|
38 |
|
39 | - Fix regression for special characters in mention strategy.
|
40 |
|
41 | ## 3.1.0
|
42 |
|
43 | - Added `supportWhitespace` option to allow more precise matching of mentions containing spaces
|
44 |
|
45 | ## 3.0.4
|
46 |
|
47 | - Added an `id` attribute on the listbox options so the `aria-activedescendant` value refers to the focused option.
|
48 |
|
49 | ## 3.0.2 - 3.0.3
|
50 |
|
51 | - bumped find-with-regex
|
52 |
|
53 | ## 3.0.1
|
54 |
|
55 | - Added `aria-selected="true"` for the suggestions listbox focused option.
|
56 | - Update aria attributes to use booleans
|
57 |
|
58 | ## 3.0.0
|
59 |
|
60 | - Deprecate immutable suggestions (breaking change), use arrays from now on
|
61 | - export default theme (in case we want to extend it)
|
62 |
|
63 | ## 2.0.2
|
64 |
|
65 | (Much thanks to "dem" aka "Michael Deryugin" - https://github.com/dem)
|
66 |
|
67 | - fix suggestions dropdown position in case of line wrap
|
68 | - Allow mention popup for styled text
|
69 | - Fixed bug where a user typed not existing mention @xxx and cursor is not moved with up/down arrow key
|
70 | - Updated dependencies to support react 16
|
71 |
|
72 | ## 2.0 alpha
|
73 |
|
74 | ### Added
|
75 |
|
76 | - Passing through `isFocused` prop to `entryComponent`. Thanks to @thomas88
|
77 | - Added support for Latin-1 Supplement and Latin Extended-A characters. Thanks to @thomas88
|
78 | - Fixed incorrect opening of suggestions. Thanks to @thomas88
|
79 | - Added multiple character support for mentionTrigger
|
80 | - Added config option `mentionSuggestionsComponent`. If provided the passed component replaces the default `MentionSuggestions` component. The provided component must implement the same interface like `MentionSuggestions`.
|
81 | - Added support popoverComponent on the `MentionSuggestions` component. Thanks to @samdroid-apps
|
82 | - Introduced a new configuration option `mentionTrigger`. By default it is set to `@`. As before by default typing `@` will trigger the search for mentions. You can provide a custom character or string to change when the search is triggered. [#320](https://github.com/draft-js-plugins/draft-js-plugins/pull/320) Thanks to @yjang1031
|
83 | - MentionSuggestions accepts a new prop `entryComponent`. The passed component is used as the template for each of the suggestions' entry. [#317](https://github.com/draft-js-plugins/draft-js-plugins/pull/327). Thanks to @Zhouzi
|
84 | - `defaultEntryComponent` component is passed `searchValue` prop to enable more customizations when displaying the the MentionSuggestions. Thanks to @nishp1
|
85 | - The config now accepts a new prop `mentionComponent`. If provided the passed component is used to render a Mention. [#271](https://github.com/draft-js-plugins/draft-js-plugins/pull/271). Thanks to @alexkuz
|
86 | - Introduced the `mentionRegExp` configuration to overwrite the regular expression for initiating the dropdown. By default this supports any alphanumeric character as well as Chinese, Japanese & Korean characters.
|
87 | - Added support for Chinese words. Thanks to @mzbac
|
88 | - Added support for Japanese characters (hiragana & katakana).
|
89 | - Added support for Korean characters (Hangul Syllables & Hangul Compatibility Jamo). Thanks to @FourwingsY
|
90 | - Added support for Cyrillic characters. Thanks to @imamatory
|
91 | - Added `onAddMention` prop to MentionSuggestions. The first argument of this callback will contain the mention entry.
|
92 |
|
93 | ### Fixed
|
94 |
|
95 | - Escape spaces before mention trigger properly
|
96 | - Escape mention trigger regex properly
|
97 | - Fix bug that selects candidate on hitting return key even if the dropdown was closed. Thanks to @ngs [#720](https://github.com/draft-js-plugins/draft-js-plugins/pull/720)
|
98 | - Fix issue with: add two mentions in the Custom Mention Component Example editor, then press backspace key, will remove the first one. Thanks to @chenyuejie [#693](https://github.com/draft-js-plugins/draft-js-plugins/pull/693)
|
99 | - Prevents inserting the selected item on Enter or Tab when there's no trigger in sight and dropdown is not rendered. Thanks to @alexfedoseev [#706](https://github.com/draft-js-plugins/draft-js-plugins/pull/706)
|
100 | - Reopens mentions dropdown if new suggestions are available. Thanks to @jameskraus [#659](https://github.com/draft-js-plugins/draft-js-plugins/pull/659)
|
101 | - Solved a bug with @ being placed in the beginning. Thanks to @hjyue1 [#621](https://github.com/draft-js-plugins/draft-js-plugins/pull/621)
|
102 | - Fixed "Cannot read property 'getBoundingClientRect' of null" issue. Thanks to @ismyrnow [#666](https://github.com/draft-js-plugins/draft-js-plugins/pull/667)
|
103 | - Mentions popover showed up when typing before a @ [#323](https://github.com/draft-js-plugins/draft-js-plugins/issues/323) Thanks to @nishp1
|
104 | - Only pass element properties to the root Div of MentionSuggestions to remove the "Unknown prop warning" in React 15.2.0
|
105 | - Fixed bug where a user typed @xxx (invalid mention) and hit Enter. [#416](https://github.com/draft-js-plugins/draft-js-plugins/pull/416)
|
106 | - Fixed bug where press up arrow would not cycle back to the bottom of suggestions
|
107 | - Fixed race condition where the SuggestionPortal would unregister and not register again when inputting Japanese, etc.
|
108 | - Fixed bug where `mentionPrefix` does not appear in `editorState`. `mentionPrefix` is no longer passed to `mentionComponent`.
|
109 | - Fixed bug where `onSearchChange` didn't fire when a user switched between two different mention autocompletions with the same search value. Now it will trigger `onSearchChange` in such a case.
|
110 | - Fixed unrecognized `isFocused` React prop.
|
111 |
|
112 | ## 1.1.2 - 2016-06-26
|
113 |
|
114 | ### Fixed
|
115 |
|
116 | - Accepts plain JavaScript Objects for mentions from now on. Until now it only accepted an `Immutable.Map`. This change would make it play nicer together with `convertFromRaw` by default. Thanks to @anderslemke [#326](https://github.com/draft-js-plugins/draft-js-plugins/pull/326)
|
117 | - `positionSuggestions` now works by default with non-static parents. Thanks to @Zhouzi
|
118 | [#309](https://github.com/draft-js-plugins/draft-js-plugins/pull/309)
|
119 | [#206](https://github.com/draft-js-plugins/draft-js-plugins/issues/206)
|
120 | [#283](https://github.com/draft-js-plugins/draft-js-plugins/issues/283)
|
121 | [#289](https://github.com/draft-js-plugins/draft-js-plugins/issues/289)
|
122 |
|
123 | ## 1.1.1 - 2016-06-05
|
124 |
|
125 | ### Fixed
|
126 |
|
127 | - Close mention suggestions when suggestions filtered results are empty [#291](https://github.com/draft-js-plugins/draft-js-plugins/pull/291) [#265](https://github.com/draft-js-plugins/draft-js-plugins/issues/265)
|
128 |
|
129 | ## 1.1.0 - 2016-05-27
|
130 |
|
131 | ### Added
|
132 |
|
133 | - `MentionSuggestions` now accepts `onOpen`and `onClose` props. These callbacks are triggered when the popover has opened or closed.
|
134 |
|
135 | ## 1.0.2 - 2016-05-24
|
136 |
|
137 | ### Fixed
|
138 |
|
139 | - Fix rendering the MentionSuggestions in IE11 by avoiding to render an Immutable List [#266](https://github.com/draft-js-plugins/draft-js-plugins/issues/266) [#270](https://github.com/draft-js-plugins/draft-js-plugins/pull/270)
|
140 | - Fix React 0.14.x support by returning `<noscript />` instead of `null` [#267](https://github.com/draft-js-plugins/draft-js-plugins/pull/267)
|
141 |
|
142 | ## 1.0.1 - 2016-04-29
|
143 |
|
144 | ### Fixed
|
145 |
|
146 | - Make sure there is no autocomplete on tab after deleting a mention [#234](https://github.com/draft-js-plugins/draft-js-plugins/issues/234)
|
147 |
|
148 | ## 1.0.0 - 2016-04-20
|
149 |
|
150 | ### Changed
|
151 |
|
152 | - Instead of the popover inline it is now exported as `MentionSuggestions` and can be placed anywhere in the DOM. It's recommended to place it right after the Editor. This change was important to avoid selection issues trigged by `contentEditable={false}`.
|
153 | - `mentions` has been renamed to `suggestions` and now has to be directly provided to the `MentionSuggestions` component as property.
|
154 | - Moved to a flat configuration. Instead of plugin properties (decorators & hooks) being stored within pluginProps they now moved to the root object. See the changes here [#150](https://github.com/draft-js-plugins/draft-js-plugins/pull/150/files) as well as the initial discussion here [#143](https://github.com/draft-js-plugins/draft-js-plugins/issues/143)
|
155 | - Improved the regex and now test for a whitespace in front of the `@` to make sure it doesn't match on normal text like an email [#104](https://github.com/draft-js-plugins/draft-js-plugins/issues/104)
|
156 | - Moved the option `theme` from an Immutable Map to a JavaScript object. This is more likely to become a standard.
|
157 | - Improved styling and added animations for the Suggestions overlay as well as the hover on a single suggestion.
|
158 | - Updated the theme properties.
|
159 |
|
160 | ### Fixed
|
161 |
|
162 | - Fix using backspace to close the autocomplete suggestions after typing an `@` [#110](https://github.com/draft-js-plugins/draft-js-plugins/issues/110)
|
163 |
|
164 | ### Added
|
165 |
|
166 | - The config now takes a property `entityMutability`. A developer can choose between 'IMMUTABLE', 'SEGMENTED' & 'MUTABLE'. Read in detail about it [here](https://facebook.github.io/draft-js/docs/advanced-topics-entities.html#mutability).
|
167 | - The config now takes a property `positionSuggestions`. The function can be used to manipulate the position of the popover containing the suggestions. It receives one object as arguments containing the visible rectangle surrounding the decorated search string including the @. In addition the object contains prevProps, prevState, state & props. An object should be returned which can contain all sorts of styles. The defined properties will be applied as inline-styles.
|
168 | - Introduce a new config property: `mentionPrefix`. By default it is an empty String. For Twitter or Slack like mention behaviour you can provide an `@`.
|
169 |
|
170 | ```
|
171 | const mentionPlugin = createMentionPlugin({ entityMutability: 'IMMUTABLE' });
|
172 | ```
|
173 |
|
174 | - The `MentionSuggestions` component now takes a property `onSearchChange` which will trigger whenever the search value of changes.
|
175 | - The module now exports `defaultSuggestionsFilter` for convenience. As first argument it takes the search term as a String. The second argument is the Immutable list of mentions. The function returns the filter list based on substring matches.
|
176 |
|
177 | ## 0.0.4 - 2016-03-29
|
178 |
|
179 | ### Fixed
|
180 |
|
181 | - Fix issue with showing two menus at the same time [#132](https://github.com/draft-js-plugins/draft-js-plugins/issues/132)
|
182 | - When typing ahead to 0 results and then back the first item must be still selected. [#149](https://github.com/draft-js-plugins/draft-js-plugins/pull/149)
|
183 |
|
184 | ## 0.0.3 - 2016-03-25
|
185 |
|
186 | ### Released the first working version of DraftJS Mention Plugin
|
187 |
|
188 | It's not recommended to use the version 0.0.0 - 0.0.2
|