Skip to content

Commit

Permalink
Fix: Button: Replace remaining 40px default size violations [Block li…
Browse files Browse the repository at this point in the history
…brary 1] (#65033)

* Fix legacy comments to use 40px default button size

* Fix the embed placeholder button to use 40px default button size

* Fix freeform block to use 40px default button size

* Fix missing block to use 40px default button size

* Revert the instance for modal fullscreen button size

This is being reverted because we need to resolve this first - WordPress/gutenberg#65033 (comment)

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>

Source: WordPress/gutenberg@c90f1c5
  • Loading branch information
hbhalodia committed Sep 6, 2024
1 parent dd281c0 commit 7b2b32a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 31 deletions.
36 changes: 12 additions & 24 deletions build/block-library/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6609,19 +6609,15 @@ function ModalEdit(props) {
justify: "flex-end",
expanded: false,
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button
// TODO: Switch to `true` (40px size) if possible
, {
__next40pxDefaultSize: false,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
__next40pxDefaultSize: true,
variant: "tertiary",
onClick: onClose,
children: (0,external_wp_i18n_namespaceObject.__)('Cancel')
})
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button
// TODO: Switch to `true` (40px size) if possible
, {
__next40pxDefaultSize: false,
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
__next40pxDefaultSize: true,
variant: "primary",
onClick: () => {
setAttributes({
Expand Down Expand Up @@ -9036,10 +9032,8 @@ function CommentsLegacy({
const {
textAlign
} = attributes;
const actions = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button
// TODO: Switch to `true` (40px size) if possible
, {
__next40pxDefaultSize: false,
const actions = [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
__next40pxDefaultSize: true,
onClick: () => void setAttributes({
legacy: false
}),
Expand Down Expand Up @@ -16276,17 +16270,13 @@ const EmbedPlaceholder = ({
expanded: false,
spacing: 3,
justify: "flex-start",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button
// TODO: Switch to `true` (40px size) if possible
, {
__next40pxDefaultSize: false,
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
__next40pxDefaultSize: true,
variant: "secondary",
onClick: tryAgain,
children: (0,external_wp_i18n_namespaceObject._x)('Try again', 'button label')
}), ' ', /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button
// TODO: Switch to `true` (40px size) if possible
, {
__next40pxDefaultSize: false,
}), ' ', /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
__next40pxDefaultSize: true,
variant: "secondary",
onClick: fallback,
children: (0,external_wp_i18n_namespaceObject._x)('Convert to link', 'button label')
Expand Down Expand Up @@ -32548,10 +32538,8 @@ function MissingEdit({
}
const actions = [];
let messageHTML;
const convertToHtmlButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button
// TODO: Switch to `true` (40px size) if possible
, {
__next40pxDefaultSize: false,
const convertToHtmlButton = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
__next40pxDefaultSize: true,
onClick: convertToHTML,
variant: "primary",
children: (0,external_wp_i18n_namespaceObject.__)('Keep as HTML')
Expand Down
2 changes: 1 addition & 1 deletion build/block-library/index.min.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => 'b428ce1ae5027a2a86f2');
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-patterns', 'wp-polyfill', 'wp-primitives', 'wp-private-apis', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '2d7d6e75e8bcea5748ed');
8 changes: 4 additions & 4 deletions build/block-library/index.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/block-library/index.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

### BEGIN AUTO-GENERATED DEFINES
define( 'GUTENBERG_VERSION', '19.2.0' );
define( 'GUTENBERG_GIT_COMMIT', '95c19951b11667fabc12b90c3f6affa3a73dd5bd' );
define( 'GUTENBERG_GIT_COMMIT', 'c90f1c5d1bb9fe376122774c9e807174ebe77b9d' );
### END AUTO-GENERATED DEFINES

gutenberg_pre_init();
Expand Down

0 comments on commit 7b2b32a

Please sign in to comment.