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

Columns: Disable inserter on column block; Don't show stacked icon on columns #9523

Merged
merged 1 commit into from Sep 14, 2018

Conversation

Projects
None yet
3 participants
@jorgefilipecosta
Member

jorgefilipecosta commented Sep 1, 2018

Description

We can not use the inserter to inserter a column so the inserter should be disabled on this block.
This will also make sure the icon of the columns block does not appear stacked as in fact for the columns we don't have children that we can insert using the inserter.
Depends on: #9337

How has this been tested?

I Verified column block does not appear on the inserter, and that the columns block icon appear normally without the stacked indication.

Screenshots

image

@jorgefilipecosta jorgefilipecosta added this to the 3.8 milestone Sep 1, 2018

@youknowriad youknowriad requested a review from aduth Sep 5, 2018

@aduth

This comment has been minimized.

Show comment
Hide comment
@aduth

aduth Sep 5, 2018

Member

We can not use the inserter to inserter a column so the inserter should be disabled on this block.

Presumably there's already some metric which determines whether an inserter should be shown. Can that not be used in this case rather than adding an explicit support?

Member

aduth commented Sep 5, 2018

We can not use the inserter to inserter a column so the inserter should be disabled on this block.

Presumably there's already some metric which determines whether an inserter should be shown. Can that not be used in this case rather than adding an explicit support?

@jorgefilipecosta

This comment has been minimized.

Show comment
Hide comment
@jorgefilipecosta

jorgefilipecosta Sep 7, 2018

Member

Hi @aduth,

Presumably there's already some metric which determines whether an inserter should be shown. Can that not be used in this case rather than adding an explicit support?

In the columns, case inserter is not available because of locking being equal to all. But locking is a dynamic property specific to each InnerBlock instance. A block may even set locking prop randomly, and each instance may have a different locking. On the inserter the stacked icon refers to all the block instances, we can not rely on locking or any dynamic InnerBlocks property to decide if we should show the stacked icon in the inserter or not. We need to rely on a setting that affects all the instances like the supports, and given that we already have a supports setting for the inserter that seems our best option.

Member

jorgefilipecosta commented Sep 7, 2018

Hi @aduth,

Presumably there's already some metric which determines whether an inserter should be shown. Can that not be used in this case rather than adding an explicit support?

In the columns, case inserter is not available because of locking being equal to all. But locking is a dynamic property specific to each InnerBlock instance. A block may even set locking prop randomly, and each instance may have a different locking. On the inserter the stacked icon refers to all the block instances, we can not rely on locking or any dynamic InnerBlocks property to decide if we should show the stacked icon in the inserter or not. We need to rely on a setting that affects all the instances like the supports, and given that we already have a supports setting for the inserter that seems our best option.

@aduth

This comment has been minimized.

Show comment
Hide comment
@aduth

aduth Sep 14, 2018

Member

Should we change the base branch, to either fix/dont-show-child-stacked-icon-if-childs-are-hidden-on-inserter, or master if / when that's merged?

Member

aduth commented Sep 14, 2018

Should we change the base branch, to either fix/dont-show-child-stacked-icon-if-childs-are-hidden-on-inserter, or master if / when that's merged?

@jorgefilipecosta jorgefilipecosta changed the base branch from fix/dont-show-child-stacked-icon-if-childs-are-hidden-on-inserter to master Sep 14, 2018

@jorgefilipecosta

This comment has been minimized.

Show comment
Hide comment
@jorgefilipecosta

jorgefilipecosta Sep 14, 2018

Member

The PR #9337 was merged, so the base branch was changed and this PR now can be tested directly.

Member

jorgefilipecosta commented Sep 14, 2018

The PR #9337 was merged, so the base branch was changed and this PR now can be tested directly.

@aduth

aduth approved these changes Sep 14, 2018

@jorgefilipecosta jorgefilipecosta merged commit 5bae40e into master Sep 14, 2018

2 checks passed

codecov/project 49.04% remains the same compared to cd167ce
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jorgefilipecosta jorgefilipecosta deleted the fix/disable-inserter-colum-block branch Sep 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment