Skip to content

Releases: tjtanjin/react-chatbotify

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

v2.0.0-beta.6

24 Aug 14:15
d0cae97
Compare
Choose a tag to compare

Fixed:

  • Fixed an issue where chat icon will not fit in the button correctly
  • Fixed an issue where baseUrl was wrongly named base_url

Added:

  • Added caching of themes locally to improve performance
  • Added optional cacheDuration field when specifying themes which specifies in seconds the duration to cache the theme for (defaults to 30 days)

v2.0.0-beta.5

15 Aug 11:57
Compare
Choose a tag to compare

Fixed:

  • Fixed an issue where cursor disabled icon was not showing up on mac devices

Added:

  • Added a bunch of new style props for buttons and icons to improve convenience in styling:
// new button styles
audioButtonStyle?: React.CSSProperties;
audioButtonDisabledStyle?: React.CSSProperties;
closeChatButtonStyle?: React.CSSProperties;
emojiButtonStyle?: React.CSSProperties;
emojiButtonDisabledStyle?: React.CSSProperties;
fileAttachmentButtonStyle?: React.CSSProperties;
fileAttachmentButtonDisabledStyle?: React.CSSProperties;
notificationButtonStyle?: React.CSSProperties;
notificationButtonDisabledStyle?: React.CSSProperties;
voiceButtonStyle?: React.CSSProperties;
voiceButtonDisabledStyle?: React.CSSProperties;

// new icon styles
chatIconStyle?: React.CSSProperties;
audioIconStyle?: React.CSSProperties;
audioIconDisabledStyle?: React.CSSProperties;
closeChatIconStyle?: React.CSSProperties;
emojiIconStyle?: React.CSSProperties;
emojiIconDisabledStyle?: React.CSSProperties;
fileAttachmentIconStyle?: React.CSSProperties;
fileAttachmentIconDisabledStyle?: React.CSSProperties;
notificationIconStyle?: React.CSSProperties;
notificationIconDisabledStyle?: React.CSSProperties;
voiceIconStyle?: React.CSSProperties;
voiceIconDisabledStyle?: React.CSSProperties;
sendIconStyle?: React.CSSProperties;

Note:
There were minor shifting of a few classes to better separate buttons and icons. This should not be an issue for the vast majority of users, but if you've done very specific changes to button/icon styles by targeting the CSS classes, it is advisable to visually check the appearance of said buttons/icons.

v2.0.0-beta.4

01 Aug 16:36
Compare
Choose a tag to compare

Fixed:

  • Fixed an issue where disabling chatInput globally cannot be overriden by block-level chatDisabled attribute

v2.0.0-beta.3

27 Jul 16:19
Compare
Choose a tag to compare

Fixed:

  • Fixed an issue where themes will override the current isOpen value in settings, causing it to open/close unexpectedly

v2.0.0-beta.2

25 Jul 16:11
Compare
Choose a tag to compare

Fixed:

  • Fixed an issue where theme conflicts are not properly resolved
  • Fixed an issue where invalid sections are not caught in themes
  • Fixed an issue where sensitive inputs permanently mask the remaining conversations
  • Fixed an issue where chatbot loses focus in text area when transitioning from a previously disabled state