diff --git a/Gemfile b/Gemfile index ed20a87bb..aec824937 100644 --- a/Gemfile +++ b/Gemfile @@ -74,7 +74,6 @@ gem 'sib-api-v3-sdk' gem 'skylight' gem 'smart_listing' gem 'spreadsheet_architect' -gem 'sprockets', '< 4' gem 'typhoeus' gem 'warden' gem 'webpacker' @@ -112,7 +111,6 @@ group :development do gem 'rubocop-rspec-focused', require: false gem 'scss_lint', require: false gem 'web-console' - gem 'xray-rails' end group :development, :test do diff --git a/Gemfile.lock b/Gemfile.lock index b559be011..374f79742 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -730,7 +730,7 @@ GEM spring (2.1.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (3.7.2) + sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.2) @@ -799,8 +799,6 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - xray-rails (0.3.2) - rails (>= 3.1.0) zeitwerk (2.4.2) zip_tricks (5.5.0) zipline (1.3.0) @@ -918,7 +916,6 @@ DEPENDENCIES spreadsheet_architect spring spring-commands-rspec - sprockets (< 4) timecop typhoeus vcr @@ -927,7 +924,6 @@ DEPENDENCIES webdrivers (~> 4.0) webmock webpacker - xray-rails zipline zxcvbn-ruby diff --git a/app/assets/config/manifest.js b/app/assets/config/manifest.js new file mode 100644 index 000000000..8890f53b3 --- /dev/null +++ b/app/assets/config/manifest.js @@ -0,0 +1,5 @@ +//= link application.css +//= link_tree ../images +//= link_tree ../fonts +//= link administrate/application.css +//= link administrate/application.js diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index eaf0c0b98..1fc589860 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -5,4 +5,3 @@ // = require ./fonts // = require leaflet // = require_tree . -// = stub ./print.scss diff --git a/app/assets/stylesheets/print.scss b/app/assets/stylesheets/print.scss index cbb30fc56..4c0e9749c 100644 --- a/app/assets/stylesheets/print.scss +++ b/app/assets/stylesheets/print.scss @@ -1,63 +1,65 @@ @import "colors"; @import "fonts"; -.new-header, -.sub-header, -footer { - display: none; -} - -.print-header { - display: block; - margin-top: 30px; - font-size: 30px; - line-height: 50px; - font-weight: bold; -} - -body { - font-family: "Muli"; -} - -.subtitle { - margin-top: -20px; - color: $dark-grey; -} - -th, -td { - vertical-align: top; -} - -th { - text-align: left; - - &.header-section { - padding-top: 1.2em; - font-size: 1.2em; +@media print { + .new-header, + .sub-header, + footer { + display: none; } -} -.messagerie { - .messages-list { - list-style: none; - padding-left: 0; - max-height: none; + .print-header { + display: block; + margin-top: 30px; + font-size: 30px; + line-height: 50px; + font-weight: bold; + } - h2 { - font-size: 110%; - } + body { + font-family: "Muli"; + } - .person-icon { - display: none; + .subtitle { + margin-top: -20px; + color: $dark-grey; + } + + th, + td { + vertical-align: top; + } + + th { + text-align: left; + + &.header-section { + padding-top: 1.2em; + font-size: 1.2em; } } -} -.message { - margin-bottom: 40px; -} + .messagerie { + .messages-list { + list-style: none; + padding-left: 0; + max-height: none; -.updated-at { - display: none; + h2 { + font-size: 110%; + } + + .person-icon { + display: none; + } + } + } + + .message { + margin-bottom: 40px; + } + + .updated-at { + display: none; + } } diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index d2ed48a5c..28285f2ea 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -20,7 +20,6 @@ = preload_link_tag(asset_url("Muli-Bold.woff2")) = stylesheet_link_tag 'application', media: 'all' - = stylesheet_link_tag 'print', media: 'print' = Gon::Base.render_data(camel_case: true, init: true, nonce: request.content_security_policy_nonce) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index c97536ee3..86d374be3 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -10,5 +10,6 @@ Rails.application.config.assets.paths << Rails.root.join('node_modules', '@reach Rails.application.config.assets.paths << Rails.root.join('node_modules', '@mapbox', 'mapbox-gl-draw', 'dist') # Precompile additional assets. -# application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -Rails.application.config.assets.precompile += ['print.css'] +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index a65106b50..2d4008a4f 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -3,5 +3,5 @@ Sentry.init do |config| config.send_default_pii = false config.enabled_environments = ['production'] config.breadcrumbs_logger = [:active_support_logger] - config.traces_sample_rate = 0.001 + config.traces_sample_rate = ENV['SENTRY_ENABLED'] == 'enabled' ? 0.001 : nil end