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

Display decoded HTML entities in PostPrimaryCategory component #342

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

psorensen
Copy link
Contributor

Description of the Change

Currently, the PostPrimaryCategory component displays encoded HTML entities. This PR addresses that by utilizing decodeEntities to properly display the category name.

Before:

image

After:

image

Closes #

How to test the Change

  1. Create a category with an ampersand
  2. Use the PostPrimaryCategory component to display the category in the block editor
  3. Confirm that ampersand is properly decoded.

Changelog Entry

Added - New feature
Changed - Existing functionality
Deprecated - Soon-to-be removed feature
Removed - Feature
Fixed - Bug fix
Security - Vulnerability

  • Fixed PostPrimaryCategory component to display decoded HTML entities

Credits

Props @psorensen

Checklist:

Copy link

cypress bot commented Aug 30, 2024

10up Block Components    Run #925

Run Properties:  status check failed Failed #925  •  git commit fe7390ebd0: adds simple primary term block for demo
Project 10up Block Components
Branch Review fix/primary-category-escaped-output
Run status status check failed Failed #925
Run duration 06m 42s
Commit git commit fe7390ebd0: adds simple primary term block for demo
Committer Peter Sorensen
View all properties for this run ↗︎

Test results
Tests that failed  Failures 31
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
View all changes introduced in this branch ↗︎

Tests for review

Failed  ColorSettings.spec.js • 5 failed tests

View Output

Test Artifacts
ColorSettings > Allows the user to pick the block and displays it Test Replay Screenshots
ColorSettings > Allows the user to use a custom color and displays it Test Replay Screenshots
ColorSettings > Allows the user to clear the color Test Replay Screenshots
ColorSettings > Allows the user to add custom label and help text Test Replay Screenshots
ColorSettings > Allows the user to pick from predefined colors Test Replay Screenshots
Failed  Counter.spec.js • 6 failed tests

View Output

Test Artifacts
Counter > Allows the user to pick the block and displays it Test Replay Screenshots
Counter > Has the counter component in the block Test Replay Screenshots
Counter > Has the correct starting value Test Replay Screenshots
Counter > Updates the count appropriately Test Replay Screenshots
Counter > Updates to the approaching limit state appropriately Test Replay Screenshots
Counter > Updates to the is over limit state appropriately Test Replay Screenshots
Failed  IconPicker.spec.js • 1 failed test

View Output

Test Artifacts
IconPicker > allows the user to use the post picker to change an icon and displays it Test Replay Screenshots
Failed  PostFeaturedImage.spec.js • 3 failed tests

View Output

Test Artifacts
PostFeaturedImage > Allows the user to pick the block and displays it Test Replay Screenshots
PostFeaturedImage > Allows the user to pick an image from the media library and displays it inline Test Replay Screenshots
PostFeaturedImage > Syncs with the post featured image Test Replay Screenshots
Failed  PostMeta.spec.js • 6 failed tests

View Output

Test Artifacts
Post Meta > Allows the user to pick the block and displays it Test Replay Screenshots
Post Meta > Allows the user to pick a variation Test Replay Screenshots
Post Meta > Allows text to be entered into the post meta field Test Replay Screenshots
Post Meta > Allows a number to be entered into the post meta field Test Replay Screenshots
Post Meta > Allows a boolean to change the post meta field Test Replay Screenshots
Post Meta > Saves the data into post meta Test Replay Screenshots

The first 5 failed specs are shown, see all 7 specs in Cypress Cloud.

Copy link

Size Change: +23 B (+0.04%)

Total Size: 63.5 kB

Filename Size Change
dist/index.js 63.5 kB +23 B (+0.04%)

compressed-size-action

Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix :)

Don't know what is happening with the E2E setup but that is unrelated 👍

@fabiankaegy fabiankaegy merged commit d6bd752 into develop Aug 30, 2024
5 of 8 checks passed
@fabiankaegy fabiankaegy deleted the fix/primary-category-escaped-output branch August 30, 2024 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants