Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
95bf29c
uninstall webpacker and install jsbundling-rails
Apr 15, 2022
aaef860
moved static images to public folder
Apr 18, 2022
35b13bb
changed static image links to not require webpacker
Apr 18, 2022
0bd2a01
added css bundling gem
Apr 19, 2022
b44c276
fixed fontawesome
Apr 27, 2022
dc42738
css bundler writes to file
Apr 22, 2022
fd1ce19
linter
Apr 22, 2022
8957e73
removed webpacker more
Apr 22, 2022
0de0209
re-enabled rails asset pipeline, moved images to assets dir
Apr 23, 2022
0876743
fixed primary color configuration
Apr 23, 2022
485a0ac
fixed fontawesome
Apr 27, 2022
f20c166
add note about font hack
Apr 27, 2022
03bf78c
move all css to expected location for rails asset pipeline
May 4, 2022
6ecc7ff
application.css auto builds when any sass files are changed
May 4, 2022
449aabe
added comments about css imports
May 7, 2022
68b85fc
add datatables css import
May 7, 2022
9887c31
renamed select2 custom stylesheet
May 7, 2022
5ae53a8
fixed namespace duplicate
May 7, 2022
97f4cfe
js builds without errors
May 7, 2022
b3fde4c
remove file extension for import
May 7, 2022
4fb0f5b
linter
May 7, 2022
b5cc4fa
move add2calendar import to app css
May 7, 2022
f48d163
js imports working
May 14, 2022
3e9cfa8
uniform import style
May 14, 2022
75d6bac
ignore linting generated js
May 15, 2022
30359a0
linter
May 15, 2022
4ac9533
better comment
May 15, 2022
4e1feeb
not required for yarn
May 15, 2022
712e38b
fixed malformed yarn.lock
May 15, 2022
8977587
fix jest tests
May 18, 2022
3b9ae34
linter
May 18, 2022
197866a
add failure printing
May 18, 2022
f22bce6
seperated watch from main build commands
May 18, 2022
9206117
replace old webpacker commands in workflow
May 18, 2022
1e55656
fix sometimes erroneous statement
May 18, 2022
5eb541e
compile assets before running the server
May 18, 2022
5f310de
linter
May 18, 2022
3e15f6e
remove webpack server
May 18, 2022
32497ae
remove old webpacker command
May 20, 2022
601d7f1
re added support for all casa admin js
May 20, 2022
8e7c97f
removed unused file
May 20, 2022
e6c1f72
removed import because there are no unique styles for all casa admins
May 20, 2022
d7a1961
fix meta tags and tag tests
May 21, 2022
df40c5d
revert compiling assets on server spinup
May 25, 2022
52dc529
remove webpacker autogenerated file
May 25, 2022
aa96c5b
linter
May 25, 2022
d2cfc31
remove more webpacker autogenerated files
May 25, 2022
570f375
try fix assets not compiling for docker
May 25, 2022
7c34e46
remove consumer js again
May 25, 2022
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
4 changes: 4 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@ jobs:
run: docker-compose up -d
- name: db:reset
run: docker-compose exec -T web rails db:reset
- name: compile css
run: docker-compose exec -T web bundle exec rails css:build
- name: compile js
run: docker-compose exec -T web bundle exec rails javascript:build
- name: Test
run: docker-compose exec -T web bundle exec rspec spec
3 changes: 2 additions & 1 deletion .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ jobs:
yarn
bundle exec rake db:create
bundle exec rake db:schema:load
bundle exec rails webpacker:compile
bundle exec rails css:build
bundle exec rails javascript:build

- name: Run rspec and upload code coverage
env:
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,9 @@ vendor/bundle/
default.nix

npm-debug.log

# Ignore compiled assets
/app/assets/builds/*

# In case we want to keep something in the compiled assets directory
!/app/assets/builds/.keep
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ gem "faker" # creates realistic seed data, valuable for staging and demos
gem "filterrific" # filtering and sorting of models
gem "image_processing", "~> 1.12" # Set of higher-level helper methods for image processing.
gem "jbuilder" # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem "jsbundling-rails"
gem "lograge" # log less so heroku papertrail quits rate limiting our logs
gem "net-smtp", require: false # needed for ruby upgrade to 3.1.0 for some dang reason
gem "net-pop" # needed for ruby upgrade to 3.1.0 https://www.ruby-lang.org/en/news/2021/12/25/ruby-3-1-0-released/
Expand All @@ -37,9 +38,9 @@ gem "rack-attack" # for blocking & throttling abusive requests
gem "request_store"
gem "sablon" # Word document templating tool for Case Court Reports
gem "scout_apm"
gem "sprockets-rails" # The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "strong_migrations"
gem "tzinfo-data", platforms: %i[mingw mswin x64_mingw jruby] # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "webpacker" # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker

group :development, :test do
gem "bullet" # Detect and fix N+1 queries
Expand Down Expand Up @@ -76,3 +77,5 @@ group :test do
end

# gem "pdf-reader", "~> 2.9"

gem "cssbundling-rails", "~> 1.1"
27 changes: 14 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ GEM
crack (0.4.5)
rexml
crass (1.0.6)
cssbundling-rails (1.1.0)
railties (>= 6.0.0)
database_cleaner-active_record (2.0.1)
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
Expand Down Expand Up @@ -232,6 +234,8 @@ GEM
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
jsbundling-rails (1.0.2)
railties (>= 6.0.0)
jwt (2.3.0)
launchy (2.5.0)
addressable (~> 2.7)
Expand Down Expand Up @@ -278,8 +282,6 @@ GEM
net-protocol
timeout
nio4r (2.5.8)
nokogiri (1.13.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.13.6-x86_64-linux)
Expand Down Expand Up @@ -314,8 +316,6 @@ GEM
rack (2.2.3)
rack-attack (6.6.1)
rack (>= 1.0, < 3)
rack-proxy (0.7.2)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (7.0.3)
Expand Down Expand Up @@ -403,7 +403,6 @@ GEM
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
shoulda-matchers (5.1.0)
activesupport (>= 5.2.0)
simplecov (0.21.2)
Expand All @@ -416,6 +415,13 @@ GEM
spring (4.0.0)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (4.0.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
standard (1.5.0)
rubocop (= 1.23.0)
rubocop-performance (= 1.12.0)
Expand Down Expand Up @@ -452,11 +458,6 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webpacker (5.4.3)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -465,9 +466,7 @@ GEM
zeitwerk (2.5.4)

PLATFORMS
arm64-darwin-21
x86_64-darwin-20
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
Expand All @@ -483,6 +482,7 @@ DEPENDENCIES
capybara-screenshot
caxlsx (~> 3.2)
caxlsx_rails (~> 0.6.3)
cssbundling-rails (~> 1.1)
database_cleaner-active_record
delayed_job_active_record
devise
Expand All @@ -495,6 +495,7 @@ DEPENDENCIES
httparty
image_processing (~> 1.12)
jbuilder
jsbundling-rails
letter_opener
lograge
net-imap
Expand Down Expand Up @@ -523,6 +524,7 @@ DEPENDENCIES
simplecov
spring
spring-commands-rspec
sprockets-rails
standard (= 1.5.0)
strong_migrations
traceroute
Expand All @@ -531,7 +533,6 @@ DEPENDENCIES
web-console (>= 3.3.0)
webdrivers
webmock
webpacker

RUBY VERSION
ruby 3.1.0p0
Expand Down
3 changes: 3 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
web: bin/rails server -p 3000
js: yarn build --watch
css: yarn build:css --watch
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ Another option is to install the Chromium browser for your operating system so t
requires running local postgres, with a role created for whatever user you're running rails as
1. `bin/rails db:seed:replant` generates test data (can be rerun to regenerate test data)

**Webpacker One Time Setup**
`bundle exec rails webpacker:compile`

### Platform Specific Installation Instructions
- [Docker](doc/DOCKER.md)
- [Linux](doc/LINUX_SETUP.md)
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
//= link_directory ../builds .css
//= link_directory ../builds .js
//= link_tree ../images
//= link_tree ../fonts
1 change: 1 addition & 0 deletions app/assets/fonts/fa-solid-900.ttf
1 change: 1 addition & 0 deletions app/assets/fonts/fa-solid-900.woff2
File renamed without changes
File renamed without changes
36 changes: 36 additions & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// links to stylesheets inside node_modules
@use "add2calendar/css/add2calendar";
@use "bootstrap/scss/bootstrap.scss" with (
$primary: #00447c
);
@use "bootstrap-datepicker/dist/css/bootstrap-datepicker";
@use "datatables.net-dt/css/jquery.dataTables";
@use "@fortawesome/fontawesome-free/scss/fontawesome";
@use "@fortawesome/fontawesome-free/scss/solid";
@use "select2/dist/css/select2";

// custom css for the app
@use "base/breakpoints";

@use "shared/dashboard";
@use "shared/flashes";
@use "shared/footer";
@use "shared/form";
@use "shared/layout";
@use "shared/navbar";
@use "shared/select2_additional_styles";
@use "shared/sidebar";
@use "shared/typography";
@use "shared/utilities";
@use "shared/noscript";

@use "pages/all_casa_admin_dashboard";
@use "pages/casa_cases";
@use "pages/case_contacts";
@use "pages/casa_org";
@use "pages/court_dates";
@use "pages/emancipation";
@use "pages/login";
@use "pages/password";
@use "pages/supervisors";
@use "pages/volunteers";
2 changes: 2 additions & 0 deletions app/assets/stylesheets/base/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$primary: #00447c;
$red: #dc3545;
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../base/breakpoints.scss" as screen-sizes;

body.casa_cases {
.form-header {
h1 {
Expand Down Expand Up @@ -83,7 +85,7 @@ body.casa_cases {
}
}

@media only screen and (max-width: $small) {
@media only screen and (max-width: screen-sizes.$small) {
body.casa_cases {
.court-mandates {
textarea, .add-court-mandate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body.devise-sessions-new, body.users-sessions-new, body.devise-passwords-new {

aside {
background-position: right;
background-image: url("../images/login.jpg");
background-image: url("login.jpg");
min-height: 700px;
background-repeat: no-repeat;
background-size: cover;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@use "../base/variables.scss" as globals;

.password-box {
width: 450px;
margin: 10% auto;
text-align: center;
border-radius: 25px;
border: 2px solid $primary;
border: 2px solid globals.$primary;

form#edit_user.edit_user div.field {
margin: 0 auto;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@use "../base/breakpoints.scss" as screen-sizes;

body.volunteers {
@media only screen and (max-width: $mobile) {
@media only screen and (max-width: screen-sizes.$mobile) {
table#volunteers {
tbody tr {
padding-bottom: 2.5rem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
@use "../base/variables" as globals;

footer {
padding: 2rem 0;
text-align: center;
background-color: $primary;
background-color: globals.$primary;
color: #fff;

.default-footer {
a.rfglink {
color: #fff;
}

.rfglogo{
.rfglogo {
max-height: 3em;
}
}
.terms-conditions-link {
color:#fff;
}

.footer-logos{
.footer-logos {
.rfglink {

.rfglogo{
.rfglogo {
max-height: 6em;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../base/variables.scss" as globals;

form {
.field_with_errors {
label {
Expand All @@ -6,7 +8,7 @@ form {
}

input {
border: 1px solid $red;
border: 1px solid globals.$red;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@use "../base/variables.scss" as globals;
@use "../base/breakpoints.scss" as screen-sizes;

body {
background-color: #f4f7fa;
min-width: 320px;
Expand Down Expand Up @@ -25,7 +28,7 @@ h5 label {
}

.fa-car {
color: $primary;
color: globals.$primary;
}

div.row div.col-sm-12.form-header h1 {
Expand Down Expand Up @@ -57,7 +60,7 @@ div.row.volunteer-filters {

/* As 'mobile-label' class is mobile only, not display them on desktop view */

@media only screen and (min-width: $mobile) {
@media only screen and (min-width: screen-sizes.$mobile) {
table.table {
span.mobile-label {
display: none;
Expand All @@ -69,7 +72,7 @@ div.row.volunteer-filters {
margin-bottom: 0.5em;
}

@media only screen and (max-width: $mobile) {
@media only screen and (max-width: screen-sizes.$mobile) {
.login-header {
font-size: 0.75em !important;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "../base/breakpoints.scss" as screen-sizes;

.navbar {
color: #fff;
background: #00447c;
Expand All @@ -22,7 +24,7 @@
width: 40px;
}

@media only screen and (max-width: $mobile) {
@media only screen and (max-width: screen-sizes.$mobile) {
.navbar.mobile {
display: flex;
position: sticky;
Expand Down
Loading