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

Stabilize typography block support keys #65964

Closed

Conversation

rinkalpagdar
Copy link
Contributor

@rinkalpagdar rinkalpagdar commented Oct 9, 2024

What?

Split from #63001

Why?

This issue tracks progress towards stabilizing the typography block support with backward compatibility
Stabilized the following typography block supports:

__experimentalFontFamily → fontFamily

Testing Instructions

Open block.json file or area.
If you have already used it for block support __experimentalFontFamily instead we can use it fontFamily only. Similar to other block supports as well.

Note: Here we need to update the WP core blocks' block.json files to use the non __experimental prefixes.

Screenshots or screencast

Copy link

github-actions bot commented Oct 9, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: rinkalpagdar <rinkalpagdar@git.wordpress.org>
Co-authored-by: ndiego <ndiego@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Oct 9, 2024
Copy link

github-actions bot commented Oct 9, 2024

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @rinkalpagdar! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@ndiego ndiego added [Package] Block library /packages/block-library [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Enhancement A suggestion for improvement. labels Oct 10, 2024
@ndiego
Copy link
Member

ndiego commented Oct 10, 2024

Hi @rinkalpagdar thanks for working on this. Are the changes to the Verse block.json just for testing purposes?

@rinkalpagdar
Copy link
Contributor Author

Hello @ndiego Thanks for your feedback, Yes block.json changes are for testing purposes.

@rinkalpagdar
Copy link
Contributor Author

Hello @ndiego Greetings! I have reverted to block.json changes in verse. Thanks!

@ndiego ndiego changed the title stabilizing typography Stabilize typography block support keys Oct 24, 2024
@ndiego
Copy link
Member

ndiego commented Oct 24, 2024

Hi @rinkalpagdar, I struggled to get this PR working properly when testing with a custom plugin. I used a simple Copyright Date block I had built in the past.

The block doesn't have any experimental controls by default, so I added the following to the block.json file.

With experimental supports

"supports": {
    "color": {
      "background": false,
      "text": true
    },
    "html": false,
    "typography": {
      "fontSize": true,
      "__experimentalFontFamily": true,
      "__experimentalLetterSpacing": true
    }
  },

Without experimental supports

"supports": {
    "color": {
      "background": false,
      "text": true
    },
    "html": false,
    "typography": {
      "fontSize": true,
      "fontFamily": true,
      "letterSpacing": true
    }
  },

And here are the results.

With experimental supports Without experimental supports
image image

As you can see, when no __experimental prefix is added, the supports do not appear. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants