Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RNMobile] Prevent "Undo Level" after Setting Featured Image via Imag…
…e Block (#33057) * Ignore edits to featured image in undo history "editEntityRecord" includes an "undoIgnore: true" parameter that makes it possible to ignore an edit in the undo history. Reference: https://developer.wordpress.org/block-editor/reference-guides/data/data-core/#editEntityRecord With this commit, that parameter is set to true so that a new undo level *isn't* created after the featured image is updated via the app. * Add "featured image" section heading By adding the settings for changing a featured image under their own section heading, it's being clearly separated from the other sections. This will help with the overall alignment/rhythm of the settings panel, which is important given we're adding an additional note. * Add FooterMessageControl to settings We're adding a note to the image block's setting to let users know that they won't be able to revert changes via the undo/redo button. * Tweak featured button styles With this commit, we're aligning the featured button to the left and changing its border to display at the bottom. This follows design feedback here: #33057 (comment) * Tweaks to footer text This commit updates the footer text following feedback from editorial. * Remove bottom border from button * Remove bottom padding from button * Align button and footer text to top With this commit, the content in the "Set as Featured" button and the footer message is aligned to the top of their containers. This will prevent flexbox from automatically adding spacing to the top of their containers, which goes against the design we want. * Add title style to "Featured Image" panel As we need to tweak the spacing around the panel's title, I've added a new "titleStyle" prop to the PanelBody component. That prop is then used to remove the bottom spacing for the "Featured Image" panel's title. The prop can now be re-used by anyone else who needs to tweak the title in a PanelBody in the future. * Add top/bottom padding to button Following the previous changes, this commit increases the height and "tappable area" of the "Set/Remove as Featured Image" button by adding both top and bottom padding. * Update function name Due to an error when merging, the code was referencing an old function name, "getSetFeaturedButton". It should instead reference the name name, "getFeaturedButtonPanel". * Update selector name For consistency with other selectors, this commit updates the name of "setFeaturedCellContainer" to "setFeaturedButtonCellContainer". * Group FooterMessageControl into "Featured" panel The placement of the component is moved within the main "Featured Image" panel, as this is more semantically correct than having the component within its own, separate panel.
- Loading branch information