Skip to content

Commit b25734f

Browse files
authored
Upgrade to Phlex 2 (#128)
* Upgrade Phlex * Fix some things to work with ruby_ui main branch
1 parent 2b9f095 commit b25734f

26 files changed

+528
-1415
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535

3636
/node_modules
3737

38-
.env*
38+
.env*
3939

4040
.tool-versions
4141

4242
config/credentials/production.key
43+
44+
# Yarn
45+
yarn-error.log

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.3.4
1+
3.3.5

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
source "https://rubygems.org"
22
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

4-
ruby "3.3.4"
4+
ruby "3.3.5"
55

66
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
77
gem "rails", "7.2.0"
@@ -73,7 +73,8 @@ group :test do
7373
gem "selenium-webdriver"
7474
end
7575

76-
gem "phlex-rails"
76+
gem "phlex", github: "phlex-ruby/phlex"
77+
gem "phlex-rails", github: "phlex-ruby/phlex-rails"
7778

7879
gem "ruby_ui", github: "ruby-ui/ruby_ui", branch: "main"
7980
# gem "ruby_ui", path: "../ruby_ui"

Gemfile.lock

Lines changed: 78 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
1+
GIT
2+
remote: https://github.com/phlex-ruby/phlex-rails.git
3+
revision: 80388e7c1a5ba53f11e8de45eeb250bb99bc9060
4+
specs:
5+
phlex-rails (2.0.0.beta2)
6+
phlex (= 2.0.0.beta2)
7+
railties (>= 6.1, < 9)
8+
9+
GIT
10+
remote: https://github.com/phlex-ruby/phlex.git
11+
revision: f02859abaf1397d4df37c23b12646d47a55e5b46
12+
specs:
13+
phlex (2.0.0.beta2)
14+
115
GIT
216
remote: https://github.com/ruby-ui/ruby_ui.git
3-
revision: 5519a5f06e104c55141ff698e391befb7b61469f
17+
revision: 6fb08c975c3f9f162fb3f510f5b42372dfeb9fc7
418
branch: main
519
specs:
620
ruby_ui (1.0.0.pre.alpha.4)
7-
phlex (>= 1.10, < 3)
21+
phlex (>= 2.0.0.beta2)
822
rouge (~> 4.2.0)
923
tailwind_merge (~> 0.12)
1024

@@ -87,7 +101,7 @@ GEM
87101
base64 (0.2.0)
88102
bigdecimal (3.1.8)
89103
bindex (0.8.1)
90-
bootsnap (1.18.3)
104+
bootsnap (1.18.4)
91105
msgpack (~> 1.2)
92106
builder (3.3.0)
93107
capybara (3.40.0)
@@ -100,38 +114,38 @@ GEM
100114
regexp_parser (>= 1.5, < 3.0)
101115
xpath (~> 3.2)
102116
coderay (1.1.3)
103-
concurrent-ruby (1.3.3)
117+
concurrent-ruby (1.3.4)
104118
connection_pool (2.4.1)
105119
crass (1.0.6)
106-
css_parser (1.17.1)
120+
css_parser (1.19.1)
107121
addressable
108122
cssbundling-rails (1.4.0)
109123
railties (>= 6.0.0)
110-
date (3.3.4)
124+
date (3.4.0)
111125
debug (1.9.2)
112126
irb (~> 1.10)
113127
reline (>= 0.3.8)
114-
dockerfile-rails (1.6.17)
128+
dockerfile-rails (1.6.24)
115129
rails (>= 3.0.0)
116130
drb (2.2.1)
117131
erubi (1.13.0)
118132
globalid (1.2.1)
119133
activesupport (>= 6.1)
120134
htmlbeautifier (1.4.3)
121135
htmlentities (4.3.4)
122-
i18n (1.14.5)
136+
i18n (1.14.6)
123137
concurrent-ruby (~> 1.0)
124138
io-console (0.7.2)
125-
irb (1.14.0)
139+
irb (1.14.1)
126140
rdoc (>= 4.0.0)
127141
reline (>= 0.4.2)
128142
jsbundling-rails (1.3.0)
129143
railties (>= 6.0.0)
130-
json (2.7.2)
144+
json (2.8.1)
131145
language_server-protocol (3.17.0.3)
132146
lint_roller (1.1.0)
133-
logger (1.6.0)
134-
loofah (2.22.0)
147+
logger (1.6.1)
148+
loofah (2.23.1)
135149
crass (~> 1.0.2)
136150
nokogiri (>= 1.12.0)
137151
lookbook (2.3.2)
@@ -158,9 +172,9 @@ GEM
158172
matrix (0.4.2)
159173
method_source (1.1.0)
160174
mini_mime (1.1.5)
161-
minitest (5.24.1)
162-
msgpack (1.7.2)
163-
net-imap (0.4.14)
175+
minitest (5.25.1)
176+
msgpack (1.7.3)
177+
net-imap (0.5.0)
164178
date
165179
net-protocol
166180
net-pop (0.1.2)
@@ -169,28 +183,23 @@ GEM
169183
timeout
170184
net-smtp (0.5.0)
171185
net-protocol
172-
nio4r (2.7.3)
173-
nokogiri (1.16.6-aarch64-linux)
186+
nio4r (2.7.4)
187+
nokogiri (1.16.7-aarch64-linux)
174188
racc (~> 1.4)
175-
nokogiri (1.16.6-arm-linux)
189+
nokogiri (1.16.7-arm-linux)
176190
racc (~> 1.4)
177-
nokogiri (1.16.6-arm64-darwin)
191+
nokogiri (1.16.7-arm64-darwin)
178192
racc (~> 1.4)
179-
nokogiri (1.16.6-x86-linux)
193+
nokogiri (1.16.7-x86-linux)
180194
racc (~> 1.4)
181-
nokogiri (1.16.6-x86_64-darwin)
195+
nokogiri (1.16.7-x86_64-darwin)
182196
racc (~> 1.4)
183-
nokogiri (1.16.6-x86_64-linux)
197+
nokogiri (1.16.7-x86_64-linux)
184198
racc (~> 1.4)
185-
parallel (1.25.1)
186-
parser (3.3.4.0)
199+
parallel (1.26.3)
200+
parser (3.3.6.0)
187201
ast (~> 2.4.1)
188202
racc
189-
phlex (1.11.0)
190-
phlex-rails (1.1.1)
191-
phlex (~> 1.9)
192-
railties (>= 6.1, < 8)
193-
zeitwerk (~> 2.6)
194203
propshaft (0.9.0)
195204
actionpack (>= 7.0.0)
196205
activesupport (>= 7.0.0)
@@ -199,20 +208,19 @@ GEM
199208
pry (0.14.2)
200209
coderay (~> 1.1)
201210
method_source (~> 1.0)
202-
psych (5.1.2)
211+
psych (5.2.0)
203212
stringio
204213
public_suffix (6.0.1)
205214
puma (6.4.2)
206215
nio4r (~> 2.0)
207-
racc (1.8.0)
208-
rack (3.1.7)
216+
racc (1.8.1)
217+
rack (3.1.8)
209218
rack-session (2.0.0)
210219
rack (>= 3.0.0)
211220
rack-test (2.1.0)
212221
rack (>= 1.3)
213-
rackup (2.1.0)
222+
rackup (2.2.0)
214223
rack (>= 3)
215-
webrick (~> 1.8)
216224
rails (7.2.0)
217225
actioncable (= 7.2.0)
218226
actionmailbox (= 7.2.0)
@@ -248,96 +256,91 @@ GEM
248256
psych (>= 4.0.0)
249257
redcarpet (3.6.0)
250258
regexp_parser (2.9.2)
251-
reline (0.5.9)
259+
reline (0.5.11)
252260
io-console (~> 0.5)
253-
rexml (3.3.2)
254-
strscan
261+
rexml (3.3.9)
255262
rouge (4.2.1)
256-
rubocop (1.64.1)
263+
rubocop (1.66.1)
257264
json (~> 2.3)
258265
language_server-protocol (>= 3.17.0)
259266
parallel (~> 1.10)
260267
parser (>= 3.3.0.2)
261268
rainbow (>= 2.2.2, < 4.0)
262-
regexp_parser (>= 1.8, < 3.0)
263-
rexml (>= 3.2.5, < 4.0)
264-
rubocop-ast (>= 1.31.1, < 2.0)
269+
regexp_parser (>= 2.4, < 3.0)
270+
rubocop-ast (>= 1.32.2, < 2.0)
265271
ruby-progressbar (~> 1.7)
266272
unicode-display_width (>= 2.4.0, < 3.0)
267-
rubocop-ast (1.31.3)
273+
rubocop-ast (1.34.1)
268274
parser (>= 3.3.1.0)
269-
rubocop-performance (1.21.1)
275+
rubocop-performance (1.22.1)
270276
rubocop (>= 1.48.1, < 2.0)
271277
rubocop-ast (>= 1.31.1, < 2.0)
272278
ruby-progressbar (1.13.0)
273279
rubyzip (2.3.2)
274280
securerandom (0.3.1)
275-
selenium-webdriver (4.23.0)
281+
selenium-webdriver (4.26.0)
276282
base64 (~> 0.2)
277283
logger (~> 1.4)
278284
rexml (~> 3.2, >= 3.2.5)
279285
rubyzip (>= 1.2.2, < 3.0)
280286
websocket (~> 1.0)
281-
sqlite3 (2.0.2-aarch64-linux-gnu)
282-
sqlite3 (2.0.2-arm-linux-gnu)
283-
sqlite3 (2.0.2-arm64-darwin)
284-
sqlite3 (2.0.2-x86-linux-gnu)
285-
sqlite3 (2.0.2-x86_64-darwin)
286-
sqlite3 (2.0.2-x86_64-linux-gnu)
287-
standard (1.39.2)
287+
sqlite3 (2.2.0-aarch64-linux-gnu)
288+
sqlite3 (2.2.0-aarch64-linux-musl)
289+
sqlite3 (2.2.0-arm-linux-gnu)
290+
sqlite3 (2.2.0-arm-linux-musl)
291+
sqlite3 (2.2.0-arm64-darwin)
292+
sqlite3 (2.2.0-x86-linux-gnu)
293+
sqlite3 (2.2.0-x86-linux-musl)
294+
sqlite3 (2.2.0-x86_64-darwin)
295+
sqlite3 (2.2.0-x86_64-linux-gnu)
296+
sqlite3 (2.2.0-x86_64-linux-musl)
297+
standard (1.41.1)
288298
language_server-protocol (~> 3.17.0.2)
289299
lint_roller (~> 1.0)
290-
rubocop (~> 1.64.0)
300+
rubocop (~> 1.66.0)
291301
standard-custom (~> 1.0.0)
292-
standard-performance (~> 1.4)
302+
standard-performance (~> 1.5)
293303
standard-custom (1.0.2)
294304
lint_roller (~> 1.0)
295305
rubocop (~> 1.50)
296-
standard-performance (1.4.0)
306+
standard-performance (1.5.0)
297307
lint_roller (~> 1.1)
298-
rubocop-performance (~> 1.21.0)
308+
rubocop-performance (~> 1.22.0)
299309
stimulus-rails (1.3.3)
300310
railties (>= 6.0.0)
301-
stringio (3.1.1)
302-
strscan (3.1.0)
311+
stringio (3.1.2)
303312
tailwind_merge (0.13.2)
304313
lru_redux (~> 1.1)
305-
thor (1.3.1)
306-
timeout (0.4.1)
314+
thor (1.3.2)
315+
timeout (0.4.2)
307316
turbo-rails (2.0.6)
308317
actionpack (>= 6.0.0)
309318
activejob (>= 6.0.0)
310319
railties (>= 6.0.0)
311320
tzinfo (2.0.6)
312321
concurrent-ruby (~> 1.0)
313-
unicode-display_width (2.5.0)
322+
unicode-display_width (2.6.0)
314323
useragent (0.16.10)
315-
view_component (3.13.0)
316-
activesupport (>= 5.2.0, < 8.0)
324+
view_component (3.20.0)
325+
activesupport (>= 5.2.0, < 8.1)
317326
concurrent-ruby (~> 1.0)
318327
method_source (~> 1.0)
319328
web-console (4.2.1)
320329
actionview (>= 6.0.0)
321330
activemodel (>= 6.0.0)
322331
bindex (>= 0.4.0)
323332
railties (>= 6.0.0)
324-
webrick (1.8.1)
325333
websocket (1.2.11)
326334
websocket-driver (0.7.6)
327335
websocket-extensions (>= 0.1.0)
328336
websocket-extensions (0.1.5)
329337
xpath (3.2.0)
330338
nokogiri (~> 1.8)
331-
yard (0.9.36)
332-
zeitwerk (2.6.16)
339+
yard (0.9.37)
340+
zeitwerk (2.7.1)
333341

334342
PLATFORMS
335-
aarch64-linux
336-
arm-linux
337-
arm64-darwin
338-
x86-linux
339-
x86_64-darwin
340-
x86_64-linux
343+
ruby
341344

342345
DEPENDENCIES
343346
bootsnap
@@ -348,7 +351,8 @@ DEPENDENCIES
348351
jsbundling-rails (= 1.3.0)
349352
lookbook (= 2.3.2)
350353
lucide-rails (= 0.4.0)
351-
phlex-rails
354+
phlex!
355+
phlex-rails!
352356
propshaft (= 0.9.0)
353357
pry
354358
puma (= 6.4.2)
@@ -363,7 +367,7 @@ DEPENDENCIES
363367
web-console
364368

365369
RUBY VERSION
366-
ruby 3.3.4p94
370+
ruby 3.3.5p100
367371

368372
BUNDLED WITH
369-
2.3.25
373+
2.5.22

app/components/typography_list.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ def list(**attrs, &)
3131

3232
def numbered? = @numbered
3333

34-
def not_numbered? = !numbered?
35-
3634
def default_attrs
3735
{
38-
class: tokens(
36+
class: [
3937
"my-6 ml-6 [&>li]:mt-2 [&>li]:pl-2",
40-
numbered?: "list-decimal marker:font-medium",
41-
not_numbered?: "list-disc"
42-
)
38+
(numbered? ? "list-decimal marker:font-medium" : "list-disc")
39+
]
4340
}
4441
end
4542
end

0 commit comments

Comments
 (0)