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 Buton Group Font settings #2233

Merged
merged 3 commits into from
Jul 17, 2024
Merged

Conversation

Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel Soare-Robert-Daniel commented Jun 19, 2024

Closes #2163

Summary

  • Fixed the wrong connection between font properties
  • Fix the text line height value to be the same as in the Editor
  • Added an E2E test.

Note

Be aware of #2177

Screenshots

image


Test instructions

  • Insert a Button Group block
  • Modify the value in Typography tab
  • Check if they correspond in the front end.

Checklist before the final review

  • Included E2E or unit tests for the changes in this PR.
  • Visual elements are not affected by independent changes.
  • It is at least compatible with the minimum WordPress version.
  • It loads additional script in frontend only if it is required.
  • Does not impact the Core Web Vitals.
  • In case of deprecation, old blocks are safely migrated.
  • It is usable in Widgets and FSE.
  • Copy/Paste is working if the attributes are modified.
  • PR is following the best practices

@Soare-Robert-Daniel Soare-Robert-Daniel self-assigned this Jun 19, 2024
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Jun 19, 2024
@pirate-bot
Copy link
Contributor

Bundle Size Diff

Package Old Size New Size Diff
Animations 239.1 KB 239.1 KB 0 B (0.00%)
Blocks 1.5 MB 1.5 MB 8 B (0.00%)
CSS 93.17 KB 93.17 KB 0 B (0.00%)
Dashboard 201.53 KB 201.53 KB 0 B (0.00%)
Onboarding 154.18 KB 154.18 KB 0 B (0.00%)
Export Import 90.95 KB 90.95 KB 0 B (0.00%)
Pro 355.91 KB 355.91 KB 0 B (0.00%)

@pirate-bot
Copy link
Contributor

pirate-bot commented Jun 19, 2024

Plugin build for 46a2891 is ready 🛎️!

@pirate-bot
Copy link
Contributor

pirate-bot commented Jun 19, 2024

E2E Tests

Playwright Test Status:

Performance Results serverResponse: 223.8, firstPaint: 130.15, domContentLoaded: 1594.4, loaded: 1594.95, firstContentfulPaint: 3749.85, firstBlock: 5758.35, type: 13.33, minType: 12.09, maxType: 15.98, typeContainer: 8.51, minTypeContainer: 7.08, maxTypeContainer: 11.4, focus: 43.51, minFocus: 34.31, maxFocus: 56.66, inserterOpen: 27.43, minInserterOpen: 24.99, maxInserterOpen: 33.98, inserterSearch: 6.28, minInserterSearch: 5.9, maxInserterSearch: 6.85, inserterHover: 3.86, minInserterHover: 3.52, maxInserterHover: 4.66, listViewOpen: 149.17, minListViewOpen: 136.7, maxListViewOpen: 169.71

Copy link
Member

@HardeepAsrani HardeepAsrani left a comment

Choose a reason for hiding this comment

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

Looks good, left a small comment to confirm you have tested that part.

@@ -157,7 +157,7 @@ public function render_css( $block ) {
'property' => 'line-height',
'value' => 'lineHeight',
'format' => function( $value, $attrs ) {
return is_numeric( $value ) ? $value . 'px' : $value;
return ! is_string( $value ) && is_numeric( $value ) ? $value . 'px' : $value;
Copy link
Member

Choose a reason for hiding this comment

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

Did you test it with legacy blocks to confirm this works as well with everything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By legacy, I will refer to the first version, which used the int as values. Those will be the same since they will be pixels.

The more recent version, which uses the unit input field, is now fixed when using the unitless mode.

@rodica-andronache
Copy link

@Soare-Robert-Daniel tested and everything works well 👍

@vytisbulkevicius vytisbulkevicius merged commit 529249e into development Jul 17, 2024
12 checks passed
@vytisbulkevicius vytisbulkevicius deleted the fix/button-group-font branch July 17, 2024 08:03
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 2.6.13 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-checklist-complete The Pull Request checklist is complete. (automatic label) released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Button Group block - Appearance, Letter case, Line height options not working
5 participants