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

Standalone React and Headless Rails applications #6287

Merged
merged 173 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
f69b222
feat: add CSRF token controller
purfectliterature Aug 1, 2023
2f1199b
chore(rails): remove webpacker
purfectliterature Aug 1, 2023
a0f5abc
style(rails): remove unused stylesheets
purfectliterature Aug 1, 2023
8cf6b48
style(rails): remove unused scripts
purfectliterature Aug 1, 2023
dce1887
style(rails): remove instance themes
purfectliterature Aug 1, 2023
f84bc86
style(rails): remove high voltage pages
purfectliterature Aug 1, 2023
1863859
style(rails): remove simple_form
purfectliterature Aug 1, 2023
b574865
style(rails): remove ApplicationWidgetsHelper
purfectliterature Aug 1, 2023
c5047d3
style(rails): remove unused slims
purfectliterature Aug 1, 2023
01ba842
style(rails): remove InheritedNestedLayouts
purfectliterature Aug 1, 2023
c644b25
style(profiles): use `user_time_zone`
purfectliterature Aug 1, 2023
7b18b07
feat(application_controller): `#home` -> root at `#index`
purfectliterature Aug 1, 2023
a797073
fix(courses_controller): 403 when viewing unenrolled courses
purfectliterature Aug 1, 2023
36ec6d5
feat(user_notifications): allow unenrolled course to `fetch` safely
purfectliterature Aug 1, 2023
e2a919b
chore(foreman): remove foreman configs
purfectliterature Aug 1, 2023
c10b302
chore(hound): do not check javascript/css/scss
purfectliterature Aug 1, 2023
04e6736
style(rails): remove pygments-css
purfectliterature Aug 1, 2023
a999e08
test(capybara): fix flaky `expect_toastify`
purfectliterature Aug 1, 2023
6130373
test(capybara): add sign in, sign out performers
purfectliterature Aug 1, 2023
d56dd23
test(email_management): fix flaky tests
purfectliterature Aug 1, 2023
14b256c
test(capybara): set up different client, server ports
purfectliterature Aug 1, 2023
c5a8ddd
chore(rails): set up `lvh.me` as base URL for development
purfectliterature Aug 1, 2023
640b812
feat(rails): add CORS config
purfectliterature Aug 1, 2023
1100e0a
chore(rails): remove unused gems
purfectliterature Aug 1, 2023
3039e30
feat(application_multitenancy): support multitenancy on development
purfectliterature Aug 1, 2023
de4767c
test(factory/users): support for custom primary `email`
purfectliterature Aug 1, 2023
16af8fc
test(controllers): add `as: :json`, remove HTML tests
purfectliterature Aug 1, 2023
1932d61
test(forum_post_response_answer): fix `submission` empty
purfectliterature Aug 1, 2023
fbd2319
test(programming_answer): rewrite `pending` tests
purfectliterature Aug 1, 2023
8be353e
test(text_response_answer): fix `submission` empty
purfectliterature Aug 1, 2023
dd56d75
test(capybara): add `expect_forbidden`
purfectliterature Aug 1, 2023
68cdd16
test: replace 403 expectations with `expect_forbidden`
purfectliterature Aug 1, 2023
aa318d3
feat(multiple_response_answer): adapt to new UI
purfectliterature Aug 1, 2023
66a2d11
test(password_protected): use new authentication performers
purfectliterature Aug 1, 2023
9d43ae3
feat(manually_graded): adapt to new UI
purfectliterature Aug 1, 2023
54da869
feat(assessment_attempt): adapt to new UI
purfectliterature Aug 1, 2023
43ec634
feat(assessment_viewing): adapt to new UI
purfectliterature Aug 1, 2023
878b87e
test(homepage): enable `js: true`
purfectliterature Aug 1, 2023
8bf205f
feat(staff_statistics): adapt to new UI
purfectliterature Aug 1, 2023
98fe97c
feat(student_statistics): adapt to new UI
purfectliterature Aug 1, 2023
2605bd3
feat(masquerades): adapt to new UI
purfectliterature Aug 1, 2023
d87c356
test(course_management): enable `js: true`
purfectliterature Aug 1, 2023
7343f70
test(instance_user_role_requests_management): enable `js: true`
purfectliterature Aug 1, 2023
f8663cc
test(instance_announcement_management): create `user` before `login`
purfectliterature Aug 1, 2023
ea18058
test(authentication): remove incompatible RSpec tests
purfectliterature Aug 1, 2023
5476d2e
test(authentication): add tests with Playwright
purfectliterature Aug 1, 2023
533b1d6
test: add server test helpers for Playwright
purfectliterature Aug 1, 2023
294866d
feat(passwords_controller): responds to JSON
purfectliterature Aug 1, 2023
86cc87c
feat(registrations_controller): responds to JSON
purfectliterature Aug 1, 2023
8edcb29
feat(confirmations_controller): responds to JSON
purfectliterature Aug 1, 2023
c51fc8c
feat(sessions_controller): responds to JSON
purfectliterature Aug 1, 2023
1e37f47
style(locales): remove unused translations
purfectliterature Aug 1, 2023
8311277
feat(index): returns last course accessed times
purfectliterature Aug 1, 2023
8e7a0db
feat(index): returns primary email
purfectliterature Aug 1, 2023
8543d02
feat(index): returns locale, time zone
purfectliterature Aug 1, 2023
193955d
chore(deps): bump react-router-dom from 6.11.1 to 6.14.1 in /client
purfectliterature Jul 10, 2023
4a59373
feat(api): add CSRF recycler, 401/403 redirects
purfectliterature Aug 1, 2023
051b5a0
test(jest): make MockAdapter work with CSRF recycler
purfectliterature Aug 1, 2023
32be2ca
feat(ScribingViewComponent): code-split, lazy load components, deps
purfectliterature Aug 1, 2023
ee13884
feat(ErrorBoundary): rewrite to TS, add raw error stack
purfectliterature Aug 1, 2023
a4b4f57
feat(components): add CAPTCHAField
purfectliterature Aug 1, 2023
7d44c77
chore(types): add @types/react-scroll
purfectliterature Aug 1, 2023
1eff4de
chore(webpack): add HtmlWebpackPlugin
purfectliterature Aug 1, 2023
0852f4f
chore(webpack): set up webpack-dev-server as reverse proxy
purfectliterature Aug 1, 2023
bb85c5f
feat(store): add session store
purfectliterature Aug 1, 2023
777a422
feat(toast): standardise toast styles
purfectliterature Aug 1, 2023
d9862d4
feat(toast): react-toastify -> lib/toast
purfectliterature Aug 1, 2023
e86e222
style(prettier): fix class names ordering
purfectliterature Aug 1, 2023
3a87a2a
feat: migrate more Link `href`s to `to`
purfectliterature Aug 1, 2023
7b60a6b
feat(app): add AuthenticatedApp, UnauthenticatedApp
ekowidianto Aug 1, 2023
23f7f48
feat: add Privacy Policy page
purfectliterature Aug 1, 2023
87cac39
feat: add Terms of Service page
purfectliterature Aug 1, 2023
f08579f
feat: add DashboardPage
purfectliterature Aug 1, 2023
b4e0951
feat: add LandingPage
purfectliterature Aug 1, 2023
ba1d547
feat: add 403, 404 error pages
purfectliterature Aug 1, 2023
221b4eb
style(AppContainer): remove unused IfRailsSaysSafeToRender
purfectliterature Aug 1, 2023
a9f48cb
feat(AppLoader): sets i18n configs, authenticates app
purfectliterature Aug 1, 2023
d3c5a06
feat: add React authentication pages
purfectliterature Aug 1, 2023
67bef5a
feat: lib/axios -> BaseAPI
purfectliterature Aug 1, 2023
ad64b68
feat(router): add video attempt loader
purfectliterature Aug 1, 2023
42336d0
feat(router): add assessment attempt loader
purfectliterature Aug 1, 2023
81292a4
feat(assessments): attempt buttons link to `/attempt` route
purfectliterature Aug 1, 2023
2f19f87
fix(assessments): restyle elements reset by preflight
purfectliterature Aug 1, 2023
c212e02
refactor: extract support email as `SUPPORT_EMAIL` constant
purfectliterature Aug 1, 2023
11fbe3b
feat(components): add MarkdownPage
purfectliterature Aug 1, 2023
521d501
fix(users): set appropriate heading
purfectliterature Aug 1, 2023
2fdbdcd
feat(styles): add base styles, configs
purfectliterature Aug 1, 2023
3337bf5
feat: add new user menu button
purfectliterature Aug 1, 2023
0d4ac8c
test(SubmissionsTable): rewrite test with RTL
purfectliterature Aug 1, 2023
ac6e7f1
feat(hooks): add useEffectOnce
purfectliterature Aug 1, 2023
da61340
style(initializers): remove unused `module.hot.accept()`
purfectliterature Aug 1, 2023
7aaa7d4
feat(app): immediately bind React app on JS load
purfectliterature Aug 1, 2023
6e694e5
chore(eslint): lift `no-console` to JSX
purfectliterature Aug 1, 2023
e661119
chore(eslint): ignore `build`, `coverage`
purfectliterature Aug 1, 2023
6294a0c
chore(scripts): do not remove `data-testid` when `build:test`
purfectliterature Aug 1, 2023
d2ab191
chore(deps): move development deps to where they belong
purfectliterature Aug 1, 2023
641b773
fix(CourseContainer): allow footer to appear on short screens
purfectliterature Aug 1, 2023
9f71bc2
feat(SearchField): prevent clear button from being tab-focusable
purfectliterature Aug 1, 2023
1f14bcb
fix(TextField): custom `onKeyDown` can't be triggered
purfectliterature Aug 1, 2023
d867886
feat: add AttributionsProvider
purfectliterature Aug 1, 2023
976f60b
feat(Footer): shorten copyright, add social links
purfectliterature Aug 1, 2023
f762764
feat(Accordion): support custom `icon` component
purfectliterature Aug 1, 2023
b5b0c93
feat(Page): renders a Fragment
purfectliterature Aug 1, 2023
77c4ab6
feat(Link): add `disabled` prop
purfectliterature Aug 1, 2023
ee3db81
fix(ConfirmationDialog): content font style cleared by preflight
purfectliterature Aug 1, 2023
719ffbf
feat(DescriptionCard): remove redundant padding
purfectliterature Aug 1, 2023
8912e16
fix(ErrorCard): content font style cleared by preflight
purfectliterature Aug 1, 2023
a1d55bf
feat(PopupMenuButton): support `secondary` component
purfectliterature Aug 1, 2023
7cb97be
feat(AppContainer): add AppErrorBubbler
purfectliterature Aug 1, 2023
f5df333
fix(CourselessContainer): AppContext not forwarded to Outlet
purfectliterature Aug 1, 2023
98bf03b
fix(UserEmailSubscriptions): TypeError; `queryParams` is not flat
purfectliterature Aug 1, 2023
4e5be9b
fix(CoursesIndex): new course dialog won't open when `new=true`
purfectliterature Aug 1, 2023
fe5d6d3
fix(LessonPlanShow): content font styles reset by preflight
purfectliterature Aug 1, 2023
7909c73
fix(surveys): restyle elements reset by preflight
purfectliterature Aug 1, 2023
71a180f
style: remove deprecated server-context
purfectliterature Aug 1, 2023
2aad696
chore(circleci): extract executor `ruby_with_postgres`
purfectliterature Aug 1, 2023
aa22507
chore(circleci): extract executor `node`
purfectliterature Aug 1, 2023
27bdada
chore(circleci): add new pipeline config
purfectliterature Aug 1, 2023
c0d1f71
refactor(attachment): rename upload api
ekowidianto Aug 2, 2023
c2fdcbc
refactor(recaptcha): add error field to captcha field and indicate an…
ekowidianto Aug 2, 2023
0616a31
chore(webpack): fix proxy logs do not show destination port
purfectliterature Aug 2, 2023
a02fe33
fix(AppLoader): prevent redirection if 404
purfectliterature Aug 2, 2023
1af16a3
feat(AppContainer): optimistically render pages even when server 5XX
purfectliterature Aug 2, 2023
25caefb
feat(controllers): remove, replace `redirect_to`s
purfectliterature Aug 2, 2023
a6e7f67
refactor: remove html rendering
ekowidianto Aug 2, 2023
1bfb6e6
refactor: remove announcements html slim
ekowidianto Aug 2, 2023
6e66eca
refactor: remove attachment uploader
ekowidianto Aug 2, 2023
787343f
refactor: remove simple form builder
ekowidianto Aug 2, 2023
e56e99e
refactor: update i18n tasks
ekowidianto Aug 2, 2023
c1ad5da
chore: remove unused gems
ekowidianto Aug 2, 2023
be9e094
style(api): safely type `_CSRF_TOKEN` in Window
purfectliterature Aug 2, 2023
95c2463
chore(playwright): fix missing Node types, add absolute imports
purfectliterature Aug 2, 2023
74d3be1
feat(client): add Istanbul for end-to-end test coverage
purfectliterature Aug 2, 2023
20d52a2
style(tests): remove unused comments
purfectliterature Aug 2, 2023
6bc5372
chore: add env template
ekowidianto Aug 2, 2023
1d083f6
refactor: remove unused codes
ekowidianto Aug 2, 2023
bbf212e
test(playwright): generate code coverage
purfectliterature Aug 2, 2023
54de1a4
chore(circleci): generate, upload playwright code coverage
purfectliterature Aug 2, 2023
d35d682
chore(circleci): generate, upload jest code coverage
purfectliterature Aug 2, 2023
03a6729
test(rails): generate, upload coverage for manual tests
purfectliterature Aug 2, 2023
5ee86e7
chore(circleci): fix playwright tests not running
purfectliterature Aug 2, 2023
c6cb734
feat(AuthenticatableApp): add suspense fallback
ekowidianto Aug 3, 2023
70ac558
fix(markdown page): fix props destructuring
ekowidianto Aug 3, 2023
a8eba6a
feat(SignInPage): add email validation
purfectliterature Aug 8, 2023
73d550d
feat(axios): redirects to `/404` if `ComponentNotFound` raised
purfectliterature Aug 8, 2023
558b863
refactor(DashboardPage): use `useItems`, extract `CourseListItem`
purfectliterature Aug 8, 2023
c5002b2
feat(ConfirmEmailPage): add button to sign in
purfectliterature Aug 8, 2023
0c8e421
feat(videos): watch buttons use link to `/attempt`
purfectliterature Aug 8, 2023
16f17b3
refactor(videos): `#create` responds only `submissionId`
purfectliterature Aug 8, 2023
cf428da
feat(AuthenticatedApp): toast when some loaders fail
purfectliterature Aug 8, 2023
9670e55
style(constants): move support email, default i18n configs to `.env`
purfectliterature Aug 8, 2023
4f85b84
fix(monitoring): raise `ComponentNotFoundError` when disabled
purfectliterature Aug 8, 2023
aff3e18
feat(announcements): `#mark_as_read` responds 204 if unauthorised
purfectliterature Aug 8, 2023
7116609
feat(BrandingHead): show course switcher only when relevant
purfectliterature Aug 8, 2023
fafc0cf
feat(UnauthenticatedApp): show Courses button
purfectliterature Aug 8, 2023
fd0a73e
refactor(users_controller): do not render file
purfectliterature Aug 8, 2023
c8c9a75
refactor(application_controller): do not render file
purfectliterature Aug 8, 2023
13da0e5
chore(prettier): ignore `public`
purfectliterature Aug 8, 2023
a9fbeaa
chore(webpack): webpack-dev-server proxies `/attachments`, `/uploads`
purfectliterature Aug 8, 2023
910d7eb
feat(ErrorBoundary): add friendly error page for 413, 422, 500, 504
purfectliterature Aug 8, 2023
5506f07
feat: add favicons
purfectliterature Aug 8, 2023
2d4cf82
style(rails): remove favicons
ekowidianto Aug 8, 2023
1aebfbf
feat(AuthenticatedApp): redirect material downloads
purfectliterature Aug 8, 2023
8263357
style(rails): remove RenderWithinLayout
purfectliterature Aug 8, 2023
c2be60e
test(materials_controller): `redirect_to` -> expect JSON
purfectliterature Aug 8, 2023
78d7ed3
test(surveys_controller): `redirect_to` -> expect JSON
purfectliterature Aug 8, 2023
0d4b82c
test(user_registrations): remove flash expectations
purfectliterature Aug 8, 2023
e50e29b
test(application_controller): remove render file expectations
purfectliterature Aug 8, 2023
ef76a98
chore(jest): add mock for `assets` imports
purfectliterature Aug 8, 2023
688ee03
chore: update node version
ekowidianto Aug 8, 2023
1008eac
chore(tests): change test app ports to 7979, 3200
purfectliterature Aug 8, 2023
bec5b04
chore(playwright): store screenshots on failure in CircleCI
purfectliterature Aug 8, 2023
9263d5d
feat(popup menu button): add link props and opens in new tab for sidekiq
ekowidianto Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
438 changes: 245 additions & 193 deletions .circleci/config.yml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .foreman

This file was deleted.

7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@ node_modules
/.env.*
/client/.env
/client/.env.*

# Ignore Playwright results
test-results/
playwright-report/
playwright/.cache/
.nyc_output
coverage/
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "vendor/assets/stylesheets/pygments-css"]
path = vendor/assets/stylesheets/pygments-css
url = https://github.com/richleland/pygments-css.git
[submodule "vendor/assets/javascripts/recorderjs"]
path = client/vendor/recorderjs
url = https://github.com/mattdiamond/Recorderjs.git
Expand Down
8 changes: 2 additions & 6 deletions .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ rubocop:
config_file: .rubocop.yml
version: 1.22.1

jshint:
config_file: .jshintrc
ignore_file: .jshintignore

scss:
config_file: .scss-lint.yml
javascript:
enabled: false
1 change: 0 additions & 1 deletion .jshintignore

This file was deleted.

27 changes: 0 additions & 27 deletions .jshintrc

This file was deleted.

40 changes: 0 additions & 40 deletions .scss-lint.yml

This file was deleted.

53 changes: 7 additions & 46 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ gem 'rails', '~> 6.0.6.1'
# Use PostgreSQL for the backend
gem 'pg'

# Enables CORS configuration to allow sharing resources with client on another domain
gem 'rack-cors'

# Instance/Course settings
gem 'settings_on_rails'
# Manage read/unread status
Expand All @@ -35,25 +38,6 @@ gem 'active_record_upsert', '0.11.1'
# Create pretty URLs and work with human-friendly strings
gem 'friendly_id'

# Use SCSS for stylesheets
gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'

# TODO: Check compatibility with webpacker 3.2.0 when it is released.
# https://github.com/rails/webpacker/blob/4f65c5ee58666bbe58b234c48d47ec7d48fab4d8/CHANGELOG.md
gem 'webpacker', '<= 5.4.4'
# Internationalisation for JavaScript.
gem 'i18n-js', '<= 3.10.0'

# Use jQuery as the JavaScript library
gem 'jquery-rails'
# Our Coursemology will be themed using Bootstrap
gem 'bootstrap-sass'
gem 'bootstrap-sass-extras', '>= 0.1.0'
gem 'autoprefixer-rails'
# Use font-awesome for icons
gem 'font-awesome-rails'
# HTML Pipeline and dependencies
gem 'html-pipeline'
gem 'sanitize', '>= 4.6.3'
Expand All @@ -63,10 +47,6 @@ gem 'html-pipeline-rouge_filter', git: 'https://github.com/ekowidianto/html-pipe
gem 'jbuilder'
# Slim as the templating language
gem 'slim-rails'
# ejs for client-side templates
gem 'ejs'
# High Voltage for static pages
gem 'high_voltage'
# Paginator for Rails
gem 'kaminari'
# Work with Docker
Expand All @@ -84,10 +64,6 @@ group :development do
gem 'spring', platforms: [:ruby]
gem 'listen'

# Gems to make development mode faster and less painful

gem 'wdm', '>= 0.0.3', platforms: [:mswin, :mswin64]

# Helps to prevent database slowdowns
gem 'lol_dba', require: false

Expand All @@ -97,16 +73,12 @@ group :development do
# bundle exec yardoc generates the API under doc/.
# Use yard stats --list-undoc to find what needs documenting.
gem 'yard', group: :doc

# Gem to generate favicon
gem 'rails_real_favicon'
end

group :test do
gem 'email_spec'
gem 'rspec-html-matchers'
gem 'should_not'
gem 'simplecov'
gem 'shoulda-matchers'

# Capybara for feature testing
Expand Down Expand Up @@ -139,11 +111,13 @@ group :development, :test do

# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end

group :ci do
# Code Coverage reporters
gem 'simplecov'
gem 'codecov', require: false
end

group :ci do
gem 'rspec-retry'
gem 'rspec_junit_formatter'
gem 'rubocop-rails'
Expand Down Expand Up @@ -199,18 +173,6 @@ gem 'cancancan'
# We also want stricter sanitization.
gem 'rails_utils', git: 'https://github.com/raymondtangsc/rails_utils.git', branch: 'full-sanitize-flash'

# Themes for instances
gem 'themes_on_rails', '>= 0.3.1', git: 'https://github.com/raymondtangsc/themes_on_rails',
branch: 'xtang/rails_6'

# Forms made easy for Rails
gem 'simple_form'
gem 'simple_form-bootstrap', git: 'https://github.com/purfectliterature/simple_form-bootstrap'
# Dynamic nested forms
gem 'cocoon'
gem 'bootstrap_tokenfield_rails'
gem 'twitter-typeahead-rails'

# Using CarrierWave for file uploads
gem 'carrierwave'
# Generate sequential filenames
Expand All @@ -236,6 +198,5 @@ gem 'rwordnet', git: 'https://github.com/makqien/rwordnet'
gem 'loofah', '>= 2.2.1'
gem 'rails-html-sanitizer', '>= 1.0.4'

gem 'sprockets', '< 4.0.0'
gem 'mimemagic', '0.4.3'
gem 'ffi', '>= 1.14.2'
Loading