Releases: tjtanjin/react-chatbotify
v2.0.0-beta.16
Fixed:
- Fixed an issue where themes may not load properly
- Buttons now properly inherit base styles even in different states (e.g. disabled, hovered)
v2.0.0-beta.15
Fixed:
- Fixed an issue where having
settings.chatHistory.autoLoad: true
will cause the chat history to disappear - Fixed an issue where loading of chat history may cause previously disabled text area to become enabled
- Renamed
id
insideevent.detail
tobotId
for better clarity
Added:
- Added a new
rcb-pre-load-chatbot
event - Added a new
rcb-post-load-chatbot
event - Added a new
useBotId
hook
v2.0.0-beta.14
Fixed:
- Fixed an issue where having multiple chatbots can cause styling conflicts with themes
- Fixed an issue where
removeMessage
was not working due to outdated messages state - Fixed an issue where
defaultToggledOn
property forvoice
did not properly register voice inputs - Fixed an issue where setting
defaultOpen
totrue
forchatWindow
does not make it open by default - Fixed an issue where toggling open the chat window does not emit its associated event
- Fixed a rare issue where spamming messages too fast can cause autoscroll to bottom to not work properly
- Fixed notification badge style to prevent it from becoming oval-shaped
- Fixed an issue with the library packaging process, reduces overall size by nearly 60%!
- Renamed
useToast
hook touseToasts
for consistency
Added:
- Added proper support for React 19!
- Added a new
ariaLabel
section to improve accessibility support - Added a new
useChatHistory
hook that provides 3 new actions (showChatHistory
,getHistoryMessages
andsetHistoryMessages
) - Added a new
sendButtonDisabledStyle
(send button is now properly disabled when textarea is disabled as well) - Improved localised styling of chatbots to reduce conflicts with host websites (and with other chatbots)
Note:
This update brings about a couple of fantastic improvements - drastically reduced library size (by nearly 60%), React 19 support, improved localised styles and better accessibility support!
v2.0.0-beta.13
Fixed:
- Fixed an issue where the toggle voice event was not properly triggered
Added:
- Improved support for ssr (users now no longer need to rely on dynamic imports as a workaround)
v2.0.0-beta.12
Fixed:
- Fixed an issue where toasts do not obey max limit
- Fixed an issue where toasts are not positioned properly
- Fixed an issue where notification sound does not play correctly in
useNotifications
v2.0.0-beta.11
Added:
- Added a new
useFlow
hook that grants access to retrieving and restarting the conversation flows - The
hasFlowStarted
boolean which was previously found inuseFirstInteraction
has been moved touseFlow
for better consistency
Fixed:
- Fixed an issue where states were not updated in conversation flow
Note:
There have been confusions surrounding the use of ChatBotProvider
such as what props it should be given if used. To reduce the mental load on developers, all props are now centralized to only ChatBot
, regardless of whether you are using ChatBotProvider
or not.
There is no functionality change and developers can now just remember that ChatBot
is what accepts all props. With that said, if you're currently passing props to ChatBotProvider
, move them all to ChatBot
instead.
v2.0.0-beta.10
Fixed:
- Fixed an issue where chatbot view on mobile devices may not resize correctly
- Fixed an issue where uuids are not generated properly for non-https environments
v2.0.0-beta.9
Breaking Changes (Advanced Users):
- If you are manually manipulating the
messages
array via advanced messages, note that the message elements now enforce that the following fields must be present (more details here):- id
- sender
- content
- type
- timestamp
- If you are currently using any of the advanced features (e.g.
SettingsContext
,StylesContext
,MessagesContext
orPathsContext
), note that these have been removed in favor of a single provider (ChatBotProvider
). Theadvance
configuration section has also been removed fromsettings
as the entire concept of advanced features is being dropped (more details here).
Breaking Changes (All Users):
- The
isOpen
variable insettings
which tracked the open/close state of the chatbot window has been removed, in favor ofuseChatWindow
hook. More details here. - Last beta release, a new
params.injectToast
was added. This has been renamed toparams.showToast
to avoid conceptual similarities with messages.
Fixed:
- Fixed an issue where
params.setTextAreaValue
may not respect the character limit of the text area (if set).
Added:
- A new id prop has been added to uniquely identify a bot (relevant for firing events when there are multiple chatbots).
- A new plugins prop is now available. However, there are no plugins released yet - they will come in October. More details here.
- A new hooks feature is now available, granting extreme flexibility in interacting with the chatbot from your own components. This is achieved by nesting your components within a single
<ChatBotProvider/>
. More details here. - A new events feature is now available, allowing you to listen for chatbot events and run your own application logic. Events are an opt-in feature so you'll need to enable them in
settings
. More details here. - A message id (string) is now returned for
injectMessage
andstreamMessage
which identifies the message the content is sent in (returns null if sending of message was prevented in event listeners). - A toast id (string) is now returned for
showToast
which identifies the toast the content is sent in (returns null if sending of toast was prevented in event listeners). - The
transition
attribute now accepts anumber
as well (defaults interruptable tofalse
).
Note:
This beta release includes large scale changes in order to deliver on the events/plugins feature. Pending major bugs or implementation issues, this will be the last round of introducing massive changes as we strive towards a stable version for v2. Note that given the scale of these changes, there are minor breaking changes (in addition to the initial beta release), which largely affects advanced users. For users updating from the older beta versions, I've put together the sections to catch up on for addressing breaking changes:
- Removed isOpen from BotOptions (Settings)
- Advance Section Removed
- Message Attributes Expanded and Required
If you're updating to this version from v1, then you should still refer to the migration guide which has also already been updated with all the latest information.
v2.0.0-beta.8
Fixed:
- Fixed an issue where bot typing indicator is not shown when
params.goToPath
is used
Added:
- A new
params.setTextAreaValue
has been added for users to directly set the text area value - A new
params.injectToast
has been added for users to show toasts within the chatbot - A new
toast
section has been added tosettings
which contains 3 properties (maxCount
,forbidOnMax
anddismissOnClick
) along with 3 new additions tostyles
(toastPromptContainerStyle
,toastPromptStyle
,toastPromptHoveredStyle
) - The
checkboxes
block attribute now accepts an array of strings as well, and will populateitems
property with it (all other values defaulted) - The
checkboxes
block attribute has 2 new propertiessendOutput
andreusable
, which determines whether the selected checkboxes should be sent in chat and whether the checkboxes can be reused - The
options
block attribute now accepts an object as well, accepting 3 properties which areitems
,sendOutput
andreusable
(current array input still works)
Note:
This update adds on to and expands the checkboxes
and options
block attributes. There are no breaking changes but if users are keen to leverage on the new features, do refer to the attributes documentation. In addition, 2 new parameters (params.setTextAreaValue
and params.injectToast
) have also been added which greatly enhances the capabilities of the chatbot and sets the groundwork for the impending events/plugins update. Details of their usage can be found in params documentation.
v2.0.0-beta.7
Added:
- Added
rcbTypingIndicatorContainerStyle
andrcbTypingIndicatorDotStyle
for ease of styling typing indicator