Skip to content
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

feat: add corrections customize settings #3751

Draft
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

Takshil-Kunadia
Copy link
Collaborator

All Submissions:

Changes proposed in this Pull Request:

  • Add a new Panel and global customizer setting “Corrections Location” (with options “Top” and “Bottom”).
  • Fix a edge case in Correction Modal.

Closes # .

How to test the changes in this Pull Request:

  1. Open the WordPress Customizer and Load a single post in the theme.
  2. Open Template Settings > Correction Settings > Corrections & Clarifications, and check the Radio buttons Top & Bottom to see the impact.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@Takshil-Kunadia
Copy link
Collaborator Author

Takshil-Kunadia commented Feb 14, 2025

@leogermani
Currently, if corrections are enabled and present, they are automatically appended to the post content. However, we are not providing users with an option to enable or disable corrections per post, as was originally intended by:

const CORRECTIONS_ACTIVE_META = 'newspack_corrections_active';

Would you like me to add a UI option to enable/disable corrections for individual posts?

Additionally, if we proceed with this implementation, corrections will be appended to all posts by default. This might not be ideal for users who may want to use blocks we are going to create via https://app.asana.com/0/1209292256643614/1209292256643625.

Would it make sense to introduce a separate setting in the modal for "Enable/Disable auto-inserting corrections" so users can choose whether corrections should be automatically appended? We could reuse(and rename it) CORRECTIONS_ACTIVE_META for this, but I wanted to check with you first—should we manage "enable/disable corrections" and "auto-insert corrections" separately, or should they share the same meta field?

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