"irreversible change" warning -- what are these unmentioned "irreversible" consequences?

What I’m trying to do:
Look before I leap.

I have an App that is 7 years old, pre-dating Layouts, with about 6MB of code. So I’m cautious about making the kinds of changes that have sweeping and/or subtle side effects. It could add a lot of time to my efforts.

I’m considering creating a new Custom Component as a Layout. (The old way, I’d end up with 2 distinct Custom Components instead, one for each existing Custom Component I want to “wrap”.)

However, in studying up on the feature, Step 1 - Introduction To The Old Style App, the documentation breaks out of the natural flow of text to say

The first time you use Layouts in your app, you’ll need to migrate the app to use the new UI features. If the app hasn’t yet been migrated, you’ll see a popup message when you change your Form to a Layout. This is an irreversible change to your app, so please be aware if you’re migrating an app you’ve built with the old Anvil Designer.

“be aware” of what? Is there a reason that I couldn’t simply revert to the previous commit, and go forward from there? What side effects or incompatibilities am I actually being warned about?

1 Like

we should change that
essentially you would no longer be able to use your app in the classic editor because it didn’t support layouts

but we don’t support the classic editor anymore
you can always revert this in git:

  • creating a commit before you migrate
  • migrating to layouts
  • then go back to the earlier commit if you find any issues
1 Like

So, thanks to Anvil’s integrated git, this was never actually irreversible.

I still don’t know what kind of “issues” I should be looking out for, but with that safety net in place, I’m willing to spend a limited amount of time to find out the hard way.

My guess is that Layout forms might initialize their components in a different order from earlier Custom Components, depending on whether the component was built in to the Layout, or provided by the instance in a slot.

Edit: Or the standard initialization order might change, in order to “make room for” Layout’s way of doing things.

And there might be other subtle differences I wouldn’t know to look for. Things I’m currently depending on without knowing it.

But with the number of Custom Components I have, the old way leads to a combinatorial explosion of mix-and-match. Layouts promise a better way. Entirely new architectures are possible. It took me quite awhile to “get” Data Binding, when it came out: far more plusses than minuses. This is apt to be something similar.