-
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
[RNMobile] Styling fixes after navigation merge #19164
Conversation
I've realized right now, that your suggestion is partly incorrect. What I mean is I agree that we can hide a toolbar when an unsupported block isn't nested, but in nested case, we should find other solution such as:
@iamthomasbishop Please let me know what do you think about it |
Thanks for the quick fixes, everything is looking great here! Glad to see the Media & Text block is displaying properly here, I'm not sure why but when I tested, I was seeing the Media & Text block still side-by-side (not stacked as I'm seeing in your screenshots above, which is perfect). I have 1 question, which is not an issue we need to solve here: in the screenshot above where you have the Media & Text block (parent) selected, is the media part of that not shown as a child because of the default selection logic – meaning it's "auto" selected by default? |
Now that I look at it again, I wonder if it'd be possible to just make sure the |
Sorry, but I don't understand what you meant 😢
I'll see what I can do! If I succeed then should I change the label in both cases or only in one (nested)? Also, what should I do in the scenario where getting the name will be too complicated? |
Apologies, my comment wasn't super clear. I meant there is no "child" outline style on media part of the Media & Text block. I was assuming this was related to our current selection logic, where the media part is auto-selected initially.
My thought is any time the floating toolbar is shown, the breadcrumb should say the name of the block that is selected. "Unrecognized" seems a bit weird to me.
If impossible, I would make the label |
@iamthomasbishop I've checked the possibilities to provide the original block name along with an icon will be complex in relation to benefit, that's why I've prepared a solution with
Also, after pulling fresh changes I've noticed that items within |
This is definitely better. Is it also a similar difficulty to display the selected block icon (Columns icon in your example above) in the breadcrumbs instead of the generic block icon? Not the end of the world but it would be even nicer 😄
👍 |
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.
@@ -228,7 +245,7 @@ class BlockListBlock extends Component { | |||
style={ this.applyBlockStyle() } | |||
> | |||
{ isValid ? this.getBlockForType() : <BlockInvalidWarning blockTitle={ title } icon={ icon } /> } | |||
{ isSelected && <BlockMobileToolbar clientId={ clientId } /> } | |||
<View style={ this.applyToolbarStyle() } >{ isSelected && <BlockMobileToolbar clientId={ clientId } /> }</View> |
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 think I'd rather avoid using negative margins here. It seems that we should instead wrap the block content in another view and add the padding to that instead.
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.
Actually I was afraid of negative margins as well, but decided to go with them because touching other styles were more dangerous for me.
I'm afraid unregistered/unsupported blocks might be a bigger deal than it seems and that we didn't anticipate in the previous PR. The problem is that they are rendering as a simple One approach that initially seems to be working is to change the const hasChildren = ! isUnregisteredBlock && !! getBlockCount( clientId ); |
Unrelated to this I think, but the appender on an empty group isn't working. I thought I saw a PR fixing that a while back.
Shouldn't the empty group also get the same spacing? |
packages/block-editor/src/components/block-list/breadcrumb.native.js
Outdated
Show resolved
Hide resolved
I think that empty group appender has a proper spacing, but please @iamthomasbishop let us know if this is correct.
|
c869968
to
b5a801d
Compare
@koke Thanks for feedback and suggestions.
Testing HTML<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->
<!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:image -->
<figure class="wp-block-image"><img alt=""/></figure>
<!-- /wp:image -->
<!-- wp:paragraph -->
<p>Hello</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:group -->
<!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container"></div></div>
<!-- /wp:group -->
<!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:columns {"className":"gutenberg-landing\u002d\u002ddevelopers-columns"} -->
<div class="wp-block-columns has-2-columns gutenberg-landing--developers-columns">
<!-- wp:column -->
<div class="wp-block-column">
<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left"><strong>Built with modern technology.</strong></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left">Gutenberg was developed on GitHub using the WordPress REST API, JavaScript, and React.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"left","fontSize":"small"} -->
<p class="has-text-align-left has-small-font-size"><a href="https://wordpress.org/gutenberg/handbook/language/">Learn more</a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column">
<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left"><strong>Designed for compatibility.</strong></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left">We recommend migrating features to blocks, but support for existing WordPress functionality remains. There will be transition paths for shortcodes, meta-boxes, and Custom Post Types.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"left","fontSize":"small"} -->
<p class="has-text-align-left has-small-font-size"><a href="https://wordpress.org/gutenberg/handbook/reference/faq/">Learn more</a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
<!-- wp:paragraph -->
<p>Hello</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:group -->
<!-- wp:columns {"className":"gutenberg-landing\u002d\u002ddevelopers-columns"} -->
<div class="wp-block-columns has-2-columns gutenberg-landing--developers-columns">
<!-- wp:column -->
<div class="wp-block-column">
<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left"><strong>Built with modern technology.</strong></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left">Gutenberg was developed on GitHub using the WordPress REST API, JavaScript, and React.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"left","fontSize":"small"} -->
<p class="has-text-align-left has-small-font-size"><a href="https://wordpress.org/gutenberg/handbook/language/">Learn more</a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
<!-- wp:column -->
<div class="wp-block-column">
<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left"><strong>Designed for compatibility.</strong></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"left"} -->
<p class="has-text-align-left">We recommend migrating features to blocks, but support for existing WordPress functionality remains. There will be transition paths for shortcodes, meta-boxes, and Custom Post Types.</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph {"align":"left","fontSize":"small"} -->
<p class="has-text-align-left has-small-font-size"><a href="https://wordpress.org/gutenberg/handbook/reference/faq/">Learn more</a></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:column -->
</div>
<!-- /wp:columns -->
|
017f79a
to
ade20e1
Compare
@lukewalczak I think it’d probably make sense for the empty group appended to align to the same key lines as the filled one, but it’s not a blocker esp because it doesn’t conflict with a child outline (considering it doesn’t have siblings alongside it). So we can attack that in a separate issue if need be. The last screenshots also look solid 👍 I can’t recall if there was an explicit decision on changing the selected/not-nested border, but I think we should eventually apply the same slight margin/inset that we use on the selected/nested one. Again this can be done separately, should not be considered a blocker on this. |
Description
That PR is fixing the issues mentioned in testing release after navigation feature merge
Ref to gb-mobile: wordpress-mobile/gutenberg-mobile#1682
How has this been tested?
I fixed vertical and horizontal padding in
BlockMobileToolbar
Fixed both of them!
I was not able to reproduce it and it looks properly in my opinion
Fixed!
I disabled that touchable since there is an empty onPress function
Honestly, I would like to leave it for now, since I don't remember what was the cause of jumpiness in
RichText
s and back to that once Jakub will be available.Screenshots
Types of changes
Checklist: