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

#1954 fixes z-index issue of block mover buttons #1981

Closed
wants to merge 1 commit into from
Closed

#1954 fixes z-index issue of block mover buttons #1981

wants to merge 1 commit into from

Conversation

stephenc222
Copy link

fixes #1954. Now, when scrolling past the focused block, the z-index is lower than the top of the toolbar, and so scrolling down looks more congruent without the mover buttons standing out.

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

The z-index was originally added in #1479 to address clickability issues (see #1472). We'll need to find a compromise here; maybe a lower z-index? cc @truongwp

@@ -3,7 +3,6 @@
top: 10px;
left: 0;
padding: 0 14px 20px 0; // handles hover area
z-index: z-index( '.editor-block-mover' );
Copy link
Member

Choose a reason for hiding this comment

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

If we're to remove this, the corresponding entry should also be removed from the editor/assets/stylesheets/_z-index.scss file.

Copy link
Author

Choose a reason for hiding this comment

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

@aduth That sounds like a good idea, and I think that at least lowering the z-index for the corresponding SASS style sheet would probably be the safer, less invasive alternative, since removing this line here ultimately would have the same effect of reducing the z-index in the corresponding SASS style sheet, just a much more lowering effect.

Forgive me if this is the wrong place to ask this, but while I have your attention on this issue, I'd like to ask a bigger question:

What is the plan for introducing the drag and drop ability for the blocks to re-order and position themselves by dragging them around, and perhaps add new blocks by dragging them in from a list of available block choices?

For a form-based editor WP plugin that I am building for a client, so that users can build forms by dragging around form elements and add in new form elements by dragging them in to the main form 'tree', I've worked considerably with react-sortable-tree, even creating the feature myself for giving its API the ability to drag in new external nodes, from this merged PR. React-sortable-tree's dragging ability is built solely on its bedrock of React-dnd.

I've enjoyed the abstracted, focus-on-the-data-not-the-DOM approach of React Dnd, and I am curious what you think of the possible application of React Dnd (or possibly even react-sortable-tree) is for Gutenberg.

Copy link
Member

Choose a reason for hiding this comment

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

There's a few related issues at #38 and #1511

My understanding is the general sentiment is that drag-and-drop is not a goal for primary block arrangement, but could be added as an enhancement on top of current arrangement tools. Drag-and-drop is tough to get right, and particularly so for long-content posts.

I don't have much personal experience with the two options you raised, aside from general awareness of their existing. I did have a hand in implementing a similar component in Calypso which could similar apply or inspire for a similar behavior in Gutenberg.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the response! I think the drag and drop ability for blocks within Gutenberg is definitely worth pursuing, and consensus in the community surrounding this, ultimately architectural, issue would be great, so the direction for accomplishing this could be seen as consistent and uniform. Just my two cents.

@timmyc
Copy link
Contributor

timmyc commented Jul 28, 2017

The block mover z-index issue was also reported in #1860 and subsequently fixed in #2001

@timmyc timmyc closed this Jul 28, 2017
@stephenc222 stephenc222 deleted the fix/1954-block-mover-buttons-z-index branch July 28, 2017 20:50
Tug pushed a commit that referenced this pull request Mar 19, 2020
…sibility

Add accessibility label to Block List Footer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block mover buttons z-index higher than toolbar z-index
3 participants