portal

yuhan 2025-03-30T13:53:11.791479Z

Is this a portal bug? I'm trying to view some html files slurped in and converted to hiccup, but it chokes on any :style attr with a string valuef and results in cryptic "Minified React" errors.

(tap>
  (portal.viewer/hiccup
    [:div {:style "font-size:24pt"} "hi"]))

djblue 2025-03-31T17:07:08.313279Z

Yeah, this is probably a bug in Portal. I mainly use style as a map so if you switch to that it will probably work. But it should support both in the future 👌

yuhan 2025-04-09T14:53:00.883419Z

Any idea where to look for the fix? I tried monkey patching portal.ui.styled/style->css via p/eval-str but that didn't work, maybe I've misunderstood the evaluation model or the bug is caused elsewhere

yuhan 2025-04-09T14:56:16.093659Z

(I'm dealing with large nested DOMs parsed from an external source, it doesn't quite make sense to do a deep code-walk to transform :style strings back into maps)