Releases: phlex-ruby/phlex-rails
1.2.1
Just a quick fix for an issue that occurred when rendering ViewComponents inside Phlex Components.
What's Changed
- Fix capture block issue by @joeldrapper and @willcosgrove in #193
Full Changelog: 1.2.0...1.2.1
1.2.0
This release adds support for Phlex 1.10.
Highlights
New Streaming Tools
You can now include Phlex::Rails::Streaming
into a Rails controller and then use the stream
method instead of render
to stream HTML or CSV views. Note, this is not compatible with Rails built-in layout system. It will only work if you render your layouts from your Phlex views like any other component.
Enhanced support for Phlex::CSV
with ActiveRecord::Relations
Unordered ActiveRecord::Relations
will enumerate with find_each
by default when passed to a CSV view.
Parameterised layouts
You can now initialise a Phlex::Rails::Layout with parameters.
layout -> { ApplicationLayout.new(foo: "bar") }
[Experimental] support for Selective Rendering (incomplete)
Phlex 1.10 introduced experimental Selective Rendering and phlex-rails
now has limited support for this via the X-Fragment
HTTP header. Currently, this only works for views that are 100% Phlex. In the future, we plan to use Nokogiri to parse ViewComponent components and ActionView views and output helpers so they can be selectively rendered too.
Performance Improvements
- The same buffer performance improvement in Phlex 1.10 has been applied here
- Helper adapters are now auto-loaded, which should improve startup performance
Deprecations
- Helper modules have been renamed for better consistency with the respective helper method names — the old module names still work but will print a deprecation warning now.
Other notable change
- If you call a Rails helper without including the adapter module, the error message will guide you to include the appropriate module
- Support for new Turbo 8 helpers
- Fixed Tailwind configuration path in the install generator
- Better support for translation helpers
PRs merged
- Allow "lazy" lookup of translations (
t(".my_key")
) and handle missing keys gracefully (Instead of replacing withTranslation missing:
) by @davidalejandroaguilar in #101 - Require zeitwerk now that it is not required by Phlex by @willcosgrove in #147
- Add special Phlex::CSV handling for ActiveRecord::Relation collections by @willcosgrove in #157
- Fix component generator inconsistencies by @justinfrench in #155
- Support selective rendering by @joeldrapper in #154
- Fix CI jobs and add Ruby 3.3 to CI matrix by @stephannv in #150
- Add Method class to overrides by @bradgessler in #153
- Bump actions/deploy-pages from 2 to 4 by @dependabot in #133
- Remove Zeitwerk loader by @joeldrapper in #159
- Extract
a
helpers by @joeldrapper in #160 - Extract c helpers by @joeldrapper in #161
- Don't force a CSV collection to render in batches if it has an ordering by @willcosgrove in #162
- Remove controller generators by @joeldrapper in #158
- Fix Tailwind path by @joeldrapper in #165
- Raise helpful error when calling a missing rails helper by @joeldrapper in #166
- fix: Guard for nil request when getting fragments by @joelmoss in #171
- Use correct syntax for Last-Modified header by @davekaro in #172
- Use
Cache-Control: no-transform
so that the response can be cacheable by @willcosgrove in #175 - Make use of @davekaro's
length
->bytesize
optimization by @willcosgrove in #176 - Add FragmentFilter by @joeldrapper in #177
- Stream Rails error pages by @joeldrapper in #173
- Make helper macros public by @joeldrapper in #169
- Add basic support for defining generator tests by @fractaledmind in #145
- Revert "Add basic support for defining generator tests" by @joeldrapper in #181
- Add nonces to support streaming with CSPs by @joeldrapper in #182
- Rails dummy by @joeldrapper in #183
- Better helper deprecation messages by @joeldrapper in #184
- Add turbo 8 meta helpers (#186) by @BarnabeD in #188
- Use ActiveSupport::Deprecation warnings by @joeldrapper in #189
- Add turbo 8 meta helpers (#186) by @BarnabeD in #190
- Support Parameterised Layouts by @joeldrapper in #192
New Contributors
- @davidalejandroaguilar made their first contribution in #101
- @justinfrench made their first contribution in #155
- @stephannv made their first contribution in #150
- @joelmoss made their first contribution in #171
- @davekaro made their first contribution in #172
- @fractaledmind made their first contribution in #145
- @BarnabeD made their first contribution in #188
Full Changelog: 1.1.2...1.2.0
1.1.2
Constrain phlex
version to 1.9.x
, since phlex-rails
depends on private phlex
APIs which may change with minor versions.
Full Changelog: 1.1.1...1.1.2
1.1.1
- Fixed a bug where Phlex would try to capture nil when rendered from ActionView without a block. — @Burgestrand
1.1.0
- Dropped dependency on
rails
and now only depends onrailties
- Fix an out of order rendering issue when yielding from a partial rendered with a block delegated from a component’s content block
- Added
flash
helper adapter inPhlex::Rails::Helpers::Flash
- Removed experimental form component
- Updated
phlex
dependency to~> 1.9
1.0.0
Summary: https://github.com/phlex-ruby/phlex-rails/blob/main/CHANGELOG.md#100-2023-04-19
Full Changelog: 0.10.0...1.0.0
0.10.0
0.8.1
Highlights
- Fixed an issue with nested deferred render components when called form ERB
- Fixed Phlex version dependency
What's Changed
- Make unbuffered contagious by @joeldrapper in #82
Full Changelog: 0.9.0...0.8.1
0.9.0
Support for Phlex 1.6.
What's Changed
- Support new global render context by @joeldrapper in #79
Full Changelog: 0.8.0...0.9.0
0.8.0
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-escapeActiveSupport::SafeBuffer
by @joeldrapper in #73 - Add
Phlex::Rails::Helpers::URLFor
by @marcoroth in #75
New Contributors
- @marcoroth made their first contribution in #75
Full Changelog: 0.7.1...0.8.0