#phlex — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #phlex, aggregated by home.social.
-
@joeldrapper any recommendations for integrating #Phlex with #Hanami? Anyone I find talking about it is doing it in Hanami 2.
A Hanami::View is almost the same in principle to a Phlex::HTML, so it feels like with a small adapter or something I could write my Phlex view inside a Hanami view.
-
Another Weekly Brain Dump is online!
- Taylor Community site switching back to #Rails from #Hanami
- I also switch to using #Phlex for view rendering
- I start learning how to build a programming languagehttps://sean.taylormadetech.dev/2026/02/26/weekly-brain-dump-11.html
-
Just had another very nice "aha moment" with #Phlex
For my `Event` model, I had method `notified_changes` - to be able to list changes on object since user last saw it.
First, I put it in Notifiable concern, but that's shared with many models, and I need this only for Event.
So I created presenter/decorator, which is okay. But still - I need this only for events#show, so general presenter is bit of an overkill.
Luckily, in Phlex, I can to this:
-
Ok, I'm really enjoying using #Phlex in my #rails app.
I started using it in new project to try (didn't manage to rewrite the layouts and get rid of simple_form, but other than that, I'm full on Phlex).
Now I'm rewriting ViewComponents to Phlex (with help of RubyUI, nice library!), and it's so much cleaner!
I wrote a post about why I like Phlex now, as it would be bit long for here:
https://dev.to/janmpeterka/using-phlex-helps-me-be-a-better-programmer-16ceThanks @joeldrapper for this delightful gem!
-
-
Added features do Pikoin:
- Cashflow insight
- Spending breakdown insight
- Support for pt-BR language
- Support for different currencies (input and display)
- More 2 filter options for insights (last month, last year)Pikoin repo: https://github.com/gunbolt/pikoin
-
Phlex for Rails Emails: Action Mailer Without ERB — https://camillovisini.com/coding/phlex-for-rails-emails-action-mailer-without-erb
#HackerNews #Phlex #Rails #Emails #ActionMailer #ERB #Free #Coding -
-
I need to migrate an "old" framework based on #phlex . I'm working on adding the deferred rendering to our existing stack; and can't wrap my head around what that `vanish(&)` thing do.
So many unexpected behaviours, if only we had time to do this more thoughtfully at first.
-
I implemented a short animation for @goodenoughtesting using #Tailwind #Ruby #Rails #Phlex
Read the full article at https://allaboutcoding.ghinda.com/how-to-make-a-small-pulsating-animation
-
I just published Phlex::Variants gem, to help building components with Phlex + utility-first CSS frameworks (eg. Tailwind CSS).
-
🤔 random thought—does DHH's recent "system tests are dead" proclamation open the door to ViewComponents (or Phlex, or ?) being stock Rails features? I like ViewComponents because I can test UI things without the browser overhead—even if I only use a component once in my whole app. #RubyOnRails #RSpec #ViewComponent #phlex
-
@joeldrapper BTW, nested layouts are so much simpler with #Phlex than the way proposed in Rails Guides.
-
@joeldrapper Tried #Phlex for a small side project and enjoyed it a lot.
One thing I noticed is that docs still use `template` everywhere even though it seem to have been deprecated.
-
@joeldrapper, what the story for I18n for #Phlex? I'm specifically thinking of the Rails idiom where I can have an `app/views/statics/home.fr.html.erb` and an `app/views/statics/home.en.html.erb` and depending on the Accept-Language header, one of the views will be rendered.
-
@joeldrapper I've been watching Phlex develop and like what I see! However, I've also found a lot of value in staying vanilla/golden path Rails in the past.
It looks like with phlex.js/morphlex, phlex is moving further away from that - I'm curious what the motivation is in writing turbo and idiomorph replacements.
Have you written or spoken somewhere about this you could point me to?
Thanks!
-
My second post on how I use #phlex to override tags to apply styling to markdown: https://williamneal.dev/writing/tag-overriding-in-phlex-and-markdown
#Marketing #Week for #Ruby Projects.
-
I’ve often wondered about #phlex.
I’ve just watched https://gorails.com/episodes/components-with-phlex-in-rails?autoplay=1#
@adamlogic Brilliant. Well worth the 25 minutes.
-
Here's how to render the JavaScript for the new debugbar Rails gem in a Phlex layout (add this to the `head` block in your template).
https://github.com/phlex-ruby/phlex-rails
-
I just released Phlex-Slotable 0.2.0 with two new features:
1) Accepts string as phlex view class name. It is useful when using an inner class that will be evaluated later.
2) Allows lambda slots. It is useful in cases where writing another component may be unnecessary or as wrappers for another phlex view with specific default values.
https://github.com/stephannv/phlex-slotable/releases/tag/v0.2.0
-
I just published my first gem, Phlex-Slotable. It is a Slot API for @joeldrapper 's Phlex lib inspired by ViewComponent slots.
I'm already using this on my side-project and it is working fine. I'm planning to add some features to improve its usage (eg. allow passing String as component class name). I'm putting off refactoring the code until these new things are ready.
BTW, Its API can change.
-
You can now stream your Phlex view from Sinatra using the phlex-sinatra gem https://www.benpickles.com/articles/93-streaming-phlex-from-sinatra #phlex #sinatra
-
I have finally got around to trying out #phlex and so far I am loving it.
I am experimenting with wrapping layout primitives (see https://ruby.social/@Sandbagger/110866339322193551) into Phlex components, and being able to render them like the method calls to HTML tags -
Phlex isn’t a “competitor” to React but I recently rewrote a small React/GraphQL (Apollo + Rails backend) app in Rails/Phlex (no JavaScript at all) which removed loads of code, a ton of complexity, and additional maintenance hassle. I’m not even all-in with Phlex but it immediately gives benefits for even the smallest of components #phlex #mpa
-
Posted a little something about my experience with #Phlex so far.
-
While working with #phlex I see two kinds of components emerging:
1. Pretty dumb UI components that usually accept a lot of arguments which are all primitive value. For example `Components::Card`.
2. Specialized components which accept one complex object and a component knows a lot about this object. Usually only used in a few places. For example `Components::TournamentInfobox`.I would like to distinguish somehow between them, but I'm missing the name for 2.