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

fix: harden usage and output of attribute values #1530

Merged
merged 5 commits into from
Sep 18, 2023

Conversation

dkoo
Copy link
Contributor

@dkoo dkoo commented Sep 18, 2023

All Submissions:

Changes proposed in this Pull Request:

Hardens the use of block attribute values across blocks. There should be no unescaped values, and we shouldn't assume that values will be of the expected type.

How to test the changes in this Pull Request:

  1. On release, add a Posts Carousel, Homepage Posts, and YouTube Video Playlist block to a post or page. Note that for the YouTube Video Playlist block, you'll need to add some YouTube embed blocks to other posts with valid YouTube URLs.
  2. On the Posts Carousel block, ensure that you change the aspect ratio, number of slides to show, and the image fit options. In the Homepage Posts block, ensure that the author + avatars are shown.
  3. Save the posts with your modified blocks.
  4. Check out this branch.
  5. View the blocks in both the editor and the front-end, and ensure that all function as expected in both contexts with no changes in behavior.
  6. Test with both AMP and non-AMP—this repo technically still supports AMP, but we will likely remove this support in a future release.

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?

@dkoo dkoo requested a review from a team as a code owner September 18, 2023 18:39
@dkoo dkoo self-assigned this Sep 18, 2023
Copy link
Member

@miguelpeixe miguelpeixe left a comment

Choose a reason for hiding this comment

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

Tests well! Just a minor fix needed 🙌

src/blocks/carousel/view.php Outdated Show resolved Hide resolved
Co-authored-by: Miguel Peixe <miguel.peixe@automattic.com>
@dkoo dkoo merged commit c157395 into release Sep 18, 2023
8 checks passed
@dkoo dkoo deleted the hotfix/harden-attributes-output branch September 18, 2023 21:32
matticbot pushed a commit that referenced this pull request Sep 18, 2023
## [1.74.1](v1.74.0...v1.74.1) (2023-09-18)

### Bug Fixes

* harden usage and output of attribute values ([#1530](#1530)) ([c157395](c157395))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.74.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Sep 18, 2023
# [1.75.0-alpha.2](v1.75.0-alpha.1...v1.75.0-alpha.2) (2023-09-18)

### Bug Fixes

* harden usage and output of attribute values ([#1530](#1530)) ([c157395](c157395))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 1.75.0-alpha.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants