Skip to content

feat: control chat visibility from the dashboard#189

Merged
HardeepAsrani merged 2 commits into
developmentfrom
feat/chat-visibility-rules
Jul 3, 2026
Merged

feat: control chat visibility from the dashboard#189
HardeepAsrani merged 2 commits into
developmentfrom
feat/chat-visibility-rules

Conversation

@HardeepAsrani

@HardeepAsrani HardeepAsrani commented Jul 3, 2026

Copy link
Copy Markdown
Member

Description

Adds visibility rules for the chat, replacing the single Enable/Disable toggle on the dashboard.

Under Hyve → Dashboard → "Where should Hyve appear?" the admin can pick:

  • Show on all pages
  • Show only on selected content — the chat appears only on the URLs listed below
  • Show everywhere except selected content — the chat is hidden on the URLs listed below
  • Don't show automatically — the chat is only placed via the block or shortcode

For the two "selected content" modes, content is matched by URL path with a contains (whole section, e.g. /shop/) or matches (one exact URL) operator. Blocks and shortcodes continue to work for manual placement in every mode.

The old chat_enabled toggle is migrated to the new display_mode setting automatically (enabled → all pages, disabled → don't show automatically), so existing sites keep their current behavior.

Closes: https://github.com/Codeinwp/hyve/issues/189

Screenshot

Screenshot 2026-07-03 at 8 48 26 AM

QA

  1. On a site upgrading from a previous version:
    • A site that had chat enabled should now show "Show on all pages" selected, and the chat still appears everywhere.
    • A site that had chat disabled should show "Don't show automatically" selected, and the chat does not auto-appear.
  2. Show on all pages → chat appears on the front page, posts, and pages.
  3. Show only on selected content:
    • Add a rule / with operator matches → chat appears only on the homepage.
    • Add a rule /shop/ with operator contains → chat appears on every URL under /shop/ (e.g. a product), and nowhere else.
    • Click Save visibility and confirm "Saved." appears, then reload and confirm the rules persisted.
  4. Show everywhere except selected content:
    • Add a rule for a page's path → chat appears everywhere except that page.
  5. Don't show automatically → chat does not appear anywhere on its own.
  6. In every mode, the Hyve block and [hyve] shortcode still render the chat where placed.
  7. The empty-knowledge-base notice and Overview stats on the dashboard still render as before.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

Plugin build for 327524b is ready 🛎️!

Replace the single Enable/Disable toggle with visibility rules on the dashboard: show on all pages, only on selected content, everywhere except selected content, or not automatically (block/shortcode only). Selected content is matched by URL path using contains/matches operators.

The legacy chat_enabled flag is migrated to the new display_mode setting via the SDK migrator, with a read-time fallback for installs that have not migrated yet.
@HardeepAsrani HardeepAsrani force-pushed the feat/chat-visibility-rules branch from 9c959f0 to 6d95858 Compare July 3, 2026 03:45
@HardeepAsrani HardeepAsrani merged commit d72ce95 into development Jul 3, 2026
7 checks passed
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