Skip to content

feat(popup-maker): add Popup Maker action integration - #207

Open
RishadAlam wants to merge 4 commits into
mainfrom
feat/popup-maker
Open

feat(popup-maker): add Popup Maker action integration#207
RishadAlam wants to merge 4 commits into
mainfrom
feat/popup-maker

Conversation

@RishadAlam

Copy link
Copy Markdown
Member

Description

Adds the Popup Maker action integration to the free plugin: the AJAX routes, the record helper that dispatches each action to the Pro plugin over a filter, and the full React step wizard. Nine actions are exposed — create, update, delete, change status and reset counts for popups, track an analytics event, and create, update and delete subscribers.

Motivation & Context

Popup Maker already existed as a trigger, so a flow could start from a subscription form but could not act back on Popup Maker. This adds the action side, letting a flow create or update popups, manage subscribers and record analytics events from any trigger.

Related Links: (if applicable)

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • ⚡ Improvement
  • 🔄 Code refactor

Key Changes

Backend

  • Added PopupMakerController with the execute() entry point the Flow engine calls, plus refreshPopups / refreshThemes endpoints that feed the dropdowns. Both queries skip the meta and term caches, since only ids and titles are rendered.
  • Added RecordApiHelper, which resolves ${field} tokens from trigger data and dispatches each action through a bit_integrations_popup_maker_* filter, so the free plugin holds no Popup Maker logic of its own.
  • Added Routes.php registering the two refresh endpoints.
  • Fixed a missing mainAction no longer falling back to create_popup. A flow that lost its action now reports Invalid action instead of silently publishing a popup.

Frontend

  • Added the PopupMaker step wizard — authorization by POPMAKE_VERSION constant check, an action picker, per-action field maps, and a Utilities panel for popup status, size, animation, force delete and subscriber consent.
  • Added registration in NewInteg, EditInteg, IntegInfo and SelectAction.
  • Updated the action list to drop Show Popup, which could only ever open a popup client side on the user's next page view.

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Tests added/updated
  • Documentation updated if needed
  • README updated if needed

Changelog

  • New Actions

  • Popup Maker: 9 new events added (Pro).

  • New Feature

  • Popup Maker (Action): Popups can be created, updated, deleted, have their status changed and their analytics counters reset from any trigger.

  • Popup Maker (Action): Subscribers can be created, updated and deleted, with optional popup attribution and consent.

Notes for reviewers

  • Every action is gated behind Pro. Without it, RecordApiHelper returns the "Bit Integrations Pro is not installed or activated" response, and the UI disables each option through checkIsPro.
  • tutorialLinks.js has no popupMaker entry yet, so the authorization step shows no doc or tutorial link. It needs a real URL before release.

Popup Maker existed as a trigger only. Add the free side of its action
integration: a controller exposing the popup and theme dropdowns, a
RecordApiHelper routing ten write actions to their pro hooks, and the
wizard, layout, field map and utilities components.

Actions cover popups (create, update, delete, change status, show, reset
counts, track event) and subscribers (create, update, delete). Read actions
are deliberately absent — fetched data belongs in a dropdown, not a flow step.

Each action's target identifier stays in the field map so it can be mapped
from trigger data, while fixed option sets and fetchable config choices are
selects.
Review cleanups on the free side of the integration.

The popup and theme dropdowns primed the post meta and term caches for a list
that renders ids and titles only, pulling every popup's serialized settings
along the way. Switching actions also refetched lists already held in state,
even though the refresh buttons cover that.

PopupMakerActions received formFields and setSnackbar it never destructured,
opened its modal through a state write whose only effect was an empty
utilities object, and restated the action lists that staticData already
exports.
The Show Popup action queued a popup in user meta and opened it on the
user's next front-end page view, which needed a logged-in WordPress user
and only ever fired client side. Remove it along with its field set and
the explanatory note in the layout.
mainAction no longer falls back to create_popup, so a flow that lost its
action reports "Invalid action" instead of publishing a popup.

Also drop the comments that only restated the code they sat above.
Copilot AI review requested due to automatic review settings August 2, 2026 05:08

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

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