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

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

Merged
merged 1 commit into from
Sep 14, 2018

Conversation

jorgefilipecosta
Copy link
Member

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 September 5, 2018 16:22
@aduth
Copy link
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?

@aduth aduth added [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Status] Blocked Used to indicate that a current effort isn't able to move forward labels Sep 5, 2018
@aduth aduth modified the milestones: 3.8, 3.9 Sep 5, 2018
@jorgefilipecosta jorgefilipecosta force-pushed the fix/dont-show-child-stacked-icon-if-childs-are-hidden-on-inserter branch 3 times, most recently from c88dbf9 to 2f6c034 Compare September 7, 2018 16:54
@jorgefilipecosta
Copy link
Member Author

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.

@jorgefilipecosta jorgefilipecosta force-pushed the fix/disable-inserter-colum-block branch from b31395b to 051a002 Compare September 7, 2018 17:15
@youknowriad youknowriad removed this from the 3.9 milestone Sep 13, 2018
@jorgefilipecosta jorgefilipecosta force-pushed the fix/dont-show-child-stacked-icon-if-childs-are-hidden-on-inserter branch 3 times, most recently from f2acc2f to 0dda16e Compare September 13, 2018 21:41
@jorgefilipecosta jorgefilipecosta force-pushed the fix/disable-inserter-colum-block branch 2 times, most recently from f835baa to 1d25db4 Compare September 13, 2018 21:47
@aduth aduth added this to the 3.9 milestone Sep 14, 2018
@aduth
Copy link
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 September 14, 2018 12:51
@jorgefilipecosta jorgefilipecosta force-pushed the fix/disable-inserter-colum-block branch from 1d25db4 to a73dbc8 Compare September 14, 2018 12:55
@jorgefilipecosta jorgefilipecosta removed the [Status] Blocked Used to indicate that a current effort isn't able to move forward label Sep 14, 2018
@jorgefilipecosta
Copy link
Member Author

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

@jorgefilipecosta jorgefilipecosta merged commit 5bae40e into master Sep 14, 2018
@jorgefilipecosta jorgefilipecosta deleted the fix/disable-inserter-colum-block branch September 14, 2018 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants