Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 7, 2025

Bumps phlex-rails from 1.2.2 to 2.1.2.

Release notes

Sourced from phlex-rails's releases.

2.1.2

What's Changed

Full Changelog: yippee-fun/phlex-rails@2.1.1...2.1.2

2.1.1

What's Changed

Full Changelog: yippee-fun/phlex-rails@2.1.0...2.1.1

2.1.0

Phlex now uses a completely different mechanism for interoperating with ERB templates from ActionView and ViewComponent.

This release is a minor breaking change which means it could break your code, so be careful when upgrading. If you rely on using slot-style components from ERB, you need to make sure you’re not using <%= tags when calling slot methods on the component.

<%= render Table.new(@people) do |t| %>
  <% t.column("Name") do |person| %>
    <%= person.name %>
  <% end %>
<% t.column("Age") do |person| %>
<%= person.age %>
<% end %>
<% end %>

For UI Kit maintainers, it’s probably a good idea to make your slot methods return nil in case a user does pass them to <%= output tags.

def column(header, &content)
  @columns << { header:, content: }
  nil # <-- return nil
end

If we didn’t return nil from column in this example, the <%= ERB output tags would output the to_s of the @columns array.

If your components are builder-style (e.g. not yielding early), you can usually just depend on the fact that most of Phlex own methods return nil.

Impersonating a Rails builder

If you need to use Phlex to impersonate a Rails builder object where builder methods return HTML-safe strings instead of pushing output to a buffer, you will need to wrap each builder method in a capture. I can only think of one library that might need to do this since it’s aiming for exact API compatibility with existing Rails helpers.

Here’s one example:

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [phlex-rails](https://github.com/phlex-ruby/phlex-rails) from 1.2.2 to 2.1.2.
- [Release notes](https://github.com/phlex-ruby/phlex-rails/releases)
- [Commits](yippee-fun/phlex-rails@1.2.2...2.1.2)

---
updated-dependencies:
- dependency-name: phlex-rails
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Mar 7, 2025
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 18, 2025

Superseded by #227.

@dependabot dependabot bot closed this Mar 18, 2025
@dependabot dependabot bot deleted the dependabot/bundler/phlex-rails-2.1.2 branch March 18, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant