Skip to content

Style agent links + fix dock toggle and popup rounded corners#7

Merged
aaronaccessvr merged 1 commit into
mainfrom
fix/widget-link-dock-rounded
May 15, 2026
Merged

Style agent links + fix dock toggle and popup rounded corners#7
aaronaccessvr merged 1 commit into
mainfrom
fix/widget-link-dock-rounded

Conversation

@aaronaccessvr
Copy link
Copy Markdown
Collaborator

@aaronaccessvr aaronaccessvr commented May 15, 2026

Summary

Chat-widget chrome polish, all driven by device capability rather than a JS isMobile flag (which never populated — the iframe route read $request->isMobile for a query param actually named mobile; a later attempt used Tailwind sm: breakpoints, but those query the 375px iframe, never the host device).

  • Dock/undock toggle — was hidden on every device. Now gated on @media (hover: hover) and (pointer: fine) via .sbm-fine-pointer-only: shows on mouse/trackpad, hides on touch.
  • Popup rounded corners / border — same sm:-in-an-iframe bug; restored via .sbm-popup-chrome / .sbm-header-chrome.sbm-undocked under the same media query.
  • Header white seams — the dark region is three separately-painted mainColor elements; adjacent ones leaked a 1px sliver of the iframe white. Closed with -mb-px overlap on the header bar and heading slot.
  • Beacon corner offset — the beacon iframe is beaconSize+15 with the circle centered, so the badge sat ~7.5px farther from the corner than intended. Desktop/mobile offsets dropped to 33/13px so the circle lands ~40/20px from the corner.
  • Configurable link styling — new linkColor / linkUnderline theme settings wired through CSS custom properties on the bot-message body (mirrors the existing mainColor pattern). Host apps override the color to match brand.
  • Removed the dead isMobile config path from routes/web.php.

Independent of the input-height/header-seam PR #6.

Test plan

  • Desktop: popup has rounded corners + visible dock toggle; clicking docks as sidebar; no white seams in the dark header.
  • Touch/mobile: edge-to-edge panel, no rounded corners, no dock toggle.
  • Beacon sits ~40px from the lower-right corner on desktop.
  • Agent message link renders colored + underlined; host can override linkColor / linkUnderline.

🤖 Generated with Claude Code

…ty queries

Three related chat-widget issues, fixed without a JS-tracked isMobile
flag (which never populated — the iframe route read $request->isMobile
for a query named `mobile`, so the store flag was permanently false,
and Tailwind sm: breakpoints query the 375px iframe, not the host
device).

Dock toggle + popup chrome: gate visibility/rounding on
@media (hover: hover) and (pointer: fine) instead of viewport width.
Pointer/hover media queries inside an iframe report the host device's
input capabilities, so the dock-as-sidebar control shows on
mouse-driven devices and hides on touch, and the popup gets its
rounded corners/border back on desktop. New .sbm-fine-pointer-only /
.sbm-popup-chrome / .sbm-header-chrome.sbm-undocked classes carry this;
the dead isMobile config path is removed from routes/web.php.

Agent-emitted links: add configurable theme settings (linkColor,
linkUnderline) wired through CSS custom properties on the bot-message
body, so links render with a visible color + underline instead of
default black. Host apps override the color to match brand.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aaronaccessvr aaronaccessvr merged commit 4d3f1dd into main May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants