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

Remove fixed font-size from post title block on blockbase themes #8197

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

renatho
Copy link
Contributor

@renatho renatho commented Sep 23, 2024

Changes proposed in this Pull Request:

If we decide to go with this approach (see this discussion in the issue), it removes the fixed font-size from post title block on blockbase themes.

Related issue(s):

#8046

Screenshots

With the screenshots, I also described if it was needed to change the child theme and the default tag of the post title in the page template.

Blockbase

  • Default heading tag: h2.

I took the screenshot from the "All Archives" template only for the Blockbase theme to save time.

Before

_blockbase-current _blockbase-archive-current

After

_blockbase-without-fontsize-h2 _blockbase-archive-without-fontsize-h2

Ames

  • Default heading tag: h2.

Before

ames-current

After

ames-without-fontsize-h2

Antonia

  • Default heading tag: h2.

Before

antonia-current

After

antonia-without-fontsize-h2

Appleton

  • Default heading tag: h2.

Before

appleton-current

After

appleton-without-fontsize-h2

Arbustus

  • Default heading tag: h2.
  • Also needed a change in the child theme.json.

Before

arbutus-current

After

arbutus-without-font-size-h2-needed-theme-change

Attar

  • Default heading tag: h2.

Before

attar-current

After

attar-without-fontsize-h2

Barnett

  • Default heading tag: h2.

Before

barnett-current

After

barnett-without-fontsize-h2

Bennett

  • Default heading tag: h2.

Before

bennett-current

After

bennett-without-fontsize-h2

Blank Canvas

  • Default heading tag: h2.

Before

blank-canvas-current

After

blank-canvas-without-fontsize-h2

Calvin

  • Default heading tag: h2.

Before

calvin-current

After

calvin-without-fontsize-h2

Dorna

  • Default heading tag: h2.

Before

dorna-current

After

dorna-without-fontsize-h2

Farrow

  • Default heading tag: h2.

Before

farrow-current

After

farrow-without-fontsize-h2

Geologist

  • Default heading tag: h1.
  • Also needed a change in the child theme.json.

Before

geologist-current

After

geologist-without-fontsize-h1-needed-theme-change

Hari

  • Default heading tag: h2.

Before

hari-current

After

hari-without-fontsize-h2

Heiwa

  • Default heading tag: h2.

Before

heiwa-current

After

heiwa-without-fontsize-h2

Jackson

  • Default heading tag: h2.

Before

jackson-current

After

jackson-without-fontsize-h2

Kingsley

  • Default heading tag: h2.

Before

kingsley-current

After

kingsley-without-fontsize-h2

Marl

  • Default heading tag: h2.

Before

marl-current

After

marl-without-fontsize-h2

Mayland (Blocks)

  • Default heading tag: h1.
  • Also needed a change in the child theme.json.

Before

mayland-blocks-current

After

mayland-blocks-without-fontsize-h1

Meraki

  • Default heading tag: h2.
  • Also needed a change in the child theme.json.

Before

meraki-current

After

meraki-without-font-size-h2-needed-theme-change

Quadrat

  • Default heading tag: h1.
  • Also needed a change in the child theme.json.

Before

quadrat-current

After

quadrat-without-font-size-h1-needed-theme-change

Russell

  • Default heading tag: h2.
  • Also needed a change in the child theme.json.

Before

russell-current

After

russell-without-fontsize-h2-needed-theme-change

Seedlet (Blocks)

  • Default heading tag: h1.
  • Also needed a change in the child theme.json.

Before

seedlet-blocks-current

After

seedlet-blocks-without-font-size-h1-needed-theme-change

Winkel

  • Default heading tag: h2.

Before

winkel-current

After

winkel-without-fontsize-h2

Zoologist

  • Default heading tag: h1.
  • Also needed a change in the child theme.json.

Before

zoologist-current

After

zoologist-without-font-size-h1-needed-theme-change

Copy link
Contributor

Preview changes

I've detected changes to the following themes in this PR: Arbutus, Blockbase, Geologist, Mayland (Blocks), Meraki, Quadrat, Russell, Seedlet (Blocks), Zoologist.
You can preview these changes by following the links below:

I will update this comment with the latest preview links as you push more changes to this PR.
⚠️ Note: The preview sites are created using WordPress Playground. You can add content, edit settings, and test the themes as you would on a real site, but please note that changes are not saved between sessions.

⚠️ Note: Child themes are dependent on their parent themes. You will have to install the parent theme as well for the preview to work correctly.

Copy link
Contributor

Theme-Check results

arbutus: There are required changes on the theme ❌.

❎ REQUIRED

  • Found a reference to unsplash.com. Assets from this website does not use a license that is compatible with GPL. View license (opens in a new window).
  • This theme text domain does not match the theme's slug. The text domain used: blockbase, ) This theme's correct slug and text-domain is arbutus.
💡 RECOMMENDED (2)
  • No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
  • Possible variable $header_pattern found in translation function in inc/block-patterns.php. Translation function calls must not contain PHP variables, use placeholders instead. See Internationalization Guidelines (Opens in a new window). Line 39: $header_patterns = array(Line 48: foreach ( $header_patterns as $header_pattern ) {Line 50: 'blockbase/header-' . $header_pattern,Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),Line 55: 'content' => file_get_contents (get_theme_file_path( '/parts/header-' . $header_pattern . '.html' )),
⚠️ WARNING (4)
  • screenshot.png is 555.6 KB in size. Large file sizes have a negative impact on website performance and loading time. Compress images before using them.
  • Found a translation function that has an incorrect number of arguments in the file inc/block-patterns.php. Function __, with the arguments 'Blockbase Header (', ), 'blockbase'. Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),
  • Found a translation function that is missing a text-domain in the file inc/customizer/wp-customize-fonts.php. Function __, with the arguments 'https://wordpress.com/support/custom-fonts/'. Line 13: __( 'https://wordpress.com/support/custom-fonts/' )
  • More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs. The domains found are blockbase, ).
ℹ️ INFO (1)
  • Found wrong tag, remove auto-loading-homepage from your style.css header.

blockbase: No changes required ✅.

💡 RECOMMENDED (2)
  • No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
  • Possible variable $header_pattern found in translation function in inc/block-patterns.php. Translation function calls must not contain PHP variables, use placeholders instead. See Internationalization Guidelines (Opens in a new window). Line 39: $header_patterns = array(Line 48: foreach ( $header_patterns as $header_pattern ) {Line 50: 'blockbase/header-' . $header_pattern,Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),Line 55: 'content' => file_get_contents (get_theme_file_path( '/parts/header-' . $header_pattern . '.html' )),
⚠️ WARNING (4)
  • screenshot.png is 555.6 KB in size. Large file sizes have a negative impact on website performance and loading time. Compress images before using them.
  • Found a translation function that has an incorrect number of arguments in the file inc/block-patterns.php. Function __, with the arguments 'Blockbase Header (', ), 'blockbase'. Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),
  • Found a translation function that is missing a text-domain in the file inc/customizer/wp-customize-fonts.php. Function __, with the arguments 'https://wordpress.com/support/custom-fonts/'. Line 13: __( 'https://wordpress.com/support/custom-fonts/' )
  • More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs. The domains found are blockbase, ).

geologist: No changes required ✅.

💡 RECOMMENDED (1)
  • No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
⚠️ WARNING (2)

mayland-blocks: There are required changes on the theme ❌.

❎ REQUIRED

  • Found a reference to unsplash.com. Assets from this website does not use a license that is compatible with GPL. View license (opens in a new window).
  • This theme text domain does not match the theme's slug. The text domain used: blockbase, ) This theme's correct slug and text-domain is mayland-blocks.
💡 RECOMMENDED (2)
  • No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
  • Possible variable $header_pattern found in translation function in inc/block-patterns.php. Translation function calls must not contain PHP variables, use placeholders instead. See Internationalization Guidelines (Opens in a new window). Line 39: $header_patterns = array(Line 48: foreach ( $header_patterns as $header_pattern ) {Line 50: 'blockbase/header-' . $header_pattern,Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),Line 55: 'content' => file_get_contents (get_theme_file_path( '/parts/header-' . $header_pattern . '.html' )),
ℹ️ INFO (1)
  • Found wrong tag, remove auto-loading-homepage from your style.css header.
⚠️ WARNING (3)
  • Found a translation function that has an incorrect number of arguments in the file inc/block-patterns.php. Function __, with the arguments 'Blockbase Header (', ), 'blockbase'. Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),
  • Found a translation function that is missing a text-domain in the file inc/customizer/wp-customize-fonts.php. Function __, with the arguments 'https://wordpress.com/support/custom-fonts/'. Line 13: __( 'https://wordpress.com/support/custom-fonts/' )
  • More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs. The domains found are blockbase, ).

meraki: There are required changes on the theme ❌.

💡 RECOMMENDED (2)
  • No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
  • Possible variable $header_pattern found in translation function in inc/block-patterns.php. Translation function calls must not contain PHP variables, use placeholders instead. See Internationalization Guidelines (Opens in a new window). Line 39: $header_patterns = array(Line 48: foreach ( $header_patterns as $header_pattern ) {Line 50: 'blockbase/header-' . $header_pattern,Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),Line 55: 'content' => file_get_contents (get_theme_file_path( '/parts/header-' . $header_pattern . '.html' )),
⚠️ WARNING (5)
  • Found ="<?php echo esc_html__ in patterns/footer-default.php. Use esc_attr__() inside HTML attributes, and esc_url() for link attributes. A manual review is needed. Line 74:
    [jetpack_subscription_form show_subscribers_total='false' button_on_newline='true' custom_font_size='16px' custom_border_radius='50' custom_border_weight='1' custom_button_width='100%' custom_padding='15' custom_spacing='10' submit_button_classes='has-background-border-color has-text-color has-primary-color has-background has-background-background-color' email_field_classes='has-background-border-color' show_only_email_and_button='true' success_message='<?php echo esc_html__('Success! An email was just sent to confirm your su
  • screenshot.png is 743.8 KB in size. Large file sizes have a negative impact on website performance and loading time. Compress images before using them.
  • Found a translation function that has an incorrect number of arguments in the file inc/block-patterns.php. Function __, with the arguments 'Blockbase Header (', ), 'blockbase'. Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),
  • Found a translation function that is missing a text-domain in the file inc/customizer/wp-customize-fonts.php. Function __, with the arguments 'https://wordpress.com/support/custom-fonts/'. Line 13: __( 'https://wordpress.com/support/custom-fonts/' )
  • More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs. The domains found are meraki, blockbase, ).
ℹ️ INFO (1)
  • Found wrong tag, remove auto-loading-homepage from your style.css header.

quadrat: No changes required ✅.

💡 RECOMMENDED (1)
  • No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
ℹ️ INFO (1)
  • Found wrong tag, remove auto-loading-homepage from your style.css header.
⚠️ WARNING (2)

russell: There are required changes on the theme ❌.

❎ REQUIRED

  • Found a reference to unsplash.com. Assets from this website does not use a license that is compatible with GPL. View license (opens in a new window).
  • Screenshot is wrong size! Detected: 1200x906. Maximum allowed size is 1200x900px.
  • Screenshot dimensions are wrong! Ratio of width to height should be 4:3.
  • This theme text domain does not match the theme's slug. The text domain used: blockbase, ) This theme's correct slug and text-domain is russell.
💡 RECOMMENDED (3)
  • No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
  • Possible variable $header_pattern found in translation function in inc/block-patterns.php. Translation function calls must not contain PHP variables, use placeholders instead. See Internationalization Guidelines (Opens in a new window). Line 39: $header_patterns = array(Line 48: foreach ( $header_patterns as $header_pattern ) {Line 50: 'blockbase/header-' . $header_pattern,Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),Line 55: 'content' => file_get_contents (get_theme_file_path( '/parts/header-' . $header_pattern . '.html' )),
  • Screenshot size should be 1200x900, to account for HiDPI displays. Any 4:3 image size is acceptable, but 1200x900 is preferred.
⚠️ WARNING (4)
  • screenshot.png is 535.5 KB in size. Large file sizes have a negative impact on website performance and loading time. Compress images before using them.
  • Found a translation function that has an incorrect number of arguments in the file inc/block-patterns.php. Function __, with the arguments 'Blockbase Header (', ), 'blockbase'. Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),
  • Found a translation function that is missing a text-domain in the file inc/customizer/wp-customize-fonts.php. Function __, with the arguments 'https://wordpress.com/support/custom-fonts/'. Line 13: __( 'https://wordpress.com/support/custom-fonts/' )
  • More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs. The domains found are blockbase, ).
ℹ️ INFO (1)
  • Found wrong tag, remove auto-loading-homepage from your style.css header.

seedlet-blocks: No changes required ✅.

ℹ️ INFO (1)
  • Found wrong tag, remove auto-loading-homepage from your style.css header.
⚠️ WARNING (2)
  • Found a translation function that is missing a text-domain in the file inc/customizer/wp-customize-fonts.php. Function __, with the arguments 'https://wordpress.com/support/custom-fonts/'. Line 13: __( 'https://wordpress.com/support/custom-fonts/' )
  • More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs. The domains found are seedlet-blocks, blockbase.

zoologist: There are required changes on the theme ❌.

❎ REQUIRED

  • This theme text domain does not match the theme's slug. The text domain used: blockbase, ) This theme's correct slug and text-domain is zoologist.
💡 RECOMMENDED (2)
  • No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
  • Possible variable $header_pattern found in translation function in inc/block-patterns.php. Translation function calls must not contain PHP variables, use placeholders instead. See Internationalization Guidelines (Opens in a new window). Line 39: $header_patterns = array(Line 48: foreach ( $header_patterns as $header_pattern ) {Line 50: 'blockbase/header-' . $header_pattern,Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),Line 55: 'content' => file_get_contents (get_theme_file_path( '/parts/header-' . $header_pattern . '.html' )),
⚠️ WARNING (3)
  • Found a translation function that has an incorrect number of arguments in the file inc/block-patterns.php. Function __, with the arguments 'Blockbase Header (', ), 'blockbase'. Line 52: 'title' => __( 'Blockbase Header (' . $header_pattern . ')', 'blockbase' ),
  • Found a translation function that is missing a text-domain in the file inc/customizer/wp-customize-fonts.php. Function __, with the arguments 'https://wordpress.com/support/custom-fonts/'. Line 13: __( 'https://wordpress.com/support/custom-fonts/' )
  • More than one text-domain is being used in this theme. This means the theme will not be compatible with WordPress.org language packs. The domains found are blockbase, ).

@renatho
Copy link
Contributor Author

renatho commented Sep 25, 2024

I'm skipping the "Theme-Check results" since it's not related to the changes in this PR.

@renatho renatho requested review from annezazu and a team September 25, 2024 13:28
@allilevine
Copy link
Member

I tested on Arbutus and Blockbase and I was able to change the heading levels and see the correct font size changes, both in the editor and on the live site. After that I couldn't get the site editor to load, it seems like a Playground issue.

@renatho
Copy link
Contributor Author

renatho commented Oct 8, 2024

Hi @Automattic/theam! 👋
Would some of you have the opportunity to take a look at this PR to solve the issue? Or is there anyone more involved with these themes that we could add as a reviewer?

Copy link
Member

@mikachan mikachan 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 working on this, @renatho!

Based on the screenshots, I think this solution is fine. The code changes also look good. We can ignore both the Theme Check and Playground GH actions here since the checks are not related to these changes.

@renatho renatho merged commit b97664b into trunk Oct 8, 2024
2 of 4 checks passed
@renatho renatho deleted the remove/fix-font-size-from-post-title branch October 8, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Post Title block: changing heading level isn't respected in certain themes
3 participants