phlex icon indicating copy to clipboard operation
phlex copied to clipboard

A framework for building object-oriented views in Ruby.

Results 44 phlex issues
Sort by recently updated
recently updated
newest added

WIP combining the work from #69 and #68. I’ve also added the ability to capture ERB yielded into a Phlex component. ### Initial Rails Support Just update your `Gemfile` to...

Opening this issue as a reminder to consider interoperability with Rails partials — i.e. rendering an ERB partial inside a component and making it possible to render Phlex components in...

rails

It might be worth either renaming the `component` method or giving it a short alias. A few options that come to mind: 1. `comp`, `com` or even `c` 2. `render`...

DSL

There are a number of Rails view helpers which we will need to support in some way or another. The helpers that produce strings should be fine to just include....

rails

We should be able to compile components into methods. ```ruby class NavComponent < Phlex::Component def initialize(links:) super end # Given this template def template nav do ul do @links.each do...

enhancement
performance

It looks like streaming in Rails is handled here. https://github.com/rails/rails/blob/04972d9b9ef60796dc8f0917817b5392d61fcf09/actionpack/lib/action_controller/metal/streaming.rb#L195-L220 It takes a [`Rack::Chunked::Body`](https://rdoc.info/github/rack/rack/main/Rack/Chunked/Body) which takes an enumerator. Rack made the [decision](https://github.com/rack/rack/issues/1266#issuecomment-523226433) to depreciate this module and delegate it to...

rails
performance

[WIP] @enderahmetyurt and I paired on some initial helpers for Rails today, though I’m not entirely sure how we should best include them. 1. I don't want Phlex to be...

If I’m understanding how Phlex works, in order to use it in Rails you will either need to call `render` in the controller and hand it a Phlex component, or...