katalyst-kpop 4.0.1 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4fd1aee213d132edf3577efecbc1f3e9503753a545af8cf734235f0d9992ea0
4
- data.tar.gz: 92507a2dbf8bd77f5a075687f944acb4dfab278a8e767905ee1303e5ac73d409
3
+ metadata.gz: 7b52223cc34ea1c689d99fbd7b71a9fce58abcaba9a4c59caa3bac5c1e25b7d8
4
+ data.tar.gz: 97d2de9405f958ae6ddbadf97d45ce3a327021f58935fae45c5d7423198870ff
5
5
  SHA512:
6
- metadata.gz: 916cef4ba176e3ac8ccbadca46011fc238029f767ea6d5d52d4961fd9453c1a36d6079ced7b2975a76e97acbde5920e06d084d3c211d12f2eca204682a5959c3
7
- data.tar.gz: 81d567cf5ef19ea49e7b28d018fc2c57438c472c643af40df7961f4c83ddc4439ebbbe3e9ef76864fd33fb524cf7320964d08de70c24083d8ca1bb5d1b367136
6
+ metadata.gz: 3fe5bc8948c6cd701b8b210b2585c86babd04c2b509b72d35ca91d3572077cd702ed23f0fd7feb2e64d4454550f493f4b64dfbe2d563ff46e4209823f5e7b6d9
7
+ data.tar.gz: c95c72325bf1fcdf02b1742106da7197c5dc109d68e23ff10c7a94a4dda053d718223300afcc1d2c7aebbbaf74fa5b4185192985067041cd56905ea52aef2b82
@@ -13,6 +13,8 @@ module Katalyst
13
13
  module FrameRequest
14
14
  extend ActiveSupport::Concern
15
15
 
16
+ SUPPORTED_LOCATION_MAX_LENGTH = 1024
17
+
16
18
  class_methods do
17
19
  # Sets the expectation that these actions will be wrapped in a modal.
18
20
  # Adds custom layouts, rendering, and redirect behaviours to make this
@@ -62,7 +64,11 @@ module Katalyst
62
64
 
63
65
  return if !request.get? || turbo_frame_request? || kpop_stream_request? || hotwire_native_app?
64
66
 
65
- redirect_back_or_to(kpop_fallback_location, status: :see_other, modal_location: request.fullpath)
67
+ kpop_redirect_options = { status: :see_other }.tap do |options|
68
+ options[:modal_location] = request.fullpath if request.fullpath.bytesize <= SUPPORTED_LOCATION_MAX_LENGTH
69
+ end
70
+
71
+ redirect_back_or_to(kpop_fallback_location, **kpop_redirect_options)
66
72
  end
67
73
 
68
74
  def render(...)
@@ -15,7 +15,7 @@ module Katalyst
15
15
  end
16
16
 
17
17
  def <<(matcher)
18
- matcher = matcher.new if matcher.is_a?(Class)
18
+ matcher = matcher.new if matcher.is_a?(Class)
19
19
  (@matchers ||= []) << matcher
20
20
  self
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katalyst-kpop
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katalyst Interactive
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
- rubygems_version: 4.0.3
119
+ rubygems_version: 4.0.10
120
120
  specification_version: 4
121
121
  summary: Modal library that uses Turbo and Stimulus.
122
122
  test_files: []