Skip to content

Releases: phlex-ruby/phlex-rails

0.9.0

08 Mar 21:27
4883733
Compare
Choose a tag to compare
0.9.0 Pre-release
Pre-release

Support for Phlex 1.6.

What's Changed

Full Changelog: 0.8.0...0.9.0

0.8.0

06 Mar 11:54
Compare
Choose a tag to compare
0.8.0 Pre-release
Pre-release

Added support for Phlex 1.5 and a new adapter for the url_for view helper.

What's Changed

  • Override plain so it doesn't HTML-escape ActiveSupport::SafeBuffer by @joeldrapper in #73
  • Add Phlex::Rails::Helpers::URLFor by @marcoroth in #75

New Contributors

Full Changelog: 0.7.1...0.8.0

0.7.1

24 Feb 12:17
Compare
Choose a tag to compare
0.7.1 Pre-release
Pre-release

Highlights

  • Fixed an issue where C-level Procs — Proc generated by calling to_proc on a Symbol, e.g. foo(&:bar) — would raise ArgumentErrors when passed as Phlex content blocks.
  • Improved compatibility with ERB by wrapping ERB blocks in blocks that capture their output against the view context. An added benefit of this is it means we no longer need Phlex::HTML to pretend to be an OutputBuffer.
  • Fixed an issue with Phlex::Rails::Helpers::Routes that meant the url_options adapter was being overridden.

Other news

Improved turbo rails support

turbo-rails merged support for using renderable objects (i.e. Phlex components) as turbo stream content. I expect this will be included in the next release of turbo-rails. hotwired/turbo-rails#433

Until then, you can use the feature by updating your Gemfile to depend on turbo-rails/main.

gem "turbo-rails", git: "https://github.com/hotwired/turbo-rails.git"

Lookbook support

Lookbook v2 (beta) supports Phlex. Check out the demo.

What's Changed

Full Changelog: 0.7.0...0.7.1

0.7.0

17 Feb 18:50
Compare
Choose a tag to compare
0.7.0 Pre-release
Pre-release

Highlights

  • Fixed an issue with Phlex::Rails::Helpers::Routes that meant they sometimes wouldn't work as expected.
  • Added support for safe_concat, which is used by some templating languages like Slim.
  • Improved support for rendering Rails partials inside Phlex components.
  • Improved phlex:install, phlex:component, phlex:view and phlex:controller generators.
  • Support for layouts — this is not documented yet, but you can generate your first layout with the phlex:install generator. The phlex:controller generator generates a controller that uses it.

What's Changed

Full Changelog: 0.6.1...0.7.0

0.6.1

12 Feb 17:15
Compare
Choose a tag to compare
0.6.1 Pre-release
Pre-release

What's Changed

Full Changelog: 0.6.0...0.6.1

0.6.0

11 Feb 14:52
Compare
Choose a tag to compare
0.6.0 Pre-release
Pre-release

Highlights

This version ships with adapters for almost all Rails view helpers. Each helper is defined as its own module under Phlex::Rails::Helpers, e.g. Phlex::Rails::Helpers::LinkTo, so you can include whichever helpers you need. There's also a special Phlex::Rails::Helpers::Routes helper, which gives you access to your application routes.

If you were including Rails.application.routes.url_helpers before, you should replace that with Phlex::Rails::Helpers::Routes for better compatibility.

Full Changelog: 0.5.1...0.6.0

0.5.1

01 Feb 22:57
Compare
Choose a tag to compare
0.5.1 Pre-release
Pre-release

Highlights

  • You can now render a Phlex view class without having to call .new on it if you don't have any arguments to pass to the view.
  • Fixed an issue where the helpers proxy didn't work when a Phlex view was rendered from ViewComponent.

What's Changed

Full Changelog: 0.5.0...0.5.1

0.5.0

30 Jan 12:39
Compare
Choose a tag to compare
0.5.0 Pre-release
Pre-release

Highlights

  • You’ll now get a fancy warning if you accidentally override append or safe_append on a view. These methods are really important since Phlex views themselves are used as ActionView’s output buffer while rendering from ERB.
  • We added the helper javascript_import_module_tag, and you can also use rich_text_area in form_with.
  • When rendering in an ActionView context, we unbuffer the yielded view. This makes it more consistent with other builder objects, as you need use <%= ERB output tags to output the result of a builder method.
  • We no longer generate an ApplicationView module on install.

The changes to ActionView rendering mean you can now render something from an outer view’s public interface inside an inner view. Here's an example:

<%= render OuterView.new do |o| %>
  <%= render InnerView.new do |i| %>
    <%= o.foo # <- this works now %>
  <% end %>
<% end %>

Previously, this would have output in the wrong order.

What's Changed

New Contributors

Full Changelog: 0.4.2...0.5.0

0.4.2

14 Dec 22:27
Compare
Choose a tag to compare
0.4.2 Pre-release
Pre-release

What's Changed

Full Changelog: 0.4.0...0.4.2

0.4.0

13 Dec 11:40
d724c04
Compare
Choose a tag to compare
0.4.0 Pre-release
Pre-release

What's Changed

New Contributors

  • @weapp made their first contribution in #22

Full Changelog: 0.3.2...0.4.0