Skip to content

Render the front-end chat with a front:chat tag - #34

Merged
edalzell merged 2 commits into
chore/simplify-chatfrom
feature/chat-tag
Oct 14, 2026
Merged

edalzell merged 2 commits into
chore/simplify-chatfrom
feature/chat-tag

Conversation

@edalzell

Copy link
Copy Markdown
Member

The shipped front-end integration didn't work: head.antlers.html was never registered as a view (loadViewsFrom was commented out) and it fetched /front/config, while the addon's route was /!/front/config. transformstudios.com only works because it copied both the partial and a FrontConfigController into the app.

Replaces all of it with {{ front:chat }}, which renders the Front loader plus an inline FrontChat('init', …) with the current user's details embedded server-side via Js::from, so there's no JSON endpoint, controller or extra request. It renders nothing unless show_on_front_end, the chat id and the secret key are all set. ChatConfig now emits userHash (Front's own option name) so both the tag and cp.js spread the config straight into init.

Breaking: /!/front/config is gone. Consumers swap their copied partial/controller for {{ front:chat }} in the layout head.

Stacked on #33.

@edalzell
edalzell added this pull request to stack #35 October 14, 2026 01:51
@edalzell
edalzell merged commit ece189e into main Oct 14, 2026
3 checks passed
@edalzell
edalzell deleted the feature/chat-tag branch October 14, 2026 02:06
@edalzell edalzell mentioned this pull request Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant