Howto make a button to create new record

The high level process is:
  1. Choose an attribute to anchor the link
  2. Add :link/class :hf/new
  3. Add a new :link/fiddle to the link to model the form

1. Choose an attribute to anchor the link

Is this entity identifiable by an attribute?
  • If so, use that attribute to anchor the link.
  • Works for attrs that are :db.type/ref or :db.unique/identity
  • Example: :dustingetz.post/slug
  • Warning: Don't choose :db/id or :db/ident, they are too general and the link will appear in too many places.
Is this entity coming from a top-level Datomic query?
  • If so, use the query's fiddle/ident to anchor the link.

2. Add :link/class :hf/new

This will turn the anchor into a button.
  • This button doesn't do anything yet! That is what :zero means

3. Add a new :link/fiddle to model the form

  • Alt-click inside the popover to drill down into the popover's form's fiddle (opens in new tab)
  • Fill out a pull expression for this form

3b. Fill out a pull expression for this form and see it work