anvilistas / anvil-extras

Other
84 stars 25 forks source link

Latest Anvil Update (to include Layouts) broke some components #525

Closed mastamatto closed 7 months ago

mastamatto commented 7 months ago

I'm at a loss as to why this broke, but after updating some applications on the anvil-hosted apps to using the new 'layouts' feature, any app that is hosted on remote machine (using anvil app server) returns errors: The Switch says NoneType has no attribute 'classList'. The Slider doesn't register 'snapping' like it does on anvil-hosted version. The MultiSelectDropdown says KeyError: "items" does not exist (I assume here:)

self._props = props = _defaults | properties
props["items"] = props["items"] or []

After I manually update the anvil.yaml file runtime_options > version to "2" and commenting out the new line legacy features. the components work as usual. Client/Server python versions & server spec all remain unchanged. I also noticed that on the self-hosted app, if I'm using the latest runtime from anvil, some of the styling (particularly on user input fields) has changed significantly.

this works

runtime_options:
  version: 2
  client_version: '3'
  server_version: python3-full
  server_spec: {base: python310-standard}
  # legacy_features: {class_names: true, bootstrap3: true, __dict__: true, root_container: true}

this breaks the anvil_extras components

runtime_options:
  version: 3
  client_version: '3'
  server_version: python3-full
  server_spec: {base: python310-standard}
  legacy_features: {class_names: true, bootstrap3: true, __dict__: true, root_container: true}

Perhaps I'm missing something obvious... Any advice to get this latest runtime operational on the self-hosted version?

s-cork commented 7 months ago

Please check you're using the latest version of anvil-extras. This should be fixed on the latest version.

s-cork commented 7 months ago

Note: this is probably also because the self hosted runtime needs to be bumped. I'll flag that internally as something we need to do.

mastamatto commented 7 months ago

merged with other existing issue -- resolved