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

Hide the columns count control on empty columns block #16476

Merged
merged 2 commits into from
Jul 15, 2019

Conversation

youknowriad
Copy link
Contributor

@youknowriad youknowriad commented Jul 9, 2019

Small regression introduced by #16129

closes #16343

When the columns block is in the "setup state", the columns count range control should be hidden.

@youknowriad youknowriad added [Type] Bug An existing feature does not function as intended [Block] Columns Affects the Columns Block Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code labels Jul 9, 2019
@youknowriad youknowriad self-assigned this Jul 9, 2019
@Soean
Copy link
Member

Soean commented Jul 9, 2019

Fixes #16343

@@ -170,9 +172,7 @@ export function ColumnsEdit( {
setForceUseTemplate( true );
} }
__experimentalAllowTemplateOptionSkip
// setting the template to null when the inner blocks
Copy link
Member

Choose a reason for hiding this comment

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

Seems like this comment is still valid?

return (
<>
{ template && (
{ ! showTemplateSelector && (
Copy link
Member

Choose a reason for hiding this comment

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

Alternatively, I wonder what it is about choosing columns that causes the issue in the first place. If someone wanted to skip the layout selection and just start setting columns (assuming of an equal width), why prevent them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I'm not sure what. I decided to remove the selector not only because of the bug because based on the previous check here. I assumed that removing the inspector controls was an intentional behavior.

@youknowriad youknowriad merged commit c3d80db into master Jul 15, 2019
@youknowriad youknowriad deleted the fix/hide-columns-setup-state branch July 15, 2019 09:55
@youknowriad youknowriad added this to the Gutenberg 6.2 milestone Jul 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Columns Affects the Columns Block Good First Review A PR that's suitable for someone looking to contribute for the first time by reviewing code [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Columns block errors when interacting with sidebar slider in placeholder mode
3 participants