Skip to content

Commit bbabb86

Browse files
authored
Remove Lookbook (#131)
1 parent eaf944c commit bbabb86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+0
-1301
lines changed

Gemfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ gem "stimulus-rails", "1.3.3"
2020
# Bundle and process CSS [https://github.com/rails/cssbundling-rails]
2121
gem "cssbundling-rails", "1.4.0"
2222

23-
gem "lookbook", "2.3.2"
24-
2523
gem "lucide-rails", "0.4.0"
2624

2725
# gem "jbuilder"

Gemfile.lock

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ GEM
117117
concurrent-ruby (1.3.4)
118118
connection_pool (2.4.1)
119119
crass (1.0.6)
120-
css_parser (1.19.1)
121-
addressable
122120
cssbundling-rails (1.4.0)
123121
railties (>= 6.0.0)
124122
date (3.4.0)
@@ -131,8 +129,6 @@ GEM
131129
erubi (1.13.0)
132130
globalid (1.2.1)
133131
activesupport (>= 6.1)
134-
htmlbeautifier (1.4.3)
135-
htmlentities (4.3.4)
136132
i18n (1.14.6)
137133
concurrent-ruby (~> 1.0)
138134
io-console (0.7.2)
@@ -148,18 +144,6 @@ GEM
148144
loofah (2.23.1)
149145
crass (~> 1.0.2)
150146
nokogiri (>= 1.12.0)
151-
lookbook (2.3.2)
152-
activemodel
153-
css_parser
154-
htmlbeautifier (~> 1.3)
155-
htmlentities (~> 4.3.4)
156-
marcel (~> 1.0)
157-
railties (>= 5.0)
158-
redcarpet (~> 3.5)
159-
rouge (>= 3.26, < 5.0)
160-
view_component (>= 2.0)
161-
yard (~> 0.9)
162-
zeitwerk (~> 2.5)
163147
lru_redux (1.1.0)
164148
lucide-rails (0.4.0)
165149
railties (>= 4.1.0)
@@ -246,7 +230,6 @@ GEM
246230
rake (13.2.1)
247231
rdoc (6.7.0)
248232
psych (>= 4.0.0)
249-
redcarpet (3.6.0)
250233
regexp_parser (2.9.2)
251234
reline (0.5.11)
252235
io-console (~> 0.5)
@@ -305,10 +288,6 @@ GEM
305288
concurrent-ruby (~> 1.0)
306289
unicode-display_width (2.6.0)
307290
useragent (0.16.10)
308-
view_component (3.20.0)
309-
activesupport (>= 5.2.0, < 8.1)
310-
concurrent-ruby (~> 1.0)
311-
method_source (~> 1.0)
312291
web-console (4.2.1)
313292
actionview (>= 6.0.0)
314293
activemodel (>= 6.0.0)
@@ -320,7 +299,6 @@ GEM
320299
websocket-extensions (0.1.5)
321300
xpath (3.2.0)
322301
nokogiri (~> 1.8)
323-
yard (0.9.37)
324302
zeitwerk (2.7.1)
325303

326304
PLATFORMS
@@ -333,7 +311,6 @@ DEPENDENCIES
333311
debug
334312
dockerfile-rails (>= 1.6)
335313
jsbundling-rails (= 1.3.0)
336-
lookbook (= 2.3.2)
337314
lucide-rails (= 0.4.0)
338315
phlex!
339316
phlex-rails!

app/views/components/shared/navbar.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ def view_template
1111
Link(href: helpers.docs_introduction_path, variant: :ghost, class: "hidden md:inline-block") { "Docs" }
1212
Link(href: helpers.docs_accordion_path, variant: :ghost, class: "hidden md:inline-block") { "Components" }
1313
Link(href: helpers.theme_path("default"), variant: :ghost, class: "hidden md:inline-block") { "Themes" }
14-
Link(href: helpers.lookbook_path("default"), target: "_blank", variant: :ghost, class: "hidden md:inline-block") { "Lookbook" }
1514
end
1615
div(class: "flex items-center gap-x-2 md:divide-x") do
1716
div(class: "flex items-center") do

app/views/layouts/component_preview.html.erb

Lines changed: 0 additions & 18 deletions
This file was deleted.

config/application.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ class Application < Rails::Application
2929
# config.time_zone = "Central Time (US & Canada)"
3030
# config.eager_load_paths << Rails.root.join("extras")
3131

32-
# lookbook configuration
33-
config.lookbook.project_name = "Phlex Components"
34-
config.lookbook.preview_layout = "component_preview"
35-
3632
config.exceptions_app = routes # redirects all exceptions to custom error pages (See routes)
3733
end
3834
end

config/initializers/lookbook.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
11
# frozen_string_literal: true
2-
3-
# lookbook workaround for phlex components
4-
if defined?(Lookbook)
5-
module Lookbook::PreviewOverrides
6-
# see https://github.com/ViewComponent/lookbook/issues/584
7-
def render(component = nil, **args, &block)
8-
if block
9-
super { component.instance_exec component, &block }
10-
else
11-
super
12-
end
13-
end
14-
end
15-
16-
Rails.application.configure { Lookbook::Preview.prepend Lookbook::PreviewOverrides }
17-
end

config/routes.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Rails.application.routes.draw do
22
get "themes/:theme", to: "themes#show", as: :theme
33

4-
mount Lookbook::Engine, at: "/lookbook"
5-
64
scope "docs" do
75
# GETTING STARTED
86
get "introduction", to: "docs#introduction", as: :docs_introduction

test/components/previews/rbui/accordion_preview.rb

Lines changed: 0 additions & 36 deletions
This file was deleted.

test/components/previews/rbui/alert_dialog_preview.rb

Lines changed: 0 additions & 29 deletions
This file was deleted.

test/components/previews/rbui/alert_preview.rb

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)