Skip to content

Commit

Permalink
Upgrade to Phlex 2 (#128)
Browse files Browse the repository at this point in the history
* Upgrade Phlex

* Fix some things to work with ruby_ui main branch
  • Loading branch information
stephannv authored Nov 8, 2024
1 parent 2b9f095 commit b25734f
Show file tree
Hide file tree
Showing 26 changed files with 528 additions and 1,415 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@

/node_modules

.env*
.env*

.tool-versions

config/credentials/production.key

# Yarn
yarn-error.log
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.3.4
3.3.5
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "3.3.4"
ruby "3.3.5"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "7.2.0"
Expand Down Expand Up @@ -73,7 +73,8 @@ group :test do
gem "selenium-webdriver"
end

gem "phlex-rails"
gem "phlex", github: "phlex-ruby/phlex"
gem "phlex-rails", github: "phlex-ruby/phlex-rails"

gem "ruby_ui", github: "ruby-ui/ruby_ui", branch: "main"
# gem "ruby_ui", path: "../ruby_ui"
Expand Down
152 changes: 78 additions & 74 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
GIT
remote: https://github.com/phlex-ruby/phlex-rails.git
revision: 80388e7c1a5ba53f11e8de45eeb250bb99bc9060
specs:
phlex-rails (2.0.0.beta2)
phlex (= 2.0.0.beta2)
railties (>= 6.1, < 9)

GIT
remote: https://github.com/phlex-ruby/phlex.git
revision: f02859abaf1397d4df37c23b12646d47a55e5b46
specs:
phlex (2.0.0.beta2)

GIT
remote: https://github.com/ruby-ui/ruby_ui.git
revision: 5519a5f06e104c55141ff698e391befb7b61469f
revision: 6fb08c975c3f9f162fb3f510f5b42372dfeb9fc7
branch: main
specs:
ruby_ui (1.0.0.pre.alpha.4)
phlex (>= 1.10, < 3)
phlex (>= 2.0.0.beta2)
rouge (~> 4.2.0)
tailwind_merge (~> 0.12)

Expand Down Expand Up @@ -87,7 +101,7 @@ GEM
base64 (0.2.0)
bigdecimal (3.1.8)
bindex (0.8.1)
bootsnap (1.18.3)
bootsnap (1.18.4)
msgpack (~> 1.2)
builder (3.3.0)
capybara (3.40.0)
Expand All @@ -100,38 +114,38 @@ GEM
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
coderay (1.1.3)
concurrent-ruby (1.3.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
css_parser (1.17.1)
css_parser (1.19.1)
addressable
cssbundling-rails (1.4.0)
railties (>= 6.0.0)
date (3.3.4)
date (3.4.0)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
dockerfile-rails (1.6.17)
dockerfile-rails (1.6.24)
rails (>= 3.0.0)
drb (2.2.1)
erubi (1.13.0)
globalid (1.2.1)
activesupport (>= 6.1)
htmlbeautifier (1.4.3)
htmlentities (4.3.4)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
io-console (0.7.2)
irb (1.14.0)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
jsbundling-rails (1.3.0)
railties (>= 6.0.0)
json (2.7.2)
json (2.8.1)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
logger (1.6.0)
loofah (2.22.0)
logger (1.6.1)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
lookbook (2.3.2)
Expand All @@ -158,9 +172,9 @@ GEM
matrix (0.4.2)
method_source (1.1.0)
mini_mime (1.1.5)
minitest (5.24.1)
msgpack (1.7.2)
net-imap (0.4.14)
minitest (5.25.1)
msgpack (1.7.3)
net-imap (0.5.0)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -169,28 +183,23 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.7.3)
nokogiri (1.16.6-aarch64-linux)
nio4r (2.7.4)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.6-arm-linux)
nokogiri (1.16.7-arm-linux)
racc (~> 1.4)
nokogiri (1.16.6-arm64-darwin)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86-linux)
nokogiri (1.16.7-x86-linux)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-darwin)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-linux)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
parallel (1.25.1)
parser (3.3.4.0)
parallel (1.26.3)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
phlex (1.11.0)
phlex-rails (1.1.1)
phlex (~> 1.9)
railties (>= 6.1, < 8)
zeitwerk (~> 2.6)
propshaft (0.9.0)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
Expand All @@ -199,20 +208,19 @@ GEM
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.1.2)
psych (5.2.0)
stringio
public_suffix (6.0.1)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.8.0)
rack (3.1.7)
racc (1.8.1)
rack (3.1.8)
rack-session (2.0.0)
rack (>= 3.0.0)
rack-test (2.1.0)
rack (>= 1.3)
rackup (2.1.0)
rackup (2.2.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.2.0)
actioncable (= 7.2.0)
actionmailbox (= 7.2.0)
Expand Down Expand Up @@ -248,96 +256,91 @@ GEM
psych (>= 4.0.0)
redcarpet (3.6.0)
regexp_parser (2.9.2)
reline (0.5.9)
reline (0.5.11)
io-console (~> 0.5)
rexml (3.3.2)
strscan
rexml (3.3.9)
rouge (4.2.1)
rubocop (1.64.1)
rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
rubocop-ast (1.34.1)
parser (>= 3.3.1.0)
rubocop-performance (1.21.1)
rubocop-performance (1.22.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
rubyzip (2.3.2)
securerandom (0.3.1)
selenium-webdriver (4.23.0)
selenium-webdriver (4.26.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
sqlite3 (2.0.2-aarch64-linux-gnu)
sqlite3 (2.0.2-arm-linux-gnu)
sqlite3 (2.0.2-arm64-darwin)
sqlite3 (2.0.2-x86-linux-gnu)
sqlite3 (2.0.2-x86_64-darwin)
sqlite3 (2.0.2-x86_64-linux-gnu)
standard (1.39.2)
sqlite3 (2.2.0-aarch64-linux-gnu)
sqlite3 (2.2.0-aarch64-linux-musl)
sqlite3 (2.2.0-arm-linux-gnu)
sqlite3 (2.2.0-arm-linux-musl)
sqlite3 (2.2.0-arm64-darwin)
sqlite3 (2.2.0-x86-linux-gnu)
sqlite3 (2.2.0-x86-linux-musl)
sqlite3 (2.2.0-x86_64-darwin)
sqlite3 (2.2.0-x86_64-linux-gnu)
sqlite3 (2.2.0-x86_64-linux-musl)
standard (1.41.1)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.64.0)
rubocop (~> 1.66.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.4)
standard-performance (~> 1.5)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.4.0)
standard-performance (1.5.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.21.0)
rubocop-performance (~> 1.22.0)
stimulus-rails (1.3.3)
railties (>= 6.0.0)
stringio (3.1.1)
strscan (3.1.0)
stringio (3.1.2)
tailwind_merge (0.13.2)
lru_redux (~> 1.1)
thor (1.3.1)
timeout (0.4.1)
thor (1.3.2)
timeout (0.4.2)
turbo-rails (2.0.6)
actionpack (>= 6.0.0)
activejob (>= 6.0.0)
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
useragent (0.16.10)
view_component (3.13.0)
activesupport (>= 5.2.0, < 8.0)
view_component (3.20.0)
activesupport (>= 5.2.0, < 8.1)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webrick (1.8.1)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.36)
zeitwerk (2.6.16)
yard (0.9.37)
zeitwerk (2.7.1)

PLATFORMS
aarch64-linux
arm-linux
arm64-darwin
x86-linux
x86_64-darwin
x86_64-linux
ruby

DEPENDENCIES
bootsnap
Expand All @@ -348,7 +351,8 @@ DEPENDENCIES
jsbundling-rails (= 1.3.0)
lookbook (= 2.3.2)
lucide-rails (= 0.4.0)
phlex-rails
phlex!
phlex-rails!
propshaft (= 0.9.0)
pry
puma (= 6.4.2)
Expand All @@ -363,7 +367,7 @@ DEPENDENCIES
web-console

RUBY VERSION
ruby 3.3.4p94
ruby 3.3.5p100

BUNDLED WITH
2.3.25
2.5.22
9 changes: 3 additions & 6 deletions app/components/typography_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,12 @@ def list(**attrs, &)

def numbered? = @numbered

def not_numbered? = !numbered?

def default_attrs
{
class: tokens(
class: [
"my-6 ml-6 [&>li]:mt-2 [&>li]:pl-2",
numbered?: "list-decimal marker:font-medium",
not_numbered?: "list-disc"
)
(numbered? ? "list-decimal marker:font-medium" : "list-disc")
]
}
end
end
Loading

0 comments on commit b25734f

Please sign in to comment.