revelrylabs / phoenix_harmonium

Phoenix Framework view helpers for Harmonium-style components (https://harmonium.revelry.co)
MIT License
12 stars 4 forks source link

Discovery - Harmonium/Elixir interactive components #269

Open achord opened 3 years ago

achord commented 3 years ago

Background

The purpose of this discovery ticket is to decide on a path forward concerning: Should Elixir apps use Harmonium JS components ?

While working on a Global Impact PR the dev team had a discussion with @Dacello about using interactive Harmonium components which currently use javascript:

Challenges

JS and LiveView don't play well together

We should probably use LiveView over JS

Importing Harmonium JS into an Elixir app

achord commented 3 years ago

@nschello @Dacello Maybe we can talk about this at the next Engineering meeting. ?

grossvogel commented 3 years ago

I think LiveView is the right way, we'd just need to spend the time to make the components. I played the phoenix recently generator with LiveView wired up out of the box, and it has a Modal component built in, even

Dacello commented 3 years ago

Yea, agreed that liveview is the right way and it will take some time to make the components. Would also like to look into Alpine/Tailwind/Surface

CrystalJewell commented 3 years ago

Has anyone looked into Javascript Interoperability with Liveview? Specifically, Client Hooks?

The project I worked on before here we used quite a few vanilla JS files with LiveView, but it did require us to use PubSub to interact with said JS. I could try to whip up an example of how I did it then. There have probably been some updates to how it works since then though so it might take me a little time to work through those changes.