Skip to content

feat: trigger button stays visible and toggles widget open/close - #109

Merged
mortondev merged 35 commits into
mainfrom
feat/trigger-as-toggle
Mar 31, 2026
Merged

feat: trigger button stays visible and toggles widget open/close#109
mortondev merged 35 commits into
mainfrom
feat/trigger-as-toggle

Conversation

@mortondev

Copy link
Copy Markdown
Member

Summary

  • Widget panel now floats above the trigger button (80px from bottom vs 24px), keeping the trigger visible at all times on desktop
  • Trigger toggles the widget: chat icon when closed, X icon when open — no more separate close button
  • Removed the X close button from the widget header
  • Mobile unchanged: panel still slides up full-screen, trigger hides behind it

Closes #107

Test plan

  • Open widget on desktop — button stays visible below the panel
  • Click trigger while widget is open — it closes
  • Escape key still closes the widget
  • Widget header no longer shows X button
  • On mobile — panel covers full screen, trigger hides as before
  • Left placement (placement: "left") works correctly

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e79c0aab3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<XMarkIcon className="w-4 h-4 text-muted-foreground" />
</button>
</div>
<div className="flex items-center gap-1">{user && <UserAvatarPopover user={user} />}</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve a close control when using trigger: false

This removes the in-widget close button, but the SDK path that skips trigger creation (init/identify with trigger: false) still exists, so some embeds will have no built-in toggle to close the panel. On desktop there is no backdrop-click close, so users can get stuck in the widget unless the host page implemented its own close control or they use Escape.

Useful? React with 👍 / 👎.

Comment on lines +276 to +277
if (isMobile) {
trigger.style.display = "flex";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore hidden trigger after viewport switches to desktop

In hidePanel, re-showing the trigger is now conditional on isMobile. If the widget is opened on mobile (trigger hidden) and the viewport crosses to desktop before close, isMobile is false at close time, so this branch is skipped and the trigger stays hidden, preventing reopen via the floating button.

Useful? React with 👍 / 👎.

- Replace ScrollArea with plain overflow-y-auto div, eliminating the
  Radix display:table wrapper that caused horizontal overflow on the
  feedback list
- Add toggleable board filter pills below "Popular ideas" heading;
  clicking an active pill deselects (returns to all boards)
- Add left/right chevron nav buttons with fade gradients for pill row
  overflow on desktop; scrollbar hidden via new scrollbar-none utility
- Add scrollbar-none @Utility to globals.css
- Move liveCommentCountSq subquery inside refreshStaleSummaries to
  avoid module-level db query construction at import time
- Guard logStartupBanner against missing SECRET_KEY during Nitro's
  initial build evaluation pass
- Switch from vite-tsconfig-paths plugin to native resolve.tsconfigPaths;
  add routeFileIgnorePattern to exclude __tests__ from route discovery
- Replace inline webkit scrollbar variants with scrollbar-thin utility
- Guard usePillsScroll setState with functional updater to skip no-op
  re-renders during smooth scroll
- Remove redundant JSX section comments
…mentation

- Panel offset 80px → 88px (larger trigger button)
- Icon swap now uses opacity/transform transitions on separate iconChat/iconClose
  elements rather than swapping trigger.innerHTML directly
Search is now hidden by default — a magnifying glass icon sits inline
with the "Popular ideas" heading and expands to a full input on click,
removing a permanently visible input row from the widget.
@mortondev
mortondev merged commit 4c1c729 into main Mar 31, 2026
2 checks passed
@mortondev
mortondev deleted the feat/trigger-as-toggle branch March 31, 2026 08:24
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.

1 participant