From a97130934a79ccb4d81a71f8132f4cdaec89eb5d Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 28 Jun 2017 13:40:37 +0200 Subject: [PATCH 1/3] fixes text on publish comment button --- app/views/legislation/annotations/_form.html.erb | 4 +--- spec/features/legislation/draft_versions_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/legislation/annotations/_form.html.erb b/app/views/legislation/annotations/_form.html.erb index 2c6cee9cd..369d0d691 100644 --- a/app/views/legislation/annotations/_form.html.erb +++ b/app/views/legislation/annotations/_form.html.erb @@ -16,9 +16,7 @@
<%= t('legislation.annotations.comments.cancel') %> - <%= f.submit class: 'button publish-comment' do %> - <%= t('legislation.annotations.comments.publish_comment') %> - <% end %> + <%= f.submit value: t('legislation.annotations.comments.publish_comment'), class: 'button publish-comment' %>
<%= f.hidden_field :quote %> diff --git a/spec/features/legislation/draft_versions_spec.rb b/spec/features/legislation/draft_versions_spec.rb index c70a8f1a3..f0a798b85 100644 --- a/spec/features/legislation/draft_versions_spec.rb +++ b/spec/features/legislation/draft_versions_spec.rb @@ -154,11 +154,11 @@ feature 'Legislation Draft Versions' do page.find(:css, ".legislation-annotatable").double_click page.find(:css, ".annotator-adder button").click - page.click_button "Create Annotation" + page.click_button "Publish Comment" expect(page).to have_content "Comment can't be blank" fill_in 'legislation_annotation_text', with: 'this is my annotation' - page.click_button "Create Annotation" + page.click_button "Publish Comment" expect(page).to have_css ".annotator-hl" first(:css, ".annotator-hl").click From ef1a416b50a02feb64ef2264058502bea916ffe1 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 28 Jun 2017 13:40:44 +0200 Subject: [PATCH 2/3] improves color palette for annotation weights --- .../stylesheets/annotator_overrides.scss | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/annotator_overrides.scss b/app/assets/stylesheets/annotator_overrides.scss index 9bf27f22c..eb01c0691 100644 --- a/app/assets/stylesheets/annotator_overrides.scss +++ b/app/assets/stylesheets/annotator_overrides.scss @@ -102,27 +102,27 @@ .annotator-hl { cursor: pointer; - background: rgba(255, 255, 10, 0.2); -} + background: rgba(255, 249, 218, 0.75); -.annotator-hl.weight-1 { - background: #fff9da; -} + &.weight-1 { + background: #fff9da; + } -.annotator-hl.weight-2 { - background: #fff5bc; -} + &.weight-2 { + background: #f4f7be; + } -.annotator-hl.weight-3 { - background: #fff1a2; -} + &.weight-3 { + background: #fff5b2; + } -.annotator-hl.weight-4 { - background: #ffef8c; -} + &.weight-4 { + background: #f9e784; + } -.annotator-hl.weight-5 { - background: #ffe95f; + &.weight-5 { + background: #eec643; + } } .current-annotation { From fe069b6be952a51e08fec23832658cbe2640e066 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 28 Jun 2017 16:33:02 +0200 Subject: [PATCH 3/3] changes hex to hsla colors --- .../stylesheets/annotator_overrides.scss | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/annotator_overrides.scss b/app/assets/stylesheets/annotator_overrides.scss index eb01c0691..c2cbe68ff 100644 --- a/app/assets/stylesheets/annotator_overrides.scss +++ b/app/assets/stylesheets/annotator_overrides.scss @@ -105,23 +105,43 @@ background: rgba(255, 249, 218, 0.75); &.weight-1 { - background: #fff9da; + background: hsla(50, 100, 93, 0.5); + + .weight-1 { + background: hsla(50, 100, 93, 0.75); + } } &.weight-2 { - background: #f4f7be; + background: hsla(63, 78, 86, 0.5); + + .weight-2 { + background: hsla(63, 78, 86, 0.75); + } } &.weight-3 { - background: #fff5b2; + background: hsla(52, 100, 85, 0.5); + + .weight-3 { + background: hsla(52, 100, 85, 0.75); + } } &.weight-4 { - background: #f9e784; + background: hsla(51, 91, 75, 0.5); + + .weight-4 { + background: hsla(51, 91, 75, 0.75); + } } &.weight-5 { - background: #eec643; + background: hsla(46, 83, 60, 0.5); + + .weight-5 { + background: hsla(46, 83, 60, 0.5); + } } }