-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Style quotes in the mobile app #15990
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SergioEstevao
added
the
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
label
Jun 4, 2019
1 task
koke
reviewed
Jun 5, 2019
/** | ||
* Internal dependencies | ||
*/ | ||
import styles from './style.scss'; | ||
|
||
export const BlockQuotation = ( props ) => { | ||
const newChildren = Children.map( props.children, ( child ) => { | ||
if ( child && child.props.identifier === 'citation' ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious about why you need to test for child
, is there any chance of that being null/undefined?
Yes when you have a new quote block and you don't write any of the element
and select another block. The citation with be nullified. See here:
https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/quote/edit.js#L42
…On Wed, 5 Jun 2019 at 08:20, Jorge Bernal ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In packages/components/src/primitives/block-quotation/index.native.js
<#15990 (comment)>:
> /**
* Internal dependencies
*/
import styles from './style.scss';
export const BlockQuotation = ( props ) => {
+ const newChildren = Children.map( props.children, ( child ) => {
+ if ( child && child.props.identifier === 'citation' ) {
I'm curious about why you need to test for child, is there any chance of
that being null/undefined?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#15990?email_source=notifications&email_token=AAE7CUKUUNUYI7TGFEPA2ULPY5SKJA5CNFSM4HTENCUKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB2TTUKA#pullrequestreview-245840424>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAE7CUKNAQRMVYNS6NBIB2LPY5SKJANCNFSM4HTENCUA>
.
|
koke
approved these changes
Jun 5, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR changes the BlockQuotation component to style the children element that has the
citation
identifier.This allows us to set the space between the quote and citation and also to set a smaller font size.
How has this been tested?
This can be tested on GB mobile using this PR: wordpress-mobile/gutenberg-mobile#1067
Screenshots
Types of changes
Checklist: