Skip to content

Prevent Duplicate Links to Disable Title Generation#1009

Merged
dkotter merged 1 commit intodevelopfrom
fix/982
Sep 15, 2025
Merged

Prevent Duplicate Links to Disable Title Generation#1009
dkotter merged 1 commit intodevelopfrom
fix/982

Conversation

@faisal-alvi
Copy link
Contributor

Description of the Change

This PR fixes a bug in the Classic Editor where the "Disable this ClassifAI feature" link for Title Generation was appearing multiple times in the popup when users generated titles repeatedly.

  1. JavaScript Fix: Added $( '.classifai-title-generation__result-disable-link' ).remove(); before generating new titles to clear any existing disable links
  2. CSS Fix: Added specific styling for the title generation disable link with proper padding to prevent it from touching the left edge and bottom of the modal

before

Image

after

Image

Closes #982

How to test the Change

  1. Enable Title Generation Feature:

    • Go to Tools > ClassifAI > Language Processing > Title Generation > Settings
    • Configure the feature with a valid API provider
    • Ensure user-based opt-out is enabled
  2. Test Classic Editor:

    • Create or edit a post in Classic Editor
    • Click "Generate titles" button multiple times (2-3 times)
    • Verify that only one "Disable this ClassifAI feature" link appears in the popup
    • Verify the link has proper spacing (20px padding on left and bottom)
  3. Test Block Editor:

    • Create or edit a post in Block Editor
    • Use the Title Generation feature multiple times
    • Verify no regression in Block Editor functionality

Changelog Entry

Fixed - Prevent duplicate "Disable this ClassifAI feature" links in Classic Editor Title Generation popup

Credits

Props @iamdharmesh @faisal-alvi

Checklist:

@faisal-alvi faisal-alvi self-assigned this Sep 15, 2025
@faisal-alvi faisal-alvi requested review from a team, dkotter and jeffpaul as code owners September 15, 2025 17:33
@github-actions github-actions bot added this to the Future Release milestone Sep 15, 2025
@github-actions github-actions bot added the needs:code-review This requires code review. label Sep 15, 2025
@faisal-alvi faisal-alvi requested review from a team and Sidsector9 and removed request for a team, dkotter and jeffpaul September 15, 2025 17:57
@dkotter dkotter modified the milestones: Future Release, 3.8.0 Sep 15, 2025
@dkotter dkotter merged commit 89ea22a into develop Sep 15, 2025
12 checks passed
@dkotter dkotter deleted the fix/982 branch September 15, 2025 18:24
@dkotter dkotter modified the milestones: 3.8.0, 3.7.1 Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple links for disabling the Title Generation feature in Classic Editor

2 participants