Skip to content

v5.4.0

Latest

Choose a tag to compare

@aanshisingh-cometchat aanshisingh-cometchat released this 01 Dec 17:22
135a188

New

  • Added full right-to-left (RTL) support. Layouts, menus and directional icons mirror when the page is right to left (<html dir="rtl">) or the kit is set to RTL, while text keeps its own direction.
  • Added the CometChatLayoutDirection setting ('auto', 'ltr', 'rtl'). Set it globally with UIKitSettingsBuilder.setLayoutDirection(...) or CometChatUIKit.setLayoutDirection(...), or per component with the layoutDirection input. The default, 'auto', follows the page.
  • Added Arabic (ar) as a built-in language, and CometChatLocalize.getDirection(language?), which returns 'rtl' for right-to-left languages.
  • Added plural forms for member counts, thread reply counts and last-seen times ("عضوان", "منذ دقيقتين"), with new translation keys (member_count, thread_reply_count, thread_view_reply_count, last_seen_minutes_ago, last_seen_hours_ago) and RelativeTimeConfig.minutesPlural / hoursPlural. An app's own overrides of the old count words are kept.

Enhancements

  • Improved number display so that dates, times, counts and badges use Arabic-Indic digits in Arabic. CometChatLocalize.getDateLocaleLanguage() now returns 'ar-u-nu-arab' for 'ar'.
  • Improved mixed-direction text so that messages, names, previews and typed input keep their own reading order, and code blocks always read left to right.
  • Improved popovers and context menus so that they open on the correct side and stay inside the window.
  • Kept audio and video players and the call screen left to right in RTL layouts.
  • Improved conversation rows so that a long sender name in a group preview is truncated instead of pushing the message out.
  • Updated theme variables named -left or -right to follow the layout direction. Left-to-right layouts are unchanged.
  • Updated kit text elements to carry their own dir attribute. Visible order in left-to-right apps is unchanged, but DOM snapshot tests may change.

Fixes

  • Fixed the missed and incoming call icons being swapped in call logs.
  • Fixed the attachment menu cutting off its last options.
  • Fixed the last emoji column being cut off in the emoji keyboard and reaction picker.
  • Fixed a context menu opened beside its button running past the bottom of the window.
  • Fixed Pin and Save in the message options menu being unreachable by keyboard.
  • Fixed translated text being hard to read on incoming messages in the light theme.
  • Fixed long file names overflowing narrow message lists.