Skip to content

CSS updates to highlight terms in the previewer that are below the configured threshold #1058

Draft
petenelson wants to merge 1 commit intodevelopfrom
feature/improve-preview-highlighting
Draft

CSS updates to highlight terms in the previewer that are below the configured threshold #1058
petenelson wants to merge 1 commit intodevelopfrom
feature/improve-preview-highlighting

Conversation

@petenelson
Copy link
Contributor

Description of the Change

Closes #1056

How to test the Change

  1. Have the plugin configured with Classification enabled, and set Category to 20% and Tag set to 45%. These tests were done with the OpenAI Embeddings Provider.
  2. Publish a new post on the site titled "Gettysburg Address" with the contents of the Gettysburg Address
  3. Create a new Category term "History"
  4. Create new Tags for "Civil War" and "Gettysburg"
  5. In Classification settings > Previewer, search for the Gettysburg Address post.
  6. Inspect the terms and verify they have valid CSS classed based on their score and the configured thresholds, either the existing classifai__classification-previewer-result-tag--exceeds-threshold class, or the classifai__classification-previewer-result-tag--below-threshold added as part of this PR.

Sample Screenshot:
image

Changelog Entry

Added - Added new classifai__classification-previewer-result-tag--below-threshold class and CSS colors to terms in the previewer for terms that don't meet the configured threshold

Credits

Props @username, ...

Checklist:

… class to highlight terms that don't meed the configured threshold
@github-actions github-actions bot added this to the 3.9.0 milestone Feb 20, 2026
@github-actions
Copy link

✅ WordPress Plugin Check Report

✅ Status: Passed

📊 Report

All checks passed! No errors or warnings found.


🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

@dkotter
Copy link
Collaborator

dkotter commented Feb 25, 2026

@petenelson I see this is still in draft. Anything pending here or is this good to review?

@petenelson
Copy link
Contributor Author

@dkotter Think it's good to review. Thinking some sort of additional text such as "Notice: None of the terms are above the configured threshold." if it's only low-quality matches. Should I get something like that added?

@dkotter
Copy link
Collaborator

dkotter commented Mar 3, 2026

@dkotter Think it's good to review. Thinking some sort of additional text such as "Notice: None of the terms are above the configured threshold." if it's only low-quality matches. Should I get something like that added?

Yeah, I think an additional note would be good

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.

Improve Content Classification preview UX to reflect threshold Impact

2 participants