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

Moving a block down forces a re-render #544

Closed
mtias opened this issue Apr 28, 2017 · 10 comments
Closed

Moving a block down forces a re-render #544

mtias opened this issue Apr 28, 2017 · 10 comments
Assignees
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended

Comments

@mtias
Copy link
Member

mtias commented Apr 28, 2017

Moving a block up seems to be great, but moving it down seems to be triggering a re-render of the block content. The YouTube embed is a good example, where moving up is fine, but moving down re-generates the video and toolbar.

@mtias mtias added [Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended labels Apr 28, 2017
@aduth
Copy link
Member

aduth commented Apr 28, 2017

Related: facebook/react#858

And before I found that, I put together a minimal proof-of-concept: https://codepen.io/aduth/pen/QvpxwL

@aduth aduth changed the title Moving a block forces a re-render Moving an embed block forces a re-render Apr 28, 2017
@aduth
Copy link
Member

aduth commented Apr 28, 2017

Looking like this is just how the DOM works: http://stackoverflow.com/a/8318401

@aduth
Copy link
Member

aduth commented Apr 28, 2017

Actually... it might not be pretty, but we could do some wizardry with the Flexbox order property:

https://codepen.io/aduth/pen/eWvKeW

@ellatrix
Copy link
Member

Yeah moving iframes will always reload them. A way to avoid that is to move stuff around the iframe instead of the iframe itself. E.g. move the prev block down to move up. That flexbox approach is super interesting!

@mtias
Copy link
Member Author

mtias commented Apr 28, 2017

The re-render happens on the block control bar as well when you move any block down.

@mtias mtias changed the title Moving an embed block forces a re-render Moving a block down forces a re-render May 1, 2017
@mtias
Copy link
Member Author

mtias commented May 1, 2017

@aduth @iseulde renamed the title here.

@mtias mtias added this to the May Week 1 milestone May 1, 2017
@jasmussen
Copy link
Contributor

Removed this from the milestone. I still think it would be good to have fixed, and it seems like #563 might fix it. But it is less important than the other items in the milestone. So untracking for now.

@afercia
Copy link
Contributor

afercia commented May 22, 2017

About flexbox re-ordering (a similar W3C note applies also to CSS grids), see:
5.4.1. Reordering and Accessibility
https://www.w3.org/TR/css-flexbox-1/#order-accessibility

@ellatrix
Copy link
Member

So it's a no?

Authors must use order only for visual, not logical, reordering of content. Style sheets that use order to perform logical reordering are non-conforming.

@aduth
Copy link
Member

aduth commented May 23, 2017

Closing as unfixable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants