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

Fix: Some default block appender styles are set on the editpost module #16943

Merged
merged 1 commit into from
Aug 20, 2019

Conversation

jorgefilipecosta
Copy link
Member

@jorgefilipecosta jorgefilipecosta commented Aug 7, 2019

This PR moves styles from the edit-post module into the block editor module. These styles are required for the default block appender work as expected, and that component is part of the block editor module so these styles should be set there.

This problem is affecting the block widgets screen.

Related: #16601

How has this been tested?

I enabled the experimental widgets screen in the settings.
I went to the experimental widgets screen.
Deleted all the content in one of the block areas.
I added an image block, and I verified the insert button of the default block appender is visible, in master it is not.

@mapk
Copy link
Contributor

mapk commented Aug 7, 2019

@jorgefilipecosta thanks for your work on this! I wanted to reply to your comment from the issue on this PR.

It solves the issue by providing the same appender as the normal post editor.
If for this scenario having a custom appender is a must, I guess we can follow up by allowing the block editor module to be more customizable, similar to what we allow now for inner blocks.

I think in context of the editor, having the smaller appender is good because the editor is meant for writing a flow of content. I believe users think of Widget Areas differently. These feel more block-related where the user adds blocks of particular content to show in a sidebar or whatever.

That being said, I'd like to go with a larger custom appender. The same we use in the Columns block would be fantastic.

Screen Shot 2019-08-07 at 2 07 06 PM

@@ -41,6 +52,13 @@
}
}

// Ensure that the height of the first appender, and the one between blocks, is the same as text.
.block-editor-block-list__block[data-type="core/paragraph"] p,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this style belong here or in the paragraph block instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think so, I moved the styles to the paragraph block 👍

@jorgefilipecosta jorgefilipecosta force-pushed the fix/default-block-appender-styles branch from 860e064 to 2260e03 Compare August 8, 2019 17:59
@jorgefilipecosta
Copy link
Member Author

Hi @mapk the appender we use for columns and groups was added in #16971.
This PR is still relevant because it solves a problem happening on Block Editor using the default appender logic.

@jorgefilipecosta jorgefilipecosta merged commit 91afefc into master Aug 20, 2019
@jorgefilipecosta jorgefilipecosta deleted the fix/default-block-appender-styles branch August 20, 2019 10:25
donmhico pushed a commit to donmhico/gutenberg that referenced this pull request Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants