Skip to content

Releases: tjtanjin/react-chatbotify

v2.0.0-beta.16

08 Oct 00:26
1674d5e
Compare
Choose a tag to compare

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

05 Oct 19:29
Compare
Choose a tag to compare

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 inside event.detail to botId 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

03 Oct 17:09
Compare
Choose a tag to compare

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 for voice did not properly register voice inputs
  • Fixed an issue where settingdefaultOpen to true for chatWindow 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 to useToasts 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 and setHistoryMessages)
  • 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

25 Sep 17:53
8b1c167
Compare
Choose a tag to compare

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

20 Sep 04:00
Compare
Choose a tag to compare

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

19 Sep 19:42
Compare
Choose a tag to compare

Added:

  • Added a new useFlow hook that grants access to retrieving and restarting the conversation flows
  • The hasFlowStarted boolean which was previously found in useFirstInteraction has been moved to useFlow 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

17 Sep 17:04
Compare
Choose a tag to compare

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

15 Sep 19:15
Compare
Choose a tag to compare

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 or PathsContext), note that these have been removed in favor of a single provider (ChatBotProvider). The advance configuration section has also been removed from settings as the entire concept of advanced features is being dropped (more details here).

Breaking Changes (All Users):

  • The isOpen variable in settings which tracked the open/close state of the chatbot window has been removed, in favor of useChatWindow hook. More details here.
  • Last beta release, a new params.injectToast was added. This has been renamed to params.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 and streamMessage 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 a number as well (defaults interruptable to false).

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:

v2.0.0-beta.8

05 Sep 18:06
Compare
Choose a tag to compare

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 to settings which contains 3 properties (maxCount, forbidOnMax and dismissOnClick) along with 3 new additions to styles (toastPromptContainerStyle, toastPromptStyle, toastPromptHoveredStyle)
  • The checkboxes block attribute now accepts an array of strings as well, and will populate items property with it (all other values defaulted)
  • The checkboxes block attribute has 2 new properties sendOutput and reusable, 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 are items, sendOutput and reusable (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

01 Sep 04:11
Compare
Choose a tag to compare

Added:

  • Added rcbTypingIndicatorContainerStyle and rcbTypingIndicatorDotStyle for ease of styling typing indicator