From c7f5f85508c2596b25fa0a2596684552e075da64 Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Wed, 17 Oct 2018 14:18:36 -0700 Subject: [PATCH 1/2] update materialize.css to 1.0.0 from 1.0.0-beta This change just seems like it's worth doing. Presumably it was last updated before 1.0.0 was released. --- app/views/layouts/_common_head.html.erb | 4 ++-- app/views/layouts/forum.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/_common_head.html.erb b/app/views/layouts/_common_head.html.erb index 4e1e71bc..3db3f207 100644 --- a/app/views/layouts/_common_head.html.erb +++ b/app/views/layouts/_common_head.html.erb @@ -2,14 +2,14 @@ <%= csrf_meta_tags %> <%= stylesheet_link_tag 'application' %> - + - + diff --git a/app/views/layouts/forum.html.erb b/app/views/layouts/forum.html.erb index d7d94430..822a44cf 100644 --- a/app/views/layouts/forum.html.erb +++ b/app/views/layouts/forum.html.erb @@ -2,14 +2,14 @@ <%= stylesheet_link_tag 'application' %> - + - + <%= render 'layouts/favicon' %> From d25ae12c08e27b8306166adbffa66dbc1b3bb850 Mon Sep 17 00:00:00 2001 From: Euan Kemp Date: Wed, 17 Oct 2018 14:20:15 -0700 Subject: [PATCH 2/2] Fix checkboxes to use materialize checkboxes Before there was a hack in place to not use materialize checkboxes because the actual checkbox didn't show up. This re-arranges all the checkboxes I could find to work with materialize, thus allowing the hack to be safely removed. The forum (namely preferences) continue to use the hacky checkbox, but that hack is maintained separately and still seems to work with this change. --- app/assets/stylesheets/fixes.scss | 11 ----------- app/views/devise/registrations/new.html.erb | 6 +++--- .../registrations/panes/_preferences.html.erb | 8 ++++---- app/views/devise/sessions/_form.html.erb | 14 +++++++++----- db/schema.rb | 1 - 5 files changed, 16 insertions(+), 24 deletions(-) delete mode 100644 app/assets/stylesheets/fixes.scss diff --git a/app/assets/stylesheets/fixes.scss b/app/assets/stylesheets/fixes.scss deleted file mode 100644 index 2b2360e5..00000000 --- a/app/assets/stylesheets/fixes.scss +++ /dev/null @@ -1,11 +0,0 @@ -/* - * These are temporary fixes and/or hacks for issues seen in prod. Every line here - * should be assumed temporary and with an inherit desire to remove it with something - * cleaner. - */ - -// For some reason, the latest materializecss hides checkboxes. This un-hides them. -input[type="checkbox"]:not(:checked), input[type="checkbox"]:checked { - position: inherit !important; - opacity: inherit !important; -} diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index c93db901..09deac81 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -60,10 +60,10 @@ %>
- <%= f.check_box :email_updates %> <%= f.label :email_updates do %> - We're always working to improve Notebook.ai. Please leave this box checked if you'd like to receive occasional updates about - what's new. + <%= f.check_box :email_updates %> + We're always working to improve Notebook.ai. Please leave this box checked if you'd like to receive occasional updates about + what's new. <% end %>
diff --git a/app/views/devise/registrations/panes/_preferences.html.erb b/app/views/devise/registrations/panes/_preferences.html.erb index 27f13d0c..7b60ba41 100644 --- a/app/views/devise/registrations/panes/_preferences.html.erb +++ b/app/views/devise/registrations/panes/_preferences.html.erb @@ -2,9 +2,9 @@

Your Notebook.ai design

- <%= f.check_box :fluid_preference %> <%= f.label :fluid_preference do %> - I want to use full-width Notebook.ai. Great for small screens, but not so much for very large ones. + <%= f.check_box :fluid_preference %> + I want to use full-width Notebook.ai. Great for small screens, but not so much for very large ones. <% end %>
@@ -14,9 +14,9 @@

Email preferences

- <%= f.check_box :email_updates %> <%= f.label :email_updates do %> - I want to receive occasional updates by email about new Notebook.ai features. + <%= f.check_box :email_updates %> + I want to receive occasional updates by email about new Notebook.ai features. <% end %>
diff --git a/app/views/devise/sessions/_form.html.erb b/app/views/devise/sessions/_form.html.erb index a97e885e..4712947a 100644 --- a/app/views/devise/sessions/_form.html.erb +++ b/app/views/devise/sessions/_form.html.erb @@ -13,17 +13,21 @@
+
<% if devise_mapping.rememberable? -%> - + <%= f.label :remember_me do %> <%= f.check_box :remember_me %> - <%= f.label :remember_me %> - + Remember me + <% end %> <% end -%> - <%= f.submit "Log in", class: 'btn blue' %> +
+
+ <%= f.submit "Log in", class: 'btn blue' %> +


<%= render "devise/shared/links" %>

-<% end %> \ No newline at end of file +<% end %> diff --git a/db/schema.rb b/db/schema.rb index 36e925bd..1f712673 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1958,7 +1958,6 @@ ActiveRecord::Schema.define(version: 2018_09_24_164517) do t.datetime "updated_at", null: false t.index ["messageboard_id"], name: "index_thredded_posts_on_messageboard_id" t.index ["moderation_state", "updated_at"], name: "index_thredded_posts_for_display" - t.index ["postable_id"], name: "index_thredded_posts_on_postable_id" t.index ["postable_id"], name: "index_thredded_posts_on_postable_id_and_postable_type" t.index ["user_id"], name: "index_thredded_posts_on_user_id" end