Skip to content

Conversation

@dhananjaykuber
Copy link
Contributor

@dhananjaykuber dhananjaykuber commented May 26, 2024

Fixes: #61890

What?

This PR fixes the issue where the line height in the Latest Comments block is not reflected in the editor side until the page is refreshed.

Why?

This PR is necessary to ensure that changes to the line height in the Latest Comments block are immediately reflected in the editor. This addresses the problem of the editor not updating the line height dynamically, which can cause confusion and disrupt the editing workflow.

How?

The PR addresses the issue by adding CSS to ensure that the Latest Comments block in the editor adopts the parent's line height immediately upon change. Specifically, the implementation updates the editor's rendering logic to apply the line height styles directly to the block's DOM elements without requiring a page refresh. This ensures that the line height changes are dynamically reflected in the editor as soon as they are made

Testing Instructions

  1. Open a post or page in the WordPress editor.
  2. Insert the Latest Comments block.
  3. Change the Line height value in the block settings.
  4. Verify that the line height change is immediately reflected in the editor.
  5. Confirm that the line height is also reflected correctly in the frontend.

Testing Instructions for Keyboard

  1. Open a post or page in the WordPress editor.
  2. Use the keyboard to navigate to the Latest Comments block.
  3. Use the keyboard to change the Line height value in the block settings.
  4. Verify that the line height change is immediately reflected in the editor using only keyboard navigation.

Screenshots or screencast

https://www.loom.com/share/7af36ed135b54425a74aa0fbe94f2638?sid=1a0d6fd2-6ce9-4069-8279-cb79fc94a68a

@dhananjaykuber dhananjaykuber requested a review from ajitbohra as a code owner May 26, 2024 09:30
@github-actions
Copy link

github-actions bot commented May 26, 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: dhananjaykuber <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: pitamdey <[email protected]>

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

@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @dhananjaykuber! 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.

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

Hi @ajitbohra can you please review this PR?

@akasunil akasunil added [Type] Bug An existing feature does not function as intended [Block] Latest Comments Affects the Latest Comments Block labels Jun 14, 2024
@Mamaduka Mamaduka removed the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jul 3, 2024
@t-hamano
Copy link
Contributor

t-hamano commented Feb 7, 2025

Thanks for the PR!

the line height in the Latest Comments block is not reflected in the editor side until the page is refreshed.

We need to fix the root cause of this problem, not the symptoms.

Probably we need to fix the ServerSideRender component itself. See #64986 (review) for more details.

Let's close this PR and investigate the root cause.

@t-hamano t-hamano closed this Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Latest Comments Affects the Latest Comments Block [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Latest Comments : Line Height is not reflecting in editor

4 participants