Commit Graph

172 Commits

Author SHA1 Message Date
Abhinav Raut dee7ee6e79 keep Help aligned with the widget language fallback 2026-10-19 00:48:58 +05:30
Abhinav Raut c4723ea041 fix widget language fallback and Help loading after language changes 2026-10-19 00:39:51 +05:30
Abhinav Raut 13bfa07402 merge main into the widget language branch 2026-10-19 00:00:30 +05:30
Abhinav Raut a58bdf6579 fix language matching in the widget and help center
Keep the chosen article language when widget buttons use another translation.
Match regional codes without mixing Traditional and Simplified Chinese.
2026-10-18 23:40:32 +05:30
Abhinav Raut 5379473b65 fix panel resizing and style avatar fallbacks
Let the main panels fill the remaining space to avoid layout warnings.
Save the conversation sidebar width in pixels to keep both dividers independent.

Use explicit transition timing for emoji pickers to remove Tailwind warnings.

Center avatar initials on a subtle theme gradient.
2026-10-14 23:53:59 +05:30
Abhinav Raut 286ffd6afa fix article width and previews after language changes 2026-10-12 01:35:56 +05:30
Abhinav Raut f87d99f452 polish app layouts and fix UI regressions
Use available admin space and make forms adapt to screen width.
Preserve reply edits during resizing and improve widget feedback.
2026-10-12 00:34:18 +05:30
Abhinav Raut e5f2ac3a1b make citation popups work with touch and keyboard 2026-10-10 21:56:07 +05:30
Abhinav Raut 00064990f3 adjust citation links and typing bubble height 2026-10-10 21:47:28 +05:30
Abhinav Raut 22b3591adc open citation articles through the popup 2026-10-10 21:41:43 +05:30
Abhinav Raut 08f2cc9c35 remove parentheses from widget citation badges 2026-10-10 21:38:27 +05:30
Abhinav Raut b04590929c improve widget citations and typing dots 2026-10-10 21:37:03 +05:30
Abhinav Raut 51426f1a78 add inline citations and preserve widget line breaks 2026-10-10 21:21:46 +05:30
Abhinav Raut b0086de92b fix code wrapping in widget messages 2026-10-10 17:50:19 +05:30
Yinghao Sun f300f33055 clear the help error when the language changes 2026-10-05 08:58:35 +01:00
Yinghao Sun 2d76cb14fe keep the latest widget language and reset help when it changes 2026-10-05 07:59:11 +01:00
Yinghao Sun 475bf6916c let the host page choose the live chat widget language
The widget's UI language was either the inbox's fixed language or, on
"auto", the browser's. Host apps with their own language switch had no
way to tell the widget which language their user picked.

- widget.js: an optional `language` setting (LibredeskSettings or
  initLibredesk) is passed to the iframe as `lang`, and
  `Libredesk.setLanguage(code)` switches it later. A call made while the
  iframe is still loading is sent once it reports WIDGET_LOADED.
- main.js: on inboxes set to "auto", a `lang` the host passed wins over
  the browser language; a language the admin fixed for the inbox stays.
- App.vue: SET_LANGUAGE loads the strings and switches the i18n locale in
  place (help center content reloads in the new language), so an open
  conversation is not reset.
- Short or regional tags match a shipped translation: zh -> zh-CN,
  de-AT -> de-DE.

Closes #657
2026-10-04 23:13:59 +01:00
Abhinav Raut bfcdcc0dbe tune animations across the app and widget 2026-10-04 22:37:14 +05:30
Abhinav Raut 8068c28cb2 simplify new i18n keys 2026-09-23 03:28:20 +05:30
Abhinav Raut a431211a0d stop the handoff form from sending itself empty and reload stale settings 2026-09-23 00:30:54 +05:30
Abhinav Raut e30843a5ef remove unused top-level quick replies from live chat config 2026-09-23 00:16:41 +05:30
Abhinav Raut 5702bbbd77 Bug fixes in live chat widget form and more e2e tests 2026-09-22 12:19:57 +05:30
Abhinav Raut 127d98c46e fix proactive message bugs and simplify launcher and preview settings 2026-09-22 03:17:42 +05:30
Abhinav Raut a6143729c7 fix widget compatibility and asset loading 2026-09-22 01:57:49 +05:30
Abhinav Raut 374cd26e4a improve live chat widget settings and branding
Reduce the inbox form to five grouped tabs and add a responsive live preview.
Add separate light and dark branding with system theme support.
Add launcher size and logo scale controls. Ref #627
Fix realtime message ordering in the agent dashboard. Fixes #626
2026-09-22 01:29:25 +05:30
Abhinav Raut 835128504e fix widget, search and help center bugs
- handoff form no longer overwrites a JWT contact's name, email or phone.
  The CRM resyncs those on every exchange, so the edit reverted anyway.
  Visitors still get their submitted values saved.
- search queries dropped the cs and cp table aliases. Any saved view
  filtering on conversation_statuses.name returned a 500.
- status and priority never showed as selected in the search filters.
  The combobox compares strings, the store gives numbers.
- widget logout left the previous visitor's pre chat draft on screen.
- an auto hidden campaign preview was suppressed forever instead of for
  the session.
- switching campaigns in the admin preview did not close the open panel.
  The watcher only saw null and non null, so it now keys on campaign id.
- the Help tab blanked out when featured_ids came back as null.
- copilot panel spinner stuck when no conversation was open.
- help center theme toggle was hidden when there were no nav links and
  one locale.
- help center dark mode leaked into the article panel inside the widget.
2026-09-20 22:51:20 +05:30
Abhinav Raut bd3e73612c add dark mode to the help center
A moon button next to the language picker switches the site between light
and dark. Visitors start in light and the choice is saved in their browser.
Admins get a dark logo field, a checkbox to hide the button, and a light
or dark switch on the customize preview. Colors an admin picks for the
header and footer only apply in light mode.
2026-09-20 21:35:10 +05:30
Abhinav Raut 2d4a039d61 reduce shadow intensity on reply buttons 2026-09-20 19:59:42 +05:30
Abhinav Raut f9564faeaf move typing bubble style into TypingIndicator 2026-09-20 19:58:10 +05:30
Abhinav Raut 0e18223725 send csat in livechat and fix widget dark mode menus 2026-09-20 19:51:30 +05:30
Abhinav Raut c0d7388f19 keep zero campaign delay and scroll to an unread first message 2026-09-20 19:00:40 +05:30
Abhinav Raut 08e6801fc4 polish widget UI and fix proactive message delete
Widget:
- home background stays pinned while the content scrolls, fade sits on it
- one radius and shadow scale across cards, buttons and inputs
- live search in the help tab with a "no results" state
- attachment-only messages show "Image" in the conversation preview
- launcher and panel use the same shadows as the header

Admin:
- preview column is a fixed width so zoom does not resize it, hidden on small screens
- preview matches the real widget again
- search spinner replaces the magnifier instead of covering the page

Fixes:
- deleting a proactive message did nothing, the dialog cleared the pending
  id before the handler read it
- an inbox created through the API could not be saved from the form, it
  jumped to the pre-chat tab with no error

Adds livechatWidgetTabs.cy.js covering the proactive message and help
center tabs.
2026-09-20 18:48:51 +05:30
Abhinav Raut a074bc4d55 add hover animation to widget launcher
The launcher grows a little on hover and springs back when the pointer
leaves. Also adds a black launcher logo for light backgrounds, softens
the launcher shadow, and expands the widget when help opens on an article.
2026-09-19 17:27:01 +05:30
Abhinav Raut b290031089 Merge remote-tracking branch 'origin/main' into libredesk-widget-improvements 2026-09-19 03:58:41 +05:30
Abhinav Raut f6f1bb4ad1 show helpcenter article as is inside the widget. adds new ?embed query param that shows the entire helpcenter in embed mode 2026-09-19 03:58:04 +05:30
Abhinav Raut 173c0a5124 Merge pull request #622 from abhinavxd/optimize-build
speed up builds and load app layouts on demand
2026-09-19 03:57:02 +05:30
Abhinav Raut ec00b94be5 speed up builds and load app layouts on demand 2026-09-19 03:48:34 +05:30
Abhinav Raut 7c9fac4f4a show idle agents as online instead of away
Idle agents still get auto-assigned tickets. Only the manual away
statuses skip them. The amber away dot made other agents think the
idle person would not get tickets. The agent picker, widget header
and the agents report now treat idle as online.
2026-09-19 02:26:37 +05:30
Abhinav Raut d2dc51b734 link article translations by group id and tidy the widget chat
Move the translation_group_id migration into v2.9.0 and drop the slug backfill. Existing articles each get their own group and admins link translations from the new UI. The public article page now builds its language links from the group instead of the slug, so translations with different slugs no longer 404.
2026-09-19 02:13:13 +05:30
Abhinav Raut 28b33a1b56 insert campaign reply messages in the conversation transaction, allow zero cooldown, scope handoff drafts and parent origin 2026-09-18 20:11:54 +05:30
Abhinav Raut 216451647b label audience prechat toggle, pin handoff conversation, clear dismissed preview timers 2026-09-18 20:07:35 +05:30
Abhinav Raut 7848551326 fix review findings in widget campaigns and help search 2026-09-18 18:42:15 +05:30
Abhinav Raut 658e4e00a5 discard stale help searches 2026-09-18 16:40:00 +05:30
Abhinav Raut 23b4dea6f2 block duplicate handoff submissions 2026-09-18 16:39:55 +05:30
Abhinav Raut 7d77754b52 improve live chat widget flows
Expand widget conversations with audience-specific forms, AI handoffs, message previews, and help article translations. Keep existing inbox settings compatible and reject invalid live chat configuration.
2026-09-18 16:09:15 +05:30
Abhinav Raut 9c1e14704f fix campaign reply and poll edge cases, enlarge mobile launcher 2026-09-18 01:05:21 +05:30
Abhinav Raut 89f58904d2 wip: add widget campaigns, help center in widget and transcript download 2026-09-16 02:11:44 +05:30
Abhinav Raut f6ba29127a fix widget messages vanishing when upload takes over 10 seconds 2026-08-22 11:59:29 +05:30
Abhinav Raut 6ee25df742 show the visitor label on the widget messages tab
The new-conversation button always read the users label, so a visitor saw
the text meant for logged-in contacts. Pick visitors or users the same way
the home screen does. Adds tests for this and for the allow-plus-prevent
combination on the messages tab, both checked against the old code first.
2026-08-21 23:45:08 +05:30
Abhinav Raut 19146541e4 use the country code label and gate the conversations list button too
The country-code length error borrowed the phone number label, so a
too-long country code read as a phone number limit. Adds a countryCode
term for it. ConversationsView also offered the new-conversation button
when prevent_multiple_conversations was set, without checking whether
visitors may start one at all, so it now follows the same rule as the
home screen and the server.
2026-08-21 23:26:40 +05:30