Aadmaa

Aadmaa

Removing shared-component installation code smells and maintainability issues

What would have to change in Phoenix LiveView to allow a shared component ecosystem to flourish?

I have seen some lamentations about the need for a solid, go-to component library, like MUI for React. But I am not sure that’s the problem. To me it seems like the Phoenix framework may need some light tweaking so that a robust shared component (or component library) can be shared without creating maintainability issues.

For example, Serge Aleynikov riffs off of a tutorial from Berenice Medel on the Fly site to make this multiselect widget. But to install it, you can’t just run mix deps.get. You’ve also got to run a special installer that will modify assets/tailwind.config.js, assets/js/hooks/multi-select-hook.js, assets/js/hooks/index.js. It’s really nice the author adds that installer to the package, but it feels like he shouldn’t have to – and like we’re going to run into problems down the road due to the weak encapsulation. E.g., naming conflicts with hook; and/or poorly-executed code surgery on any one of these files, resulting in a broken project.

Component libraries like Petal Components also resort to installation processes that smell like future maintainability PITAs. You have to edit tailwind.config.js; add the component library’s css to app.css; add a “use” statement to MyApp_web.ex; and then deal with name conflicts for a number of the core_components.ex widgets.

So back to the question! Do folks have a sense of what (if any) framework improvements are needed to make it possible to share robust components or component libraries without code-smelly installation and name conflict issues?

Where Next?

Popular in Proposals: Ideas Top

andypearson
Hey all, I have been working on some performance improvements for the Phoenix application I work on. As part of this, through trial and...
New
cheerfulstoic
I feel like Elixir is getting big enough and old enough that I’m starting to experience problems with conflicting dependencies. An examp...
New
azyzz228
The slow network is known to be an Achilles heel of LiveView’s architecture. Recently, I was working on creating a fast rendering map wi...
New
sevensidedmarble
Hello all, Apologies if this has been proposed before I guess, but I have a very simple one: With the increasing importance of LV, I th...
New
calebjosue
I am reading (Once more) the Phoenix web framework documentation, in the From endpoint to views section contained in the Request life-cyc...
New
caslu
Recently (last week) this PR was merged in Ruby on Rails repository and i thought it could be nice to have in phoenix, basically what it ...
New
nunobernardes99
On 1.8+, when we generate an authentication system with mix phx.gen.auth we can make use of magic link login which is amazing and a great...
New
dogweather
Hi Phoenix community! First off, huge thanks for an amazing framework - Phoenix has been a joy to work with. I have a small UX suggestio...
New
eagle-head
Hi everyone, I’ve been researching Content Security Policy Level 3 support in Phoenix and wanted to share my findings and a proposal for...
New
zachdaniel
One thing I find is that I typically “start” with a LiveView even for static pages (in cases where I know I’m likely to add interactivity...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New

We're in Beta

About us Mission Statement