# Blocks Layout becomes stacked

**URL:** https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560
**Category:** Help
**Created:** [April 1, 2020, 1:00am UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560 "2020-04-01T01:00:27Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![kyle76063](https://avatars.discourse-cdn.com/v4/letter/k/f14d63/32.png) [@kyle76063](https://forum.makecode.com/u/kyle76063)
#### Post date: [April 1, 2020, 1:00am UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/1 "2020-04-01T01:00:27Z")

</div>

I often toggle between Blocks and Javascript view.

Originally, going back to Blocks view would change the layout in a reasonable spread-out view.  
After creating more Functions, going back to Blocks view started stacking all the Functions in one place.

It is getting hard to manage.

Is there a ticket to manage the layout of the blocks so that it is maintained when toggling the views? I understand some design decisions have to be made in case some new Functions are created on the Javascript side, and deciding where to place them in the Blocks view. But this is starting to be a pain point.

What do others do to work around this? Just stay in Javascript view?

Kyle

---

<div class="post-metadata">

### Author: ![Zac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/zac/32/772_2.png) [@Zac](https://forum.makecode.com/u/Zac)
#### Post date: [April 3, 2020, 2:33am UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/2 "2020-04-03T02:33:28Z")

</div>

this is a good question

i have also been having this problem and i just try to cut down on the amount of functions i have i don’t really have an answer

Zachary

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 3, 2020, 2:59pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/3 "2020-04-03T14:59:16Z")

</div>

I also have the same problem too.

Maybe the problem is that when you open that javascript editor, it changes the blocks file?

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [April 3, 2020, 3:43pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/4 "2020-04-03T15:43:07Z")

</div>

Could you share a program that reproduces the error? We are currently working on collapse/expand of functions and we can look into this.

---

<div class="post-metadata">

### Author: ![peli](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/peli/32/12_2.png) [@peli](https://forum.makecode.com/u/peli)
#### Post date: [April 3, 2020, 3:45pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/5 "2020-04-03T15:45:15Z")

</div>

Collapse All / Expand All options -\> [https://github.com/microsoft/pxt/pull/6812](https://github.com/microsoft/pxt/pull/6812)

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 3, 2020, 3:55pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/6 "2020-04-03T15:55:03Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/4cb3f61dd73f11d98c5e865aee7b22d8b567440f.png)  
Just edited ptx.json and this happened after switching back to blocks.

---

<div class="post-metadata">

### Author: ![shakao](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shakao/32/113_2.png) [@shakao](https://forum.makecode.com/u/shakao)
#### Post date: [April 3, 2020, 4:26pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/7 "2020-04-03T16:26:36Z")

</div>

Oh, I believe this is a bug on our end that’s been fixed but not yet released in Arcade (relevant issue: [https://github.com/microsoft/pxt-minecraft/issues/1664](https://github.com/microsoft/pxt-minecraft/issues/1664)). If you try switching between Blocks -\> JS on [arcade.makecode.com/beta](http://arcade.makecode.com/beta), does the stacking still happen?

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 3, 2020, 4:56pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/8 "2020-04-03T16:56:40Z")

</div>

No, but it still kind of ruins the layout

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/42ab6afa3ad5e96ef03baca8fce0fcc3155e3bf4.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/da78a3200869ab8efd390ba8999a4e30cc37c435.png)  
1/4 of the items were untouched.  
(BTW, the only file I edited while in JS mode was pxt.json, so I could change the description and version numbers)

---

<div class="post-metadata">

### Author: ![shakao](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/shakao/32/113_2.png) [@shakao](https://forum.makecode.com/u/shakao)
#### Post date: [April 3, 2020, 6:07pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/9 "2020-04-03T18:07:12Z")

</div>

Yeah, fair point! I dug around and we have an older issue tracking that [https://github.com/microsoft/pxt-arcade/issues/1269](https://github.com/microsoft/pxt-arcade/issues/1269) I’ve linked this forum post for reference, but feel free to add any additional details.

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 3, 2020, 6:11pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/10 "2020-04-03T18:11:01Z")

</div>

T̶h̶e̶ ̶l̶i̶n̶k̶ ̶s̶e̶e̶m̶s̶ ̶t̶o̶ ̶b̶e̶ ̶b̶r̶o̶k̶e̶n̶ ̶-̶ ̶G̶i̶t̶h̶u̶b̶ ̶c̶a̶n̶’̶t̶ ̶f̶i̶n̶d̶ ̶t̶h̶e̶ ̶i̶s̶s̶u̶e̶

There is any extra semicolon in the link

---

<div class="post-metadata">

### Author: ![Zac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/zac/32/772_2.png) [@Zac](https://forum.makecode.com/u/Zac)
#### Post date: [April 3, 2020, 6:39pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/11 "2020-04-03T18:39:28Z")

</div>

i have an idea (will most likely not work)

just have a muti function and say if this var is true do this and more of that so when you need to call any function you call one and set the var you want to true

this will most likely not work cuz you can add other items to functions

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/1X/d3cfc5b8f267934b0e4aac554b755704dd3b9ecc.png)

-Zachary

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [April 3, 2020, 6:40pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/12 "2020-04-03T18:40:34Z")

</div>

Wouldn’t that defeat the purpose of a function?

---

<div class="post-metadata">

### Author: ![Zac](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/zac/32/772_2.png) [@Zac](https://forum.makecode.com/u/Zac)
#### Post date: [April 3, 2020, 6:48pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/13 "2020-04-03T18:48:08Z")

</div>

you are 100% correct and i have no defense

-Zachary

---

<div class="post-metadata">

### Author: ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)
#### Post date: [October 4, 2020, 7:03pm UTC](https://forum.makecode.com/t/blocks-layout-becomes-stacked/1560/14 "2020-10-04T19:03:02Z")

</div>

I totally agree with this post. I switch to javascript to check what the block code has produced, and also debug the application. When I switch back, all my functions, that were rearranged with meticulous energy, have move to a different location. It is very frustrating and makes it hard to find your code.
