Skip to content

Feature: New Classic Editor Interface#97

Open
s3rgiosan wants to merge 51 commits intofeature/data-api-backbonefrom
feature/classic-editor-support
Open

Feature: New Classic Editor Interface#97
s3rgiosan wants to merge 51 commits intofeature/data-api-backbonefrom
feature/classic-editor-support

Conversation

@s3rgiosan
Copy link
Copy Markdown
Member

@s3rgiosan s3rgiosan commented Feb 22, 2025

Warning

This PR is based on top of #94

Description of the Change

This PR replaces the existing Vue-based classic editor UI with a React-based interface that uses the same components and WordPress Data API store as the Block Editor, ensuring a consistent user experience across both editors and eliminating the Vue dependency.

Key Changes:

  • Removed Vue Dependency:

    • Removed the Vue.js-based classic editor implementation
    • Eliminated vue-resource and other Vue-related dependencies
    • Removed the old content-connect.js bundle that contained Vue components
  • New Classic Editor Implementation:

    • Created ClassicEditor.php class to handle classic editor integration
    • Implemented classic-editor.tsx entry point that mounts React components in classic editor meta boxes
    • Uses the same RelationshipManager component as the Block Editor
    • Shares the same WordPress Data API store (wp-content-connect) for state management
    • Integrates with the same REST API endpoints for fetching and updating relationships
  • Component Reuse:

    • Classic editor now uses the same RelationshipManager component as the Block Editor
    • Both editors use the same @10up/block-components ContentPicker component
    • Consistent UI/UX across Block Editor and Classic Editor
    • Same relationship configuration support (sortable, max_items, post_type filtering)

Closes #45

How to test the Change

  1. Setup:

    • Ensure you have relationships configured with enable_ui: true
    • Disable the Block Editor for a post type (or use a post type that doesn't support it)
  2. Classic Editor Testing:

    • Edit a post in the Classic Editor that has relationships configured
    • Verify that relationship meta boxes appear in the sidebar
    • Test adding, removing, and reordering related entities using the ContentPicker
    • Verify that changes are saved immediately when interacting with the picker
    • Save the post and verify relationships persist correctly
    • Refresh the page and confirm relationships are still present
  3. Cross-Editor Consistency:

    • Compare the UI in Classic Editor with Block Editor
    • Verify both editors show the same ContentPicker interface
    • Test that relationship configuration (sortable, max_items) works the same in both editors
  4. Regression Testing:

    • Verify that Block Editor functionality is unaffected
    • Test that existing relationships continue to work
    • Verify that both post-to-post and post-to-user relationships work in classic editor

Changelog Entry

  • Changed - Replaced Vue-based classic editor UI with React-based implementation using shared Block Editor components.
  • Removed - Vue.js dependency and vue-resource package.

Credits

Props @s3rgiosan @fabiankaegy

Checklist

@s3rgiosan s3rgiosan changed the base branch from develop to feature/data-api-backbone February 22, 2025 01:46
@s3rgiosan s3rgiosan self-assigned this Feb 22, 2025
@s3rgiosan s3rgiosan requested a review from fabiankaegy March 14, 2025 17:13
@s3rgiosan s3rgiosan marked this pull request as ready for review March 14, 2025 17:13
@s3rgiosan s3rgiosan requested a review from rickalee as a code owner March 14, 2025 17:13
@s3rgiosan
Copy link
Copy Markdown
Member Author

Hi @fabiankaegy @rickalee this is ready for review.

@s3rgiosan s3rgiosan requested a review from jeffpaul March 14, 2025 17:20
@s3rgiosan
Copy link
Copy Markdown
Member Author

I've created a try/block-editor-ui all-in-one branch to make it easier to test the features in both the block and classic editors, as well as the Query Loop integration.

@jeffpaul jeffpaul added this to the 1.7.0 milestone Mar 21, 2025
@jeffpaul jeffpaul moved this to Code Review in Open Source Practice Mar 21, 2025
@jeffpaul
Copy link
Copy Markdown
Member

@s3rgiosan is there more work planned here or should we bump this again for review?

@s3rgiosan
Copy link
Copy Markdown
Member Author

@jeffpaul I'm planning to review this later this week.

@jeffpaul jeffpaul removed their request for review October 6, 2025 13:21
…support

# Conflicts:
#	composer.lock
#	includes/UI/MetaBox.php
#	includes/UI/PostToPost.php
#	includes/UI/PostToUser.php
#	includes/UI/PostUI.php
@s3rgiosan
Copy link
Copy Markdown
Member Author

@rickalee PR is ready for review. The 1.7.0-beta.1 tag on release/1.7.0 should help with testing in your projects. Let me know if you find any issues.

cc @jeffpaul @fabiankaegy

@s3rgiosan s3rgiosan mentioned this pull request Jan 12, 2026
4 tasks
…support

# Conflicts:
#	dist/js/block-editor.asset.php
#	dist/js/block-editor.js
…support

# Conflicts:
#	dist/js/block-editor.asset.php
#	dist/js/block-editor.js
#	includes/UI/BlockEditor.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Code Review

Development

Successfully merging this pull request may close these issues.

2 participants