What are the legacy settings

We would recommend having them on if you’ve migrated an app.
Especially if you’re using an existing theme.

In a newly created M3 (beta) app these will be all off.

Include Bootstrap 3
Up until now, Bootstrap 3 has shipped with Anvil by default.
Overtime the industry has moved away from bootstrap.
For new themes, like M3, having Bootstrap can be a hinderance to theming.
Unchecking this will mean that your app does not send Bootstrap to the browser.
But in existing apps, this may affect the look and feel of your app.

Legacy class names
Classnames that Anvil provides will now all be prefixed with anvil- this avoids name collisions with custom themes and css.
e.g. a Button in Anvil has a class btn this is a Bootstrapism
After turning this off the class on an Anvil Button will be anvil-btn.

Use legacy dict implementation
In Python if you have x=2 and do x.foo = "bar" this will throw an exception. AttributeError: 'int' object has no attribute 'foo'.
This is because an int in python has no __dict__ and so you can’t assign it random attributes.
If you turn this off, then native Anvil components will behave the same way. i.e. they will not have a __dict__ by default, and so doing btn = anvil.Button(), btn.foo = "bar" will throw the same sort of exception.

Root Dom Container
The app had a couple of divs before you got to the actual dom of your app.
If you inspect the page, you’ll see the difference with this one.

Screenshot 2024-12-13 at 09.13.32
vs

(we’ve removed the anvil-root-container div)

5 Likes