Skip to content

feat: opt into the Themeisle SDK Support Hub - #204

Open
vytisbulkevicius wants to merge 1 commit into
developmentfrom
feat/support-hub
Open

vytisbulkevicius wants to merge 1 commit into
developmentfrom
feat/support-hub

Conversation

@vytisbulkevicius

Copy link
Copy Markdown
Contributor

Opt Raft into the shared Themeisle SDK Support Hub — the Help button and deactivation window we added to Feedzy, Neve, Otter and Jaxon — by registering raft_support_hub_metadata, mirroring the existing _ai_connect_metadata filter.

What changed

  • inc/Admin.php — register the Support Hub filter and add get_support_hub_metadata() returning is_pro and the Help-form links.

Note

Raft is a free theme with no Pro tier, so is_pro is false. No SDK bump needed — development already ships themeisle-sdk 3.3.72. Nothing in the theme's support copy contradicts the Help panel.

QA

  1. Activate Raft on a site with themeisle-sdk 3.3.72+.

  2. Open the Dashboard or Appearance → Themes (the theme's own screens).

    Expect: a Help button bottom-right on the theme's screens (scoped by design, not every admin page). It opens the Support Hub form with the links.

  3. Go to Appearance → Themes → Add New with Raft active. Expect: the SDK theme/deactivation window appears.

Register the <slug>_support_hub_metadata filter so the shared Themeisle SDK
Support Hub (Help button and deactivation window) is enabled for this theme,
mirroring the existing _ai_connect_metadata filter. It is a free theme with no
Pro tier, so is_pro is false. Development ships SDK 3.3.72.
@pirate-bot

Copy link
Copy Markdown
Contributor

Plugin build for 74bcb6c is ready 🛎️!

@pirate-bot pirate-bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

QA check: The SDK contract and hook timing check out, but nobody saw the Help button render; please run the QA steps and add the requested test.

Validation details
  • Files reviewed: 1/1 changed files.
  • The locked themeisle-sdk 3.3.72 applies raft_support_hub_metadata during init and accepts this data shape. This was a source read.
  • Raft fires themeisle_internal_page only on the Dashboard and Themes screens for users with manage_options.
  • The history pass found no repeated bug. The early translation loading issue does not recur.
QA steps
  1. As an administrator with Raft active, open Dashboard. Expect a Help button at the bottom right.
  2. Click Help. Expect the Support Hub form with Documentation and Community Forum links.
  3. Click each link. Expect the Raft docs page and the Raft support forum to open.
  4. Open Appearance → Themes. Expect the same Help button.
  5. Open another admin page, such as Posts. Expect no Help button.
Untested areas
  • PHPUnit did not run because Composer dependencies were absent.
  • No site was set up, so the admin screens were not opened.

🤖 Automated review · run code-review-agent_6b04b90472af38.45700732.


🤖 Review agent — review posted ✅ on 74bcb6c1 · commented · 1 finding · 11 min

Run code-review-agent_6b04b90472af38.45700732 · trail

Comment thread inc/Admin.php
Comment on lines +473 to 490
public function get_support_hub_metadata() {
return array(
'is_pro' => false,
'links' => array(
array(
'icon' => 'book-alt',
'text' => __( 'Documentation', 'raft' ),
'url' => 'https://docs.themeisle.com/fse-themes/raft-fse-theme',
),
array(
'icon' => 'groups',
'text' => __( 'Community Forum', 'raft' ),
'url' => 'https://wordpress.org/support/theme/raft/',
),
),
);
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tests Add a test for the new Support Hub opt-in. The PHPUnit suite (phpunit.xml, tests/test-*.php) exists, but no test exercises raft_support_hub_metadata or get_support_hub_metadata(). A broken registration or a renamed key would silently hide the Help button. Add tests/test-admin.php with a case that asserts apply_filters( 'raft_support_hub_metadata', array() ) returns is_pro === false and two links, each with non-empty icon, text and url. Without the change, the filter returns array() and the case fails.

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