Skip to content

Improve Themes & Extensions dashboard and licensing flows#2932

Open
RabbiIslamRony wants to merge 5 commits into
sovware:developmentfrom
RabbiIslamRony:improve/themes-extensions-admin-dashboard
Open

Improve Themes & Extensions dashboard and licensing flows#2932
RabbiIslamRony wants to merge 5 commits into
sovware:developmentfrom
RabbiIslamRony:improve/themes-extensions-admin-dashboard

Conversation

@RabbiIslamRony

@RabbiIslamRony RabbiIslamRony commented Jul 23, 2026

Copy link
Copy Markdown
Member

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

How to reproduce the issue or how to test the changes

Problem

The legacy Themes & Extensions page mixes account authentication, subscription data, product discovery, plugin and theme lifecycle actions, and required-extension notices in a reload-heavy interface. Its connected and disconnected states are difficult to scan, several controls expose inconsistent behavior, and the page does not provide a useful connected-account dashboard.

This change rebuilds that admin experience while preserving the existing page slug, licensing metadata, filters, selectors, and wp_ajax_atbdp_* contracts used by existing Directorist installations.

What changed

Admin shell and navigation

  • Adds responsive Dashboard and Add-ons views inside the existing Themes & Extensions admin page.
  • Keeps edit.php?post_type=at_biz_dir&page=atbdp-extension as the canonical page URL.
  • Routes the Directorist Dashboard submenu to the Dashboard view and Themes & Extensions to Add-ons.
  • Keeps Docs, Tutorials, and Support as external resource links.
  • Scopes all new page styling to this admin surface.

Account connection and licensing

  • Keeps username/email and password as the default connection method.
  • Adds optional access-key authentication through the existing atbdp_authenticate_the_customer AJAX action.
  • Uses the Directorist License Manager account-login endpoint first and retains the legacy licensing endpoint as a compatibility fallback.
  • Normalizes both response formats into the existing entitlement structure.
  • Uses optional licensing-owner name, avatar, plan, expiration, and All Access fields when available, with safe generic fallbacks.
  • Never stores the submitted password or access key in WordPress user meta.
  • Reuses the existing Refresh Purchases and Disconnect actions and avoids duplicate authentication requests during reconnect.

Dashboard

  • Adds dynamic welcome and licensing summary content.
  • Uses configured Directorist URLs for View listings and Add listing.
  • Adds a real setup checklist based on directory types, categories, payment gateways, and published listings.
  • Adds dynamic listing, view, review, expiration, and paid-order summaries.
  • Adds recent listing, review, payment, registration, and expiration activity with filtering and pagination.
  • Adds directory-aware Quick Actions and builder deep links.
  • Adds directory-aware extension recommendations with deterministic rotation, manual navigation, pause behavior, reduced-motion support, and filter/API override points.

Add-ons catalog

  • Adds All, Extensions, and Themes tabs with live counts.
  • Adds Installed, Not installed, Updates, and Required filters.
  • Adds catalog search across product title, description, type, status, version, and badges, including matched-text highlighting.
  • Supports scalar and structured product badges with expiration handling.
  • Shows installed and available versions when provided.
  • Provides explicit Install, Activate, Update, Settings, Demo, View Details, Customize, and marketplace actions.
  • Keeps destructive plugin deletion in the overflow menu with confirmation.
  • Requires confirmation before switching the live WordPress theme.
  • Labels third-party active themes as WordPress themes.
  • Adds local fallback entries and images for Notifications Pro and Divi Integration.
  • Removes the retired Post Your Need marketplace item while retaining legacy installed-product detection compatibility.

Selection and product actions

  • Gives every row a stable selection column and disables selection only when no safe bulk action exists.
  • Computes bulk actions from selected-product capabilities and shows the eligible-item count for each action.
  • Skips incompatible selected items instead of blocking an otherwise valid bulk operation.
  • Preserves the existing install, update, activate, deactivate, uninstall, settings, and theme-management contracts.

Required extensions

  • Restores the active-theme required-extension journey in the redesigned catalog.
  • Maps legacy required-extension links to Add-ons, Extensions, and Required.
  • Merges required, subscribed, installed, and marketplace metadata into one canonical product row instead of rendering a second legacy table.

Documentation

  • Adds a repo-local Themes & Extensions skill covering architecture, dynamic contracts, account and licensing journeys, API data flow, performance guidance, compatibility rules, known rewrite issues, implementation decisions, and QA.
  • Documentation contains no credentials, customer data, runtime snapshots, or secret values.

Compatibility and safety

  • Preserves the page slug, capability, nonce action, AJAX action names, aliases, filters, settings links, legacy selectors, and _atbdp_has_subscriptions_sassion user meta.
  • Keeps server-rendered PHP as the canonical fallback.
  • Revalidates local WordPress plugin and theme state after lifecycle operations.
  • Keeps full-page reload fallback behavior for remote and filesystem operations.
  • Introduces no database migration, framework rewrite, feature flag, or new persistence layer.
  • All new licensing-account response fields are optional, so older API responses continue to work.

How to test

  1. Open wp-admin/edit.php?post_type=at_biz_dir&page=atbdp-extension on a disposable Directorist test site.
  2. In the disconnected state, confirm that the full marketplace catalog renders and that tabs, counts, search, badges, View Details, Demo, password visibility, keyboard focus, and responsive behavior work without connecting an account.
  3. Connect using a valid username/email and password. Repeat with a valid access key. Confirm both methods produce the same connected entitlement state and that invalid or unavailable remote responses show an inline error.
  4. Confirm the Dashboard uses licensing-owner data when available and generic copy when optional account fields are missing.
  5. Verify View listings, Add listing, setup checklist, Quick Actions, directory selector, recommendations, activity filters, and activity pagination with zero, one, and multiple directory types.
  6. Open Add-ons and verify All, Extensions, Themes, Installed, Not installed, Updates, and Required counts and filters. Confirm catalog search highlights matching title/description/badge text.
  7. On a disposable site, test eligible Install, Activate, Update, Settings, Deactivate, Delete, Customize, and theme-switch actions. Confirm destructive actions require confirmation and canonical server state is restored after completion or failure.
  8. Select products with mixed capabilities and confirm each bulk action affects only eligible selected rows.
  9. Activate a Directorist theme with required extensions and confirm its legacy admin notice opens the Required filter with the correct products.
  10. Open the account menu, expand and close Refresh Purchases, reopen the menu, and confirm the refresh control returns to its initial state. Verify Escape, outside-click, focus, and Disconnect behavior.
  11. Check desktop and a 390px mobile viewport for clipped navigation, overlapping menus, unreadable product titles, and horizontal overflow.

Verification performed

  • PHP syntax checks passed for:
    • includes/classes/class-extension.php
    • includes/classes/class-extension-activity.php
    • includes/classes/class-extension-recommendations.php
    • includes/classes/class-metabox.php
    • views/admin-templates/theme-extensions/theme-extension.php
  • JavaScript syntax checks passed for the page runtime and legacy subscription handler.
  • npm run build-legacy completed successfully with only existing Sass, flex-support, and bundle-size warnings.
  • git diff --check passed for the committed source set.
  • Connected and disconnected desktop/mobile flows were visually inspected.
  • Destructive product, account, and theme actions were not executed during browser QA.

Any linked issues

N/A

Checklist

Full PHPCS remains pending because the upstream pull_request_target workflow rejects fork checkout before dependencies are installed or PHPCS starts. This is a workflow-policy failure rather than a PHPCS result; the PHP syntax checks listed above passed locally.

Redesign the Themes & Extensions admin surface with the new connected and disconnected page shell while preserving the existing page slug, AJAX action names, product filters, and subscription/user-meta contracts.

Add page-scoped CSS/JS for dashboard/add-ons view switching, account dropdown behavior, searchable/highlighted product rows, compact badges, responsive bulk actions, and safer connected/disconnected product actions.

Add local fallback entries and images for Directorist Notifications Pro and Directorist Divi Integration, plus badge normalization support for scalar and structured API badge data.

Document the architecture, API, licensing, badge, safety, and current implementation decisions in the repo-local Themes & Extensions skill references.

Generated assets/build files are intentionally excluded from this commit.
Redesign the account-connected dashboard and add-ons catalog with responsive product rows, filters, bulk actions, required-extension routing, account controls, access-key authentication, and dynamic licensing-owner plan data.

Add real activity feeds, directory-aware quick actions and recommendations, WordPress theme labeling, update notifications, and compatible builder deep links while preserving existing AJAX actions, nonces, legacy user meta, install/update flows, and disconnected behavior.

Document the cross-repository licensing boundaries, API normalization, local cache, security requirements, QA matrix, and implementation decisions without storing customer credentials or runtime account data.
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