Skip to content

Commit

Permalink
Vite3 rebase nov22 (#11281)
Browse files Browse the repository at this point in the history
* freshening vite3 via merge --squash strategy

This commit contains all vite work as of today:
- vite generally serving the entire app without error
- all jests passing
- reversion to using process.env instead of import.meta.env

The unsquashed git history may be accessed via the vite3-june14-bak branch.
Latest commit in this squash: ba9fd

re-introduce vite shim, which was clobbered during a recent rebase

Vite3 prod build (#10896)

* update lockfiles

temporarily deleting entrypoints for debugging

Revert "temporarily deleting entrypoints for debugging"

This reverts commit d26e9a17aa82b9fd83f557e063cd376716cc5b7c.

removing comments

include airbyte script from develop branch

* our build doesn't support brackets in react components, so re-syntaxing the code

* move from cjs to esm syntax in particular file to fix build

* this config has a working build

* remove console log

* parameterize env vars

---------

Co-authored-by: Peter Kong <[email protected]>

remove webpack/ and webpacker.yml

comment out initializers/react_on_rails.rb

- removed webpacker gem \n - removed webpacker binstubs \n - removed webpack specific scripts in package.json

import vairables in cms_table.scss

Revert "import vairables in cms_table.scss"

This reverts commit 80ea53b.

remove cms.css from config.assets.precompile

removing obsolete Procfiles and webpack configs

Procfile config change; react_on_rails initializer config change

remove print statements

pin vcr gem; remove commented statements in erb file

CMS_URL -> QUILL_CMS

whitespace

freshen package.json

update package-locks

update Gemfiles

fix single spec regression

remove referenced to deleted files edit-assigned-students, final_score_page

fix SegmentAnalytics syntax issue, remove old css file reference, to get prod build working again

update snapshots

update snap

revert bin/bundle changes

lint

relocking Gemfile after bundle lock --add-platform x86_64-linux

silence system spec that depends on webpacker environment

add modified bundler binstub so that local env starts

Gemfile.lock updates

bundle lock --add-platform x86_64-linux

removing require statements from js files

check in new package lockfiles

regressions

add evidence scss entrypoint

removing linux platform from lockfile

adding mini_racer gem

delete unused webpacker-dependent specfile; linting

add ulimit to avoid too many files error during local serving

update moment import syntax to avoid 'moment is not a function' errors

update setupTets, tsconfig so that momentjs plays nice with jest

fix failing node specs, part 1

fix failing node specs, part 2

removing jest mock from setupTests

more jest fixes

concert C = require( statements to import statements

convert more require statements to import

Pin webmock (#11300)

fix test (#11302)

fix activity assignment flow null value bug

fix mock- and snapshot- related jest failures

fix eslint

update snapshots, remove one-off issue in conceptResults.test.ts

update jest snapshots

fix more jests

fix Pusher import statement

resolve merge conflicts

fix view diagn report

topic_filters bugfix

debug

const moment = require('moment'); -> import moment from 'moment';

introduce new stylehseets to premium_hub/index.scss

add entrypoints.session.ts for signup flow

import underscore lib in various places; add empty shared.ts endpoint

add contacts.scss to scss index file

import lodash wherever '_' is referenced

specify correct entrypoint bundle for /premium

vite frontend bug fixes (#11349)

* remove home import from teacher bundle

* add scoring updates card to scss index

* import home file in the right place in application.scss

* fix bug where activity counts aren't showing up

* add back header margins to style guide

* fix grade level filters file

* add update-assigned-student scss to pages/index

* move locker into staff bundle so it can get the right css

* fix evidence css

* add proofreader scss entrypoint

* fix tests

* one more test

* remove require in favor of regular import

* fix merge conflict

change env var back (#11352)

rebuilding package-lock.json after rebase

fix non-react javascript for Vite (#11355)

* freshening vite3 via merge --squash strategy

This commit contains all vite work as of today:
- vite generally serving the entire app without error
- all jests passing
- reversion to using process.env instead of import.meta.env

The unsquashed git history may be accessed via the vite3-june14-bak branch.
Latest commit in this squash: ba9fd

re-introduce vite shim, which was clobbered during a recent rebase

Vite3 prod build (#10896)

* update lockfiles

temporarily deleting entrypoints for debugging

Revert "temporarily deleting entrypoints for debugging"

This reverts commit d26e9a17aa82b9fd83f557e063cd376716cc5b7c.

removing comments

include airbyte script from develop branch

* our build doesn't support brackets in react components, so re-syntaxing the code

* move from cjs to esm syntax in particular file to fix build

* this config has a working build

* remove console log

* parameterize env vars

---------

Co-authored-by: Peter Kong <[email protected]>

remove webpack/ and webpacker.yml

comment out initializers/react_on_rails.rb

- removed webpacker gem \n - removed webpacker binstubs \n - removed webpack specific scripts in package.json

import vairables in cms_table.scss

Revert "import vairables in cms_table.scss"

This reverts commit 80ea53b.

remove cms.css from config.assets.precompile

removing obsolete Procfiles and webpack configs

Procfile config change; react_on_rails initializer config change

remove print statements

pin vcr gem; remove commented statements in erb file

CMS_URL -> QUILL_CMS

whitespace

freshen package.json

update package-locks

update Gemfiles

fix single spec regression

remove referenced to deleted files edit-assigned-students, final_score_page

fix SegmentAnalytics syntax issue, remove old css file reference, to get prod build working again

update snapshots

update snap

revert bin/bundle changes

lint

relocking Gemfile after bundle lock --add-platform x86_64-linux

silence system spec that depends on webpacker environment

add modified bundler binstub so that local env starts

Gemfile.lock updates

bundle lock --add-platform x86_64-linux

removing require statements from js files

check in new package lockfiles

* regressions

add evidence scss entrypoint

removing linux platform from lockfile

adding mini_racer gem

delete unused webpacker-dependent specfile; linting

add ulimit to avoid too many files error during local serving

update moment import syntax to avoid 'moment is not a function' errors

update setupTets, tsconfig so that momentjs plays nice with jest

fix failing node specs, part 1

fix failing node specs, part 2

removing jest mock from setupTests

more jest fixes

concert C = require( statements to import statements

convert more require statements to import

Pin webmock (#11300)

fix test (#11302)

fix activity assignment flow null value bug

fix mock- and snapshot- related jest failures

fix eslint

update snapshots, remove one-off issue in conceptResults.test.ts

update jest snapshots

fix more jests

fix Pusher import statement

* resolve merge conflicts

* fix view diagn report

* topic_filters bugfix

* debug

* const moment = require('moment'); -> import moment from 'moment';

* introduce new stylehseets to premium_hub/index.scss

* add entrypoints.session.ts for signup flow

* import underscore lib in various places; add empty shared.ts endpoint

* add contacts.scss to scss index file

* import lodash wherever '_' is referenced

* specify correct entrypoint bundle for /premium

* vite frontend bug fixes (#11349)

* remove home import from teacher bundle

* add scoring updates card to scss index

* import home file in the right place in application.scss

* fix bug where activity counts aren't showing up

* add back header margins to style guide

* fix grade level filters file

* add update-assigned-student scss to pages/index

* move locker into staff bundle so it can get the right css

* fix evidence css

* add proofreader scss entrypoint

* fix tests

* one more test

* remove require in favor of regular import

* fix merge conflict

* wip

* fix spinners

* remove unnecessary javascript addition from application file

* fix package locks

* undo changes to database.yml and puma.rb file

* remove whitespace

* remove whitespace from database.yml

* fix whitespace in puma.rb

* one more time

---------

Co-authored-by: Peter Kong <[email protected]>

add media:all directive to stylesheet tag so print media works

* resolving merge conflicts in lock files

* update jest snapshot

* Add correct lessons websockets url; remove comments

---------

Co-authored-by: Peter Kong <[email protected]>
  • Loading branch information
happythenewsad and Peter Kong authored Dec 18, 2023
1 parent 5c9d598 commit ed03b60
Show file tree
Hide file tree
Showing 290 changed files with 3,829 additions and 3,304 deletions.
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.

10 changes: 4 additions & 6 deletions services/QuillLMS/Procfile.prod_cms
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ rails: rails s -b 0.0.0.0
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'

# Build server assets, watching for changes. Remove if not server rendering.
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';
@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

0 comments on commit ed03b60

Please sign in to comment.