Skip to content

Only use block markup for comment form button when using a block theme#37315

Merged
aristath merged 1 commit into
trunkfrom
fix/comment-form-button
Dec 13, 2021
Merged

Only use block markup for comment form button when using a block theme#37315
aristath merged 1 commit into
trunkfrom
fix/comment-form-button

Conversation

@noisysocks

Copy link
Copy Markdown
Member

Description

Follows #37245.

Fixes a small bug I noticed thanks to a failing test in WordPress/wordpress-develop#2048.

Steps to reproduce the bug:

  1. Activate an older theme e.g. Twenty Ten.
  2. Go to a post on the frontend.
  3. Look at the "Post Comment" button.

It looks weird because we're erroneously changing the markup to be a Gutenberg button. We should only do that if the current theme is a block theme.

How has this been tested?

As above.

Screenshots

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

@noisysocks noisysocks added [Type] Bug An existing feature does not function as intended Backport to WP Beta/RC [Block] Comments Form Affects the Comments Form Block [Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) labels Dec 13, 2021
@noisysocks noisysocks requested a review from aristath December 13, 2021 05:31
@aristath aristath merged commit af646e6 into trunk Dec 13, 2021
@aristath aristath deleted the fix/comment-form-button branch December 13, 2021 06:29
@github-actions github-actions Bot added this to the Gutenberg 12.2 milestone Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Comments Form Affects the Comments Form Block [Block] Comments (legacy) The legacy mode of the Comments block (formerly known as Post Comments) [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants