Skip to content

Use a label to highlight the connected block #455

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

Merged
merged 3 commits into from
Apr 14, 2025

Conversation

ingeniumed
Copy link
Contributor

Description

This PR is meant to incorporate the feedback from @jarekmorawski, to build on #443. It does the following:

  • Revert the title back to Remote Data
  • Add in a paragraph that mirrors the Gutenberg helper text to highlight what the underlying block binding is.

CleanShot 2025-04-10 at 11 49 44 (1)

@ingeniumed ingeniumed changed the title Change the info for what block is connected to use a label instead Use a label to highlight the connected block Apr 11, 2025
Copy link
Contributor

Test this PR in WordPress Playground.

title={ sprintf( __( 'Remote Data Block: %s', 'remote-data-blocks' ), remoteDataTitle ) }
>
<PanelBody title={ __( 'Remote Data', 'remote-data-blocks' ) }>
<p style={ { fontSize: 'small', color: 'rgb(117, 117, 117)' } }>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The fontSize and colour are used to replicate the Gutenberg helper text shown on a lot of their components. Unfortunately, PanelBody doesn't have help as an option on it so this is the only way to show it.

I have set the fontSize to be small, and set the colour to be the same within the helper text. If anyone has a better suggestion, I'm happy to update this.

Copy link
Member

Choose a reason for hiding this comment

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

Can this be targeted with a className instead of inline style?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in the latest commit 👍🏾

@ingeniumed ingeniumed self-assigned this Apr 11, 2025
Copy link
Member

@chriszarate chriszarate left a comment

Choose a reason for hiding this comment

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

One question, otherwise 👍

@ingeniumed
Copy link
Contributor Author

CleanShot 2025-04-14 at 10 02 06

@ingeniumed ingeniumed merged commit a1bcfff into trunk Apr 14, 2025
13 checks passed
@ingeniumed ingeniumed deleted the update/label-for-block-bindings branch April 14, 2025 00:09
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.

2 participants