Sneaky Anvil Updates

Just found a long awaited feature for the Beta Editor has been added.

Looks like you can now add DataTables from other apps:
Klick on “+ Add Table” → existing Table"

8 Likes

And not only tables! Try clicking “Add Database” at the bottom of that sidebar :wink:

6 Likes

This is the main feature requirement that’s kept me from using the beta editor.

Now I am so curious what happens if I give someone a clone link to an App that has Databases from other apps I did not share that have been added to the app that the link belongs to.

I mean, if it does copy the data, where does it get organized? …into the new clone app, or into a phantom app database in the link openers account, or…
:thinking:

(I don’t use the beta so this might already be known to others?)

2 Likes

A new mental model may be required.

Previously, each commit’s anvil.yaml file contained a schema definition for a database, including table and column names, and the Environment definitions (stored who knows where) connected branches/commits to a specific, named database. Each database completely defined itself.

Now we have references to databases and tables defined elsewhere. If we’re to operate upon these entities sensibly, we will need to understand scope, visibility, and lifetime of both the entities and the references. Which things fall into the same bucket, into different buckets, who gets to see which buckets, and who controls what’s in each bucket. Are references purely by name, or by something else? (Each approach has advantages and disadvantages.) Can references be factored out as a unit for readable diffs and version control?

Edit: Maybe I should start a separate post around this. But if the overarching scheme is going to appear in the Documentation soon, though, I’m happy to wait.

2 Likes

The full documentation is on its way, yes!

3 Likes

And once you have linked a table there is now an icon that shows you which tables are shared across apps
image

5 Likes

Not sure if this is new, but when on earlier versions i got an endless loading spinner. It now shows a red triangle when changes cannot be saved anymore:

5 Likes

Not sure how new this is (or whether it’s part of the non-sneaky announcement today), but there’s now a right-click option to “Tag this commit” in the “New” editor’s git version history. And when using that app as a dependency, tagged versions show up as an option for pinning the version of the dependency.

5 Likes

…I have not tested it yet!

1 Like

It’s now gotten harder to accidentally delete an app:

image

5 Likes

Good. Though I would recommend stopping people from copy/pasting the text needed to delete it. Force them to type it in.

If they do that (or work really hard to bypass the anti-copy/paste mechanism) then there’s no one else to blame.

That said, I would like deleted apps to go into a “trash” list for 30 days, and then be deleted. That would allow recovery from scenarios like “I really thought I didn’t need it then discovered it was a dependency/forum example/etc.”

I don’t think it’s possible to positively ascertain whether an app is a dependency or not outside of running the app that depends on it?

2 Likes

Type hints now work in the auto completer, this means that this (an example of it needing an override):
image

Can now work like this (by setting the type hint, it shows up in the autocompleter):

image

5 Likes

This is from the accelerated tables documenation.

I believe this resolves this popular feature request!

2 Likes

…do you have some kind of watcher on our API documentation?! I’m still typing the announcement! :astonished:

3 Likes

A magician never reveals his secrets…

But more like stupid luck and incredible timing.

Not sure if it has been pushed because I’m trying to implement it now :sweat_smile:

2 Likes

** creates app with diff checker on anvil.works/docs/ and spits out an rss feed of the results**

3 Likes

…straight into this thread, right? :wink:

(Seriously, oh goodness, that would make me self-conscious. A post every time any of us corrected a typo…)

2 Likes

An anvil http endpoint as a Discord webhook. That should do the trick…

2 Likes

Just a small thing I noticed

image

The autocompleter now suggests values for all enum properties (spacing, align etc). Basically, all those properties which have a dropdown in the designer (other than role).

8 Likes