Skip to content

Commit

Permalink
External Media / AI Image Generator: update button style (#39985)
Browse files Browse the repository at this point in the history
* External Media / AI Image Generator: update button style

See #39934

Let's change the overall styles of the 2 buttons ("Select Image" and "Generate with AI"):

- the buttons should be 40px high, like in Core. See WordPress/gutenberg#46741
- the buttons should use the secondary style variant by default, to match the "Insert from URL" button.
- the buttons should take the full width of the placeholder on mobile devices.

* Ensure the buttons look good in narrow parent blocks

See Automattic/jetpack#39985 (comment)

* Simplify styling of the main wrapper

The wrapper itself is still necessary unfortunately.

Co-authored-by: Filipe Varela <[email protected]>
Co-authored-by: jasmussen <[email protected]>

* Add logic to change button size based on wp & Gutenberg versions

The other buttons in the Image block were changed in this PR:
WordPress/gutenberg#65361

This was released with Gutenberg 19.4, and will be included in WP version 6.7.

Let's consequently set our own buttons to match.

---------

Co-authored-by: Filipe Varela <[email protected]>
Co-authored-by: jasmussen <[email protected]>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/11660975525

Upstream-Ref: Automattic/jetpack@746d1fc
  • Loading branch information
ice9js authored and matticbot committed Nov 4, 2024

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
1 parent fecfeda commit cd8f7a0
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit cd8f7a0

Please sign in to comment.