Skip to content

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

Merged
dkotter merged 3 commits into
developfrom
feature/improve-preview-highlighting
Jun 8, 2026
Merged

CSS updates to highlight terms in the previewer that are below the configured threshold #1058
dkotter merged 3 commits into
developfrom
feature/improve-preview-highlighting

Conversation

@petenelson

@petenelson petenelson commented Feb 20, 2026

Copy link
Copy Markdown
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:

Open WordPress Playground Preview

… 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
Copy Markdown

✅ 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

dkotter commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator

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

@petenelson

Copy link
Copy Markdown
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

dkotter commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

@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

@dkotter

dkotter commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

@petenelson Wondering if you're still interested in working on this PR, based on the notes above? Or if we should assign this out to someone else to finish?

@petenelson

Copy link
Copy Markdown
Contributor Author

@petenelson Wondering if you're still interested in working on this PR, based on the notes above? Or if we should assign this out to someone else to finish?

I should be able to, depending on how busy my Friday is this week.

@petenelson

Copy link
Copy Markdown
Contributor Author

@dkotter pushed some updates for this to add the notice when none of the terms are above the threshold. Sample:
image

@dkotter
dkotter marked this pull request as ready for review June 8, 2026 18:35
@dkotter
dkotter requested review from a team, dkotter and jeffpaul as code owners June 8, 2026 18:35
@github-actions github-actions Bot added the needs:code-review This requires code review. label Jun 8, 2026
@dkotter
dkotter merged commit 9995a7a into develop Jun 8, 2026
54 of 55 checks passed
@dkotter
dkotter deleted the feature/improve-preview-highlighting branch June 8, 2026 19:02
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.

Improve Content Classification preview UX to reflect threshold Impact

2 participants