xstate-tools icon indicating copy to clipboard operation
xstate-tools copied to clipboard

Is Autolayout on save is intendent?

Open ivankhm opened this issue 3 years ago • 3 comments

Hi, i have a question about the vscode extension.

Lets model an example:

  1. I created a machine in ts file
  2. opened visual editor for this machine
  3. edited layout, moved nodes around, saved file
  4. edited code in ts file - for example renamed event name, saved file

I expect:

  • the layout says the same

What happens:

  • the layout resets to Autolayout.

Dont get me wrong, the Autolayout is useful sometimes, but in my case it turns a visual board into unreadable a mess. Its gets better, if I model child states better, but still, it feels wierd.

Is is behavior intendent? If yes, can it be avoided somehow?

Thanks in advance!

ivankhm avatar Apr 08 '22 12:04 ivankhm

Hi.

I'm also having problems with autolayout changing my layout.

Is it possible to add in a way to disable autolayout please?

Thank you,

Paul

pct196 avatar May 26 '22 21:05 pct196

We will be fixing this soon - there is currently a PR for this internally.

davidkpiano avatar May 26 '22 21:05 davidkpiano

Awesome. Thank you @davidkpiano.

pct196 avatar May 26 '22 22:05 pct196

@ivankhm @pct196 could you recheck if this is still an issue for you?

Andarist avatar Nov 08 '22 16:11 Andarist

Hi, @Andarist. No, this is fixed for me. I will let you folks know if I have any issues in the future. Thank you :)

pct196 avatar Nov 08 '22 20:11 pct196

Awesome, thank you for letting me know!

Andarist avatar Nov 08 '22 21:11 Andarist

I'm using xstate extension v2.0.0 a year after this issue was closed, and I am still getting automatic changes as soon as I type a single new character in the editor. It isn't autolayout, because if I click that button I get a different, cleaner layout.

Each change in the text editor returns my visual editor to a mess.
Click Autolayout, slightly less of a mess Manually arrange, edit, lose all layout changes. Sort of unusable, unless you like repeating the same manual layout changes over and over. Did the problem come back just for me?

VSCode Version: 1.85.0 Commit: af28b32d7e553898b2a91af498b1fb666fdebe0c Date: 2023-12-06T18:17:50.719Z Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Darwin arm64 21.6.0

macasas avatar Dec 26 '23 19:12 macasas