-
Notifications
You must be signed in to change notification settings - Fork 33
Implement Traffic Boost feature #3344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # package-lock.json # src/content-helper/common/settings/provider.tsx
…add/traffic-boost-backend
…on a loading state.
Traffic Boost: Add backend implementation
…o add/traffic-boost
|
Caution Review failedFailed to post review comments. 📝 WalkthroughWalkthroughThis update introduces a comprehensive "Traffic Boost" feature for the Parse.ly WordPress plugin, including backend REST API endpoints, WordPress admin UI integration, React-based dashboard pages, and supporting infrastructure for managing and previewing smart links. It also refactors smart link handling to support ITM parameters, adds new provider classes, updates type definitions, and enhances error handling, permissions, and settings management. Changes
Sequence Diagram(s)sequenceDiagram
participant AdminUser
participant WP_Admin_UI
participant DashboardReactApp
participant REST_API
participant SmartLinkModel
participant TrafficBoostProvider
AdminUser->>WP_Admin_UI: Navigates to Parse.ly Dashboard
WP_Admin_UI->>DashboardReactApp: Loads React app container
DashboardReactApp->>REST_API: Fetch posts, metadata, smart links, suggestions
REST_API->>SmartLinkModel: Get smart link counts, statuses
REST_API->>TrafficBoostProvider: Get/generate suggestions, placements
REST_API-->>DashboardReactApp: Return posts, links, suggestions, stats
AdminUser->>DashboardReactApp: Interacts with Traffic Boost UI (search, select post)
DashboardReactApp->>REST_API: Generate/accept/discard/update inbound links
REST_API->>TrafficBoostProvider: Process link actions, update models
TrafficBoostProvider->>SmartLinkModel: Apply/remove/update smart links
TrafficBoostProvider-->>REST_API: Return updated link state
REST_API-->>DashboardReactApp: Respond with result
AdminUser->>DashboardReactApp: Opens post preview
DashboardReactApp->>REST_API: Request preview nonce, post content
REST_API-->>DashboardReactApp: Return preview data
DashboardReactApp->>WP_Admin_UI: Render preview iframe with highlights, controls
sequenceDiagram
participant AdminUser
participant SettingsPage
participant REST_API
participant CheckAuthProvider
AdminUser->>SettingsPage: Opens Content Helper settings
SettingsPage->>CheckAuthProvider: Request Suggestions API and Traffic Boost auth status
CheckAuthProvider->>REST_API: POST /check-auth (for each scope)
REST_API-->>CheckAuthProvider: Return auth status
CheckAuthProvider-->>SettingsPage: Provide status
SettingsPage->>SettingsPage: Display status messages (access, request, or contact support)
sequenceDiagram
participant WP_Post
participant SmartLinkModel
participant InboundSmartLink
participant HTML5Parser
SmartLinkModel->>InboundSmartLink: Create inbound smart link
InboundSmartLink->>WP_Post: Fetch post content
InboundSmartLink->>HTML5Parser: Parse HTML content, locate paragraph/text
HTML5Parser-->>InboundSmartLink: Return DOM node/paragraph
InboundSmartLink->>WP_Post: Apply/remove/update link in content
WP_Post-->>InboundSmartLink: Save updated content/meta
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm warn config production Use ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Description
With this work, we're merging the Traffic Boost feature to our
developbranch.Most of the code was authored by @vaurdan, with @alecgeatches and myself completing the work. It introduces a Parse.ly menu in the WordPress admin, which links to the new Traffic Boost feature and the plugin's settings.
Motivation and context
Implements #2887.
Screenshots
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Documentation
Chores