surface-ui/surface_catalogue

Surface catalogue 0.3 isn't loading.

Closed this issue · 5 comments

I've just started a new phoenix project, added surface, and it all works if I use:

      {:phoenix_live_view, "~> 0.16.0"},
      {:surface, "~> 0.6.0"},
      {:surface_catalogue, "~> 0.2.0"}

I see this when I open up the catalogue:

image

But the catalog won't show any components if I use:

      {:phoenix_live_view, "~> 0.17.6"},
      {:surface, "~> 0.7.0"},
      {:surface_catalogue, "~> 0.3.0"}

I think there is an error connecting the socket, maybe?

image

I'm trying to use the catalog on my project, which happens to be on live view 0.17.6, so it's not letting me use this awesome tool.

Here's the my code. It's just a greenfield project with a couple example components in it.

play.zip

crova commented

I'm having a similar issue on a project I'm working on:
image

Screenshot from Firefox dev tool, looks like the OP was on Chrome (I get the same error message as him on Chrome).

Let me know if I can provide/help with anything else here.

noozo commented

Can confirm. I reported it to msaraiva a few weeks ago on the slack channel. I think i managed to track it as far as https://github.com/surface-ui/surface_catalogue/blob/master/lib/surface/catalogue/util.ex in components_reducer not being able to read the components, but didn't pursue any further.

In my investigations the component_tree.ex file receives the params and renders the list of components.
This is failing due to templates not beign loaded and crashing the js execution.

imagen

imagen

Fixed in v0.4.0