From 3c8615b70dcdc9beace0833da6faee7c152415b1 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Sat, 2 Nov 2024 23:07:00 -0400 Subject: [PATCH] Migrate away from SASS Use the pages_controller, and some magic intercepting to make --- Gemfile | 8 +- Gemfile.lock | 32 +---- app/assets/config/manifest.js | 12 ++ .../components/share_case/share_case.html | 4 +- app/assets/stylesheets/_books.scss | 49 -------- app/assets/stylesheets/_cases.scss | 81 ------------ app/assets/stylesheets/_docs.scss | 24 ---- app/assets/stylesheets/_panes.scss | 38 ------ app/assets/stylesheets/_qscore.scss | 54 -------- app/assets/stylesheets/_scorers.scss | 62 ---------- app/assets/stylesheets/_search_endpoints.scss | 49 -------- app/assets/stylesheets/_settings.scss | 11 -- app/assets/stylesheets/_teams.scss | 84 ------------- app/assets/stylesheets/_tour.scss | 22 ---- app/assets/stylesheets/_users.scss | 58 --------- app/assets/stylesheets/admin.css.scss | 20 --- .../stylesheets/{_admin2.scss => admin2.css} | 7 +- app/assets/stylesheets/admin3.css | 12 ++ app/assets/stylesheets/admin_users.css.scss | 16 --- app/assets/stylesheets/application.css | 0 app/assets/stylesheets/application.css.scss | 55 --------- app/assets/stylesheets/application_bit.css | 10 ++ .../stylesheets/{_base.scss => base.css} | 0 app/assets/stylesheets/books.css | 38 ++++++ app/assets/stylesheets/cases.css | 64 ++++++++++ app/assets/stylesheets/core.css.scss | 58 --------- app/assets/stylesheets/docs.css | 20 +++ app/assets/stylesheets/fonts.css | 12 +- .../stylesheets/{_misc.scss => misc.css} | 74 ++++------- app/assets/stylesheets/panes.css | 34 ++++++ .../stylesheets/{_qgraph.scss => qgraph.css} | 115 ++++++++---------- app/assets/stylesheets/qscore.css | 46 +++++++ app/assets/stylesheets/scorers.css | 49 ++++++++ app/assets/stylesheets/search_endpoints.css | 38 ++++++ app/assets/stylesheets/settings.css | 10 ++ app/assets/stylesheets/teams.css | 64 ++++++++++ app/assets/stylesheets/tour.css | 17 +++ app/assets/stylesheets/users.css | 45 +++++++ app/views/layouts/_sidebar.html.erb | 6 +- app/views/layouts/admin.html.erb | 7 +- app/views/layouts/analytics.html.erb | 8 +- app/views/layouts/application.html.erb | 13 +- app/views/layouts/core.html.erb | 44 ++++++- config/application.rb | 2 +- package.json | 2 + yarn.lock | 17 +++ 46 files changed, 645 insertions(+), 846 deletions(-) delete mode 100644 app/assets/stylesheets/_books.scss delete mode 100644 app/assets/stylesheets/_cases.scss delete mode 100644 app/assets/stylesheets/_docs.scss delete mode 100644 app/assets/stylesheets/_panes.scss delete mode 100644 app/assets/stylesheets/_qscore.scss delete mode 100644 app/assets/stylesheets/_scorers.scss delete mode 100644 app/assets/stylesheets/_search_endpoints.scss delete mode 100644 app/assets/stylesheets/_settings.scss delete mode 100644 app/assets/stylesheets/_teams.scss delete mode 100644 app/assets/stylesheets/_tour.scss delete mode 100644 app/assets/stylesheets/_users.scss delete mode 100644 app/assets/stylesheets/admin.css.scss rename app/assets/stylesheets/{_admin2.scss => admin2.css} (57%) create mode 100644 app/assets/stylesheets/admin3.css delete mode 100644 app/assets/stylesheets/admin_users.css.scss create mode 100644 app/assets/stylesheets/application.css delete mode 100755 app/assets/stylesheets/application.css.scss create mode 100755 app/assets/stylesheets/application_bit.css rename app/assets/stylesheets/{_base.scss => base.css} (100%) create mode 100644 app/assets/stylesheets/books.css create mode 100644 app/assets/stylesheets/cases.css delete mode 100644 app/assets/stylesheets/core.css.scss create mode 100644 app/assets/stylesheets/docs.css rename app/assets/stylesheets/{_misc.scss => misc.css} (57%) create mode 100644 app/assets/stylesheets/panes.css rename app/assets/stylesheets/{_qgraph.scss => qgraph.css} (53%) create mode 100644 app/assets/stylesheets/qscore.css create mode 100644 app/assets/stylesheets/scorers.css create mode 100644 app/assets/stylesheets/search_endpoints.css create mode 100644 app/assets/stylesheets/settings.css create mode 100644 app/assets/stylesheets/teams.css create mode 100644 app/assets/stylesheets/tour.css create mode 100644 app/assets/stylesheets/users.css diff --git a/Gemfile b/Gemfile index 4c38024e..e564db43 100755 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,6 @@ gem 'active_storage_db' gem 'acts_as_list', '>= 1.0.1' gem 'addressable', '~> 2.8' gem 'ancestry' -gem 'angular-rails-templates', '>= 1.0.0.beta' gem 'apipie-rails', '~> 1.2' gem 'bcrypt', '~> 3.1.7' gem 'bootsnap', require: false @@ -20,9 +19,6 @@ gem 'd3-rails', '~> 3.5.5' # For cal heatmap gem 'devise', '>= 4.6.2' gem 'devise_invitable', '~> 2.0' -# Using this as it wires in via Sprockets and I can't get npm version to work with the main app. -# Had no luck with js/svg approach ;-( -gem 'font-awesome-sass' gem 'foreman' gem 'gabba' gem 'importmap-rails', '~> 2.0' @@ -49,9 +45,9 @@ gem 'rack-cors', '~> 2.0' gem 'rapidjson' gem 'responders' gem 'rubyzip', '~> 2.3.0' # 3.0 will be breaking -gem 'sassc-rails', '~> 2.1' gem 'solid_cable', '~> 3.0' gem 'solid_queue' + gem 'thor' gem 'turbo-rails', '~> 2.0', '>= 2.0.5' gem 'vega', '~> 0.3.0' @@ -94,3 +90,5 @@ group :test do gem 'capybara' gem 'selenium-webdriver' end + +gem "propshaft", "~> 1.1" diff --git a/Gemfile.lock b/Gemfile.lock index 6370c623..513f69b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -84,11 +84,6 @@ GEM aes_key_wrap (1.1.0) ancestry (4.3.3) activerecord (>= 5.2.6) - angular-rails-templates (1.2.2) - railties (>= 5.0, < 7.3) - sprockets (>= 3.0, < 5) - sprockets-rails - tilt annotate (3.2.0) activerecord (>= 3.2, < 8.0) rake (>= 10.4, < 14.0) @@ -184,8 +179,6 @@ GEM ffi (1.17.0-aarch64-linux-gnu) ffi (1.17.0-x86_64-darwin) ffi (1.17.0-x86_64-linux-gnu) - font-awesome-sass (6.5.2) - sassc (~> 2.0) foreman (0.88.1) fugit (1.11.1) et-orbi (~> 1, >= 1.2.11) @@ -337,6 +330,11 @@ GEM cmdstan (>= 0.2) numo-narray (>= 0.9.1.7) rover-df + propshaft (1.1.0) + actionpack (>= 7.0.0) + activesupport (>= 7.0.0) + rack + railties (>= 7.0.0) psych (5.1.2) stringio public_suffix (6.0.1) @@ -442,14 +440,6 @@ GEM ruby-statistics (4.0.1) ruby2_keywords (0.0.5) rubyzip (2.3.2) - sassc (2.4.0) - ffi (~> 1.9) - sassc-rails (2.1.2) - railties (>= 4.0.0) - sassc (>= 2.0) - sprockets (> 3.0) - sprockets-rails - tilt securerandom (0.3.1) selenium-webdriver (4.25.0) base64 (~> 0.2) @@ -478,18 +468,10 @@ GEM fugit (~> 1.11.0) railties (>= 7.1) thor (~> 1.3.1) - sprockets (4.2.1) - concurrent-ruby (~> 1.0) - rack (>= 2.2.4, < 4) - sprockets-rails (3.5.2) - actionpack (>= 6.1) - activesupport (>= 6.1) - sprockets (>= 3.0.0) stimulus-rails (1.3.4) railties (>= 6.0.0) stringio (3.1.1) thor (1.3.2) - tilt (2.4.0) timeout (0.4.1) turbo-rails (2.0.11) actionpack (>= 6.0.0) @@ -533,7 +515,6 @@ DEPENDENCIES acts_as_list (>= 1.0.1) addressable (~> 2.8) ancestry - angular-rails-templates (>= 1.0.0.beta) annotate apipie-rails (~> 1.2) bcrypt (~> 3.1.7) @@ -549,7 +530,6 @@ DEPENDENCIES devise (>= 4.6.2) devise_invitable (~> 2.0) error_highlight (>= 0.4.0) - font-awesome-sass foreman gabba importmap-rails (~> 2.0) @@ -571,6 +551,7 @@ DEPENDENCIES omniauth-rails_csrf_protection postmark-rails prophet-rb (~> 0.5.0) + propshaft (~> 1.1) puma pundit rack-cors (~> 2.0) @@ -585,7 +566,6 @@ DEPENDENCIES rubocop-capybara rubocop-rails rubyzip (~> 2.3.0) - sassc-rails (~> 2.1) selenium-webdriver simplecov solid_cable (~> 3.0) diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js index e8e88698..129e6638 100644 --- a/app/assets/config/manifest.js +++ b/app/assets/config/manifest.js @@ -2,4 +2,16 @@ //= link application.js //= link 'application.css' //= link_tree ../../javascript .js +//= link_tree ../stylesheets .css //= link_tree ../../../vendor/javascript .js +//= link_tree ../fonts + +//= link bootstrap/dist/css/bootstrap.min.css +//= link bootstrap-icons/font/bootstrap-icons.min.css +//= link codemirror/lib/codemirror.css +//= link tether-shepherd/dist/css/shepherd-theme-arrows.css + + +//= link cookies_eu.css +//= link @fortawesome/fontawesome-free/css/fontawesome.css +//= link @fortawesome/fontawesome-free/css/regular.css diff --git a/app/assets/javascripts/components/share_case/share_case.html b/app/assets/javascripts/components/share_case/share_case.html index d52445e4..2247197a 100644 --- a/app/assets/javascripts/components/share_case/share_case.html +++ b/app/assets/javascripts/components/share_case/share_case.html @@ -1,7 +1,7 @@