hyperfiddle-2020 icon indicating copy to clipboard operation
hyperfiddle-2020 copied to clipboard

edn view route box should display symbolic-route after hf/defaults, editable

Open dustingetz opened this issue 5 years ago • 2 comments

This is the easiest to talk about at least – the EDN matches the UI, it is a well-formed s-expression, the specs will pass, and you can edit it. Is there a reason this wouldn't work?

dustingetz avatar Aug 22 '20 17:08 dustingetz

I tried this but it didn't work ... should work imo, standing down for now

[route-editor (get-route rt pid false) (:hypercrud.browser/route-defaults-symbolic ctx) (r/partial set-route rt pid)])

dustingetz avatar Aug 22 '20 17:08 dustingetz

This is why ... the root route-editor is a special case currently and is pre-browse due to loading states ... post-defaults are not loaded yet in the root route editor

(defn iframe-cmp [ctx & [props]]
  [:<> {:key (:partition-id ctx)}
   (when-not (= :hypercrud.browser.browser-ui/user (:hyperfiddle.ui/display-mode ctx))
     [route-editor ctx])
   ; Route is related from pid lookup in rt internals
   [stale-browse ctx browse-error browse-success props]])

dustingetz avatar Aug 22 '20 17:08 dustingetz