Skip to content

Commit

Permalink
fix: unuse view_component
Browse files Browse the repository at this point in the history
  • Loading branch information
jacky-le-goldenowl committed Oct 31, 2024
1 parent 4161577 commit 2453474
Show file tree
Hide file tree
Showing 55 changed files with 23 additions and 738 deletions.
5 changes: 0 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ gem 'faker'

# Front-end
gem 'slim-rails', '~> 3.6', '>= 3.6.3'
gem 'dry-initializer', '~> 3.1'
gem 'dry-types', '~> 1.7', '>= 1.7.2'
gem 'view_component', '~> 3.17'
gem 'view_component-contrib', '~> 0.2.3'
gem 'simple_form'

# Pagination
Expand All @@ -63,7 +59,6 @@ group :development do
gem 'bundler-audit', require: false
gem 'lefthook'
gem 'letter_opener'
gem 'lookbook'
gem 'pgcli-rails'
gem 'rubocop', require: false
gem 'rubocop-factory_bot', require: false
Expand Down
49 changes: 0 additions & 49 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ GEM
bigdecimal
rexml
crass (1.0.6)
css_parser (1.19.1)
addressable
date (3.3.4)
debug (1.9.2)
irb (~> 1.10)
Expand All @@ -131,22 +129,6 @@ GEM
dotenv (3.1.4)
drb (2.2.1)
dry-cli (1.2.0)
dry-core (1.0.1)
concurrent-ruby (~> 1.0)
zeitwerk (~> 2.6)
dry-inflector (1.1.0)
dry-initializer (3.1.1)
dry-logic (1.5.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0, < 2)
zeitwerk (~> 2.6)
dry-types (1.7.2)
bigdecimal (~> 3.0)
concurrent-ruby (~> 1.0)
dry-core (~> 1.0)
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
enumerize (2.8.1)
activesupport (>= 3.2)
erubi (1.13.0)
Expand Down Expand Up @@ -185,8 +167,6 @@ GEM
railties (>= 3.1)
hashdiff (1.1.1)
hashie (5.0.0)
htmlbeautifier (1.4.3)
htmlentities (4.3.4)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
image_processing (1.13.0)
Expand All @@ -210,26 +190,13 @@ GEM
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
lookbook (2.3.2)
activemodel
css_parser
htmlbeautifier (~> 1.3)
htmlentities (~> 4.3.4)
marcel (~> 1.0)
railties (>= 5.0)
redcarpet (~> 3.5)
rouge (>= 3.26, < 5.0)
view_component (>= 2.0)
yard (~> 0.9)
zeitwerk (~> 2.5)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
marcel (1.0.4)
matrix (0.4.2)
method_source (1.1.0)
mini_magick (4.13.2)
mini_mime (1.1.5)
minitest (5.25.1)
Expand Down Expand Up @@ -355,7 +322,6 @@ GEM
logger
rdoc (6.7.0)
psych (>= 4.0.0)
redcarpet (3.6.0)
redis (5.3.0)
redis-client (>= 0.22.0)
redis-client (0.22.2)
Expand All @@ -368,7 +334,6 @@ GEM
railties (>= 5.2)
rexml (3.3.8)
rolify (6.0.1)
rouge (4.4.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
Expand Down Expand Up @@ -415,7 +380,6 @@ GEM
sorbet-runtime (>= 0.5.10782)
ruby-lsp-rails (0.3.20)
ruby-lsp (>= 0.20.0, < 0.21.0)
ruby-next-core (1.0.3)
ruby-progressbar (1.13.0)
ruby-vips (2.2.2)
ffi (~> 1.12)
Expand Down Expand Up @@ -487,13 +451,6 @@ GEM
vcr (6.3.1)
base64
version_gem (1.1.4)
view_component (3.17.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
view_component-contrib (0.2.3)
ruby-next-core (>= 0.15.0)
view_component
vite_rails (3.0.17)
railties (>= 5.1, < 8)
vite_ruby (~> 3.0, >= 3.2.2)
Expand All @@ -519,7 +476,6 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.37)
zeitwerk (2.7.0)

PLATFORMS
Expand Down Expand Up @@ -549,16 +505,13 @@ DEPENDENCIES
debug
devise
dotenv (>= 3.0)
dry-initializer (~> 3.1)
dry-types (~> 1.7, >= 1.7.2)
enumerize
factory_bot_rails
faker
good_migrations
image_processing
lefthook
letter_opener
lookbook
omniauth-google-oauth2
omniauth-rails_csrf_protection
pagy
Expand Down Expand Up @@ -593,8 +546,6 @@ DEPENDENCIES
turbo-rails
tzinfo-data
vcr
view_component (~> 3.17)
view_component-contrib (~> 0.2.3)
vite_rails (~> 3.0)
web-console
webmock
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ To setup a development environment (MacOS):
### FE references

- DaisyUI: <https://daisyui.com/components/>
- Flowbite: <https://flowbite.com/#components>
- For icons: lucide icon packages: <https://lucide.dev/icons/>
- View_component (`TODO`): It is only in `beta` version, we advise you to avoid using it. With components from view_component, we can view them at <http://localhost:3000/lookbook>

### Rspec

Expand Down
1 change: 1 addition & 0 deletions app/controllers/authentication/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class SessionsController < Devise::SessionsController

def after_sign_in_path_for(resource)
return admin_root_path if resource.admin?
return employee_root_path if resource.employee?

stored_location_for(resource) || root_path
end
Expand Down
5 changes: 4 additions & 1 deletion app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# frozen_string_literal: true

class HomeController < ApplicationController
def index; end
layout 'application'
def index
# debugger
end
end
36 changes: 0 additions & 36 deletions app/frontend/components/alert/component.rb

This file was deleted.

16 changes: 0 additions & 16 deletions app/frontend/components/alert/preview.rb

This file was deleted.

51 changes: 0 additions & 51 deletions app/frontend/components/application_view_component.rb

This file was deleted.

10 changes: 0 additions & 10 deletions app/frontend/components/application_view_component_preview.rb

This file was deleted.

7 changes: 0 additions & 7 deletions app/frontend/components/button/component.html.slim

This file was deleted.

78 changes: 0 additions & 78 deletions app/frontend/components/button/component.rb

This file was deleted.

Loading

0 comments on commit 2453474

Please sign in to comment.