Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vite3 rebase nov22 #11281

Merged
merged 4 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions services/QuillLMS/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VITE_PROCESS_ENV_CDN_URL=https://assets.quill.org
VITE_PROCESS_ENV_PUSHER_KEY=
VITE_PROCESS_ENV_RAILS_ENV=default
VITE_DEFAULT_URL=http://localhost:5000
VITE_CMS_URL=https://cms.quill.org
VITE_ENV=development
Empty file.
8 changes: 6 additions & 2 deletions services/QuillLMS/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ nohup.out
/cypress/screenshots
/cypress/videos

**/.DS_Store
# Vite Ruby
/public/vite*
node_modules
# Vite uses dotenv and suggests to ignore local-only env files. See
# https://vitejs.dev/guide/env-and-mode.html#env-files
*.local

.cache
3 changes: 0 additions & 3 deletions services/QuillLMS/.postcssrc.yml

This file was deleted.

10 changes: 6 additions & 4 deletions services/QuillLMS/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ gem 'slim-rails'

gem 'es5-shim-rails'
# Use the exact gem version to match npm version of react-on-rails
gem 'react_on_rails', '= 11.3.0'
gem 'webpacker', '~> 3.0.0'
gem 'react_on_rails', '= 13.3.3'

gem 'vite_rails', '~> 3.0.14'

# ASSET/UI
gem 'uglifier', require: false
Expand Down Expand Up @@ -197,6 +198,7 @@ group :test, :development do
gem 'rspec-redis_helper'
gem 'brakeman', '= 4.1.1'
gem 'memory_profiler'
gem 'mini_racer', '= 0.8.0'
gem 'rubocop'
gem 'rubocop-rails'
gem 'rubocop-rspec'
Expand All @@ -215,6 +217,6 @@ group :test do
gem 'shoulda-matchers', '~> 4'
gem 'shoulda-callback-matchers', '~> 1.1.1'
gem 'super_diff', require: false
gem 'vcr'
gem 'webmock'
gem 'vcr', '~> 6.2.0'
gem 'webmock', '~> 3.19'
end
30 changes: 19 additions & 11 deletions services/QuillLMS/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ GEM
dotenv-rails (2.7.6)
dotenv (= 2.7.6)
railties (>= 3.2)
dry-cli (1.0.0)
erubi (1.12.0)
es5-shim-rails (4.0.1)
actionpack (>= 3.1)
Expand Down Expand Up @@ -402,6 +403,7 @@ GEM
addressable (~> 2.7)
letter_opener (1.7.0)
launchy (~> 2.2)
libv8-node (18.16.0.0)
lms-api (1.24.0)
activesupport (>= 3.0)
httparty
Expand Down Expand Up @@ -431,6 +433,8 @@ GEM
rake
mini_mime (1.1.2)
mini_portile2 (2.8.4)
mini_racer (0.8.0)
libv8-node (~> 18.16.0.0)
minitest (5.19.0)
multi_json (1.15.0)
multi_xml (0.6.0)
Expand Down Expand Up @@ -609,11 +613,11 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
rb-readline (0.5.5)
react_on_rails (11.3.0)
react_on_rails (13.3.3)
addressable
connection_pool
execjs (~> 2.5)
rails (>= 3.2)
rails (>= 5.2)
rainbow (~> 3.0)
redcarpet (3.5.1)
redis (4.5.1)
Expand Down Expand Up @@ -804,14 +808,17 @@ GEM
i18n
vcr (6.2.0)
version_gem (1.1.3)
webmock (3.18.1)
vite_rails (3.0.14)
railties (>= 5.1, < 8)
vite_ruby (~> 3.0, >= 3.2.2)
vite_ruby (3.2.14)
dry-cli (>= 0.7, < 2)
rack-proxy (~> 0.6, >= 0.6.1)
zeitwerk (~> 2.2)
webmock (3.19.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webpacker (3.0.2)
activesupport (>= 4.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
webrick (1.8.1)
websocket (1.2.9)
websocket-driver (0.6.5)
Expand Down Expand Up @@ -884,6 +891,7 @@ DEPENDENCIES
matrix (~> 0.4.2)
maxminddb
memory_profiler
mini_racer (= 0.8.0)
newrelic_rpm (~> 9.3.1)
nokogiri (>= 1.13.2)
omniauth
Expand Down Expand Up @@ -921,7 +929,7 @@ DEPENDENCIES
rails_admin (~> 3.1.2)
ranked-model (~> 0.4.3)
rb-readline
react_on_rails (= 11.3.0)
react_on_rails (= 13.3.3)
redcarpet (~> 3.5.1)
redis (~> 4.5)
redis-namespace (~> 1.8)
Expand Down Expand Up @@ -962,9 +970,9 @@ DEPENDENCIES
tzinfo-data
uglifier
validates_email_format_of
vcr
webmock
webpacker (~> 3.0.0)
vcr (~> 6.2.0)
vite_rails (~> 3.0.14)
webmock (~> 3.19)
websocket-driver (= 0.6.5)
ziptz

Expand Down
16 changes: 0 additions & 16 deletions services/QuillLMS/Procfile.cypress

This file was deleted.

3 changes: 0 additions & 3 deletions services/QuillLMS/Procfile.dev

This file was deleted.

18 changes: 0 additions & 18 deletions services/QuillLMS/Procfile.hot

This file was deleted.

8 changes: 6 additions & 2 deletions services/QuillLMS/Procfile.prod_cms
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ worker: bundle exec sidekiq -v -q default -q critical
reportworker: bundle exec sidekiq -v -q low

# Build client assets, watching for changes.
rails-client-assets: sh -c 'npm run build:dev:client:prod-cms'
#rails-client-assets: sh -c 'npm run build:dev:client:prod-cms'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably something we can do as a follow-up, but we should probably remove these commented-out lines (and restore parity re: using the production CMS_URL env variable, since right now this file is the same as Procfile.static).


# Build server assets, watching for changes. Remove if not server rendering.
rails-server-assets: sh -c 'npm run build:dev:server'
#rails-server-assets: sh -c 'npm run build:dev:server'

redis-sidekiq: redis-server --port 6379

redis-testing: redis-server --port 6378

redis-caching: redis-server --port 7654

# vite opens a lot of files, so we increase the ulimit
ulimit -n 99999
vite: bin/vite dev
6 changes: 4 additions & 2 deletions services/QuillLMS/Procfile.static
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ worker: bundle exec sidekiq -v -q instant -q default -q critical -q critical_ext
reportworker: bundle exec sidekiq -v -q low

# Build client assets, watching for changes.
rails-client-assets: sh -c 'npm run build:dev:client'
#rails-client-assets: sh -c 'npm run build:dev:client'

# Build server assets, watching for changes. Remove if not server rendering.
rails-server-assets: sh -c 'npm run build:dev:server'
#rails-server-assets: sh -c 'npm run build:dev:server'

redis-sidekiq: redis-server --port 6379

redis-testing: redis-server --port 6378

redis-caching: redis-server --port 7654

vite: bin/vite dev
14 changes: 7 additions & 7 deletions services/QuillLMS/app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@import "../../../client/node_modules/react-datetime/css/react-datetime";

@import "variables";
@import "bootstrap-sprockets";
@import 'variables';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really a code comment, but just a general one that it is probably worth sending out a note about the major structural changes (like having to explicitly import every nested scss file) to quill-developer whenever this goes out.

@import '_mixins';
@import 'shared/icons';
@import "bootstrap";
@import "mixins";
@import "../../../client/app/assets/styles/home.scss";
@import "custom";
@import "pages/**/*";
@import "cms/**/*";
@import "shared/icons";
@import "shared/**/*";
@import "pages/index";
@import "cms/index";
@import "shared/index";
@import "print";
9 changes: 9 additions & 0 deletions services/QuillLMS/app/assets/stylesheets/cms/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import 'activities.scss';
@import 'blog_posts.scss';
@import 'cms_table.scss';
@import 'subscription.scss';
@import 'unit_templates.scss';
@import 'blog_post.scss';
@import 'cms.scss';
@import 'recommendations_table.scss';
@import 'unit_template_editor.scss';
2 changes: 1 addition & 1 deletion services/QuillLMS/app/assets/stylesheets/home.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import 'tool-section.scss';
@import '../client/app/assets/styles/tool-section.scss';
@import '../webpack/home-bundle.scss';
@import './variables.scss';
@import './shared/flash.scss';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@import 'activity_row.scss';
@import 'empty_state.scss';
@import 'filter_column.scss';
@import 'mobile_sort_and_filter_menus.scss';

.custom-activity-pack-page {
background-color: white;
display: flex;
Expand Down
85 changes: 85 additions & 0 deletions services/QuillLMS/app/assets/stylesheets/pages/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
@import 'custom_activity_pack/index.scss';
@import 'premium_hub/index.scss';
@import 'progress_reports/index.scss';
@import 'student_dashboard/index.scss';
@import 'teacher_dashboard/index.scss';
@import 'unit_templates/index.scss';

@import '404_page.scss';
@import 'about-page.scss';
@import 'about-us-pages.scss';
@import 'accounts_session_and_password_reset.scss';
@import 'activities.scss';
@import 'activity_categories.scss';
@import 'add_class.scss';
@import 'admin.scss';
@import 'admin_access.scss';
@import 'administrator.scss';
@import 'amplify.scss';
@import 'archived_classrooms_manager.scss';
@import 'assign-dates.scss';
@import 'assign_a_new_activity.scss';
@import 'assignment_flow.scss';
@import 'beta.scss';
@import 'blog_posts.scss';
@import 'blog_posts_header_section.scss';
@import 'careers.scss';
@import 'champion.scss';
@import 'choose_classroom_lesson.scss';
@import 'class-page.scss';
@import 'classrooms.scss';
@import 'cms_activity_classifications.scss';
@import 'cms_unit_templates.scss';
@import 'college_board.scss';
@import 'contact.scss';
@import 'create-a-class.scss';
@import 'custom_activity_pack';
@import 'diagnostic-planner.scss';
@import 'edit-coteacher.scss';
@import 'empty-unit-container.scss';
@import 'empty_progress_report.scss';
@import 'faq.scss';
@import 'google_mismatch.scss';
@import 'google_sync.scss';
@import 'grade_level_warning_modal.scss';
@import 'home.scss';
@import 'iframed_pages.scss';
@import 'invite-students.scss';
@import 'lesson-recommendations.scss';
@import 'lesson_planner_and_unit_template_editor.scss';
@import 'manage-classes.scss';
@import 'manage-units.scss';
@import 'misc-pages.scss';
@import 'my_account.scss';
@import 'my_activities.scss';
@import 'my_lessons.scss';
@import 'new_account_page.scss';
@import 'no_classroom.scss';
@import 'pathways.scss';
@import 'premium_banner.scss';
@import 'premium_features_table.scss';
@import 'premium_hub';
@import 'premium_page.scss';
@import 'press.scss';
@import 'preview_or_launch_modal.scss';
@import 'privacy.scss';
@import 'profile.scss';
@import 'progress_reports';
@import 'quill_academy.scss';
@import 'request_quote.scss';
@import 'rosters.scss';
@import 'scorebook_page.scss';
@import 'sign_up.scss';
@import 'signin.scss';
@import 'student_dashboard';
@import 'student_results.scss';
@import 'subscriptions.scss';
@import 'teacher_dashboard';
@import 'teacher_fixes.scss';
@import 'teacher_guide.scss';
@import 'teacher_premium.scss';
@import 'team.scss';
@import 'tutorials.scss';
@import 'update-assigned-students.scss';
@import 'unit_templates';
@import 'user-select-role.scss';
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import './admin_teachers/admins-teachers.scss';
@import './admin_teachers/admin-teacher.scss';
@import './data-export.scss';
@import './filterable-reports.scss';
@import './impact_page.scss';
@import './integrations.scss';
@import './premium-hub.scss';
@import './premium-hub-header.scss';
@import './top.scss';
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@import './progress_reports_landing_page.scss';
@import './diagnostic_questions_analysis.scss';
@import './diagnostic_reports.scss';
@import './skills_table.scss';
@import './diagnostic_release_method_modal.scss';
@import './progress_reports_premium_bar.scss';
@import './diagnostic_growth_results_summary.scss';
@import './progress_reports.scss';
@import './diagnostic_activity_packs.scss';
@import './trial_expired.scss';
@import './diagnostic_individual_pack.scss';
@import './reports_header.scss';
@import './student-overview.scss';
@import './progress-reports-2018.scss';
@import './diagnostic_individual_student_responses.scss';
@import './toggle_explanation.scss';
@import './diagnostic_modal.scss';
@import './diagnostic_student_responses_index.scss';
@import './empty_diagnostic_progress_reports.scss';
@import './download-report.scss';
@import './diagnostic_recommendations.scss';
@import './diagnostic_results_summary.scss';
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import './student_profile_header.scss';
@import './pinned_activity.scss';
@import './select_a_classroom.scss';
@import './student-profile-modal.scss';
@import './student_navbar.scss';
@import './student-feedback-modal.scss';
@import './student_profile_unit.scss';
@import './student_profile_classwork_tabs.scss';
Loading
Loading