Skip to content
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

[Mobile] - Fix Quote Block styles #60476

Merged
merged 4 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/block-library/src/quote/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function QuoteEdit( {
{ innerBlocksProps.children }
<Caption
attributeKey="citation"
tagName={ isWebPlatform ? 'cite' : undefined }
tagName={ isWebPlatform ? 'cite' : 'p' }
style={ isWebPlatform && { display: 'block' } }
isSelected={ isSelected }
attributes={ attributes }
Expand Down
5 changes: 4 additions & 1 deletion packages/primitives/src/block-quotation/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ export const BlockQuotation = forwardRef( ( { ...props }, ref ) => {
const colorStyle = style?.color ? { color: style.color } : {};

const newChildren = Children.map( props.children, ( child ) => {
if ( child && child.props.identifier === 'citation' ) {
const { identifier, attributeKey } = child?.props || {};
const identifierKey = identifier ?? attributeKey;

if ( identifierKey === 'citation' ) {
return cloneElement( child, {
style: {
...styles.wpBlockQuoteCitation,
Expand Down
1 change: 0 additions & 1 deletion packages/primitives/src/block-quotation/style.native.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
border-left-width: 4px;
border-left-style: solid;
padding-left: $block-edge-to-content;
padding-top: $dashed-border-space;
margin-left: 0;
}

Expand Down
3 changes: 2 additions & 1 deletion packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ For each user feature we should also add a importance categorization label to i
-->

## Unreleased
- [*] Add empty fallback option for the BottomSheetSelectControl component
- [*] Add empty fallback option for the BottomSheetSelectControl component [#60333]
- [*] Fix Quote Block styles [#60476]

## 1.116.0
- [**] Highlight color formatting style improvements [#57650]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,29 +186,29 @@ exports.spacerBlock = `<!-- wp:spacer -->

exports.galleryBlock = `<!-- wp:gallery {"columns":8,"linkTo":"none","className":"alignfull"} -->
<figure class="wp-block-gallery has-nested-images columns-8 is-cropped alignfull"><!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://wordpress.org/gutenberg/files/2018/07/Block-Icon.png" alt=""/><figcaption class="wp-element-caption">Paragraph</figcaption></figure>
<figure class="wp-block-image size-large"><img src="https://cldup.com/njpygC0aF7.png"" alt=""/><figcaption class="wp-element-caption">Paragraph</figcaption></figure>
<!-- /wp:image -->
<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://wordpress.org/gutenberg/files/2018/07/Block-Icon-Heading.png" alt=""/><figcaption class="wp-element-caption">Heading</figcaption></figure>
<figure class="wp-block-image size-large"><img src="https://cldup.com/HOeupVqCwe.png" alt=""/><figcaption class="wp-element-caption">Heading</figcaption></figure>
<!-- /wp:image -->
<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://wordpress.org/gutenberg/files/2018/07/Block-Icon-Subheading.png" alt=""/><figcaption class="wp-element-caption">Subheading</figcaption></figure>
<figure class="wp-block-image size-large"><img src="https://cldup.com/s-OlAVlGJS.png" alt=""/><figcaption class="wp-element-caption">Image</figcaption></figure>
<!-- /wp:image -->
<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://wordpress.org/gutenberg/files/2018/07/Block-Icon-Quote.png" alt=""/><figcaption class="wp-element-caption">Quote</figcaption></figure>
<figure class="wp-block-image size-large"><img src="https://cldup.com/aBnr4SymR1.png" alt=""/><figcaption class="wp-element-caption">Cover</figcaption></figure>
<!-- /wp:image -->
<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://wordpress.org/gutenberg/files/2018/07/Block-Icon-Image.png" alt=""/><figcaption class="wp-element-caption">Image</figcaption></figure>
<figure class="wp-block-image size-large"><img src="https://cldup.com/aDIyKHI6Up.png" alt=""/><figcaption class="wp-element-caption">Video</figcaption></figure>
<!-- /wp:image -->
</figure>
<!-- /wp:gallery -->`;

exports.galleryBlockTwoImages = `<!-- wp:gallery {"columns":8,"linkTo":"none","className":"alignfull"} -->
<figure class="wp-block-gallery has-nested-images columns-8 is-cropped alignfull"><!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://wordpress.org/gutenberg/files/2018/07/Block-Icon.png" alt=""/><figcaption class="wp-element-caption">Paragraph</figcaption></figure>
<figure class="wp-block-image size-large"><img src="https://cldup.com/njpygC0aF7.png" alt=""/><figcaption class="wp-element-caption">Paragraph</figcaption></figure>
<!-- /wp:image -->
<!-- wp:image {"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://wordpress.org/gutenberg/files/2018/07/Block-Icon-Heading.png" alt=""/><figcaption class="wp-element-caption">Heading</figcaption></figure>
<figure class="wp-block-image size-large"><img src="https://cldup.com/s-OlAVlGJS.png" alt=""/><figcaption class="wp-element-caption">Image</figcaption></figure>
<!-- /wp:image -->
</figure>
<!-- /wp:gallery -->`;
Expand Down
Loading