Skip to content

Releases: stephannv/phlex-slotable

v0.5.0

08 Sep 14:58
111e2ff
Compare
Choose a tag to compare

What's Changed

  • Prepare for Phlex 2.0 💪
  • Drop Ruby 2.7, 3.0 and 3.1 support
  • Add Phlex::Kit compatibility tests
  • Make Phlex::Slotable::VERSION available by default

Full Changelog: v0.4.0...v0.5.0

v0.4.0

15 Feb 00:40
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.1...v0.4.0

v0.3.1

14 Feb 14:28
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.0...v0.3.1

v0.3.0

14 Feb 13:18
Compare
Choose a tag to compare

What's Changed

  • Match DeferredRender in performance by @stephannv in #3

    ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
    Warming up --------------------------------------
                Deferred    26.779k i/100ms
          Slotable 0.2.0     21.636k i/100ms
          Slotable 0.3.0    27.013k i/100ms
    Calculating -------------------------------------
                Deferred    267.884k (± 0.6%) i/s -      1.366M in   5.098391s
          Slotable 0.2.0    216.193k (± 0.4%) i/s -      1.082M in   5.003961s
          Slotable 0.3.0    270.082k (± 0.5%) i/s -      1.351M in   5.001001s
    
  • Allow polymorphic slots by @stephannv in #4

    class CardComponent < Phlex::HTML
      include Phlex::Slotable
    
      slot :avatar, types: { icon: IconComponent, image: ImageComponent }
    
      def template
        if avatar_slot?
          render avatar_slot
        end
      end
    end
    
    render CardComponent.new do |card|
      if user
        card.with_image_avatar(src: user.image_url)
      else
        card.with_icon_avatar(name: :user)
      end
    end

Full Changelog: v0.2.0...v0.3.0

v0.2.0

13 Feb 15:07
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.1.0...v0.2.0