Block html not logically ordered
See original GitHub issueExpected Behavior
Block html should be ordered in a logical and “readable” manner
(This is a crude interpretation of the suggested structure, purely for demonstration)
<block>
<text>set</text>
<variable>variable</variable>
<text>to</text>
<child>
<input>480<input>
<text>/</text>
<input>256</input>
</child>
<block-stack>
...
</block-stack>
</block>
Logical organization following the rendering
Actual Behavior
(again a crude interpretation of the actual structure, purely for demonstration)
<block>
<child>
<input>480<input>
<input>256</input>
<text>/</text>
</child>
<block-stack>
...
</block-stack>
<text>set</text>
<variable>variable</variable>
<text>to</text>
</block>
Here is that same structure, if it actually was reflected in the block rendering
Steps to Reproduce
Inspect the html of any blocks/stack in the editor
Operating System and Browser
Windows NT 10.0, Chrome 86.0.4240.111
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Switching the order of block elements with CSS - Stack Overflow
Here is a "simple as possible" example, for changing the order of div-elements (when resizing the browser window): <!DOCTYPE html> <html> ...
Read more >order - CSS: Cascading Style Sheets - MDN Web Docs
The order CSS property sets the order to lay out an item in a flex or grid container. Items in a container are...
Read more >New CSS Logical Properties! - Elad Shechter - Medium
The way of thinking in CSS Logical Properties Before you start using the new logical properties, you need to stop thinking in terms...
Read more >Structural markup and right-to-left text in HTML - W3C
The solution is to use 'logical properties' when setting up your style: ie. use 'start' and 'end', rather than 'left' or 'right'. Using...
Read more >Policy evaluation logic - AWS Identity and Access Management
This step is not necessary for a few services, such as Amazon S3, that allow some ... Resource data – Data related to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is by design. The rendering of the blocks is independent of the html representation.
The block xml is supposed to be agnostic of how the block is laid out. In particular, something that is not reflected in this issue description is that the block XML has named inputs. These are important for being able to layout the block inputs in different orders (e.g. in different languages) while keeping the block XML exactly the same regardless of which language the block is rendered in.
For example here is the same block in English vs. Japanese, notice that the text and inputs are in different orders:
Some languages will have even more of a drastic difference than this.