From 53faa8124285aeab81fdd64b371000e9ad75c625 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 21 Dec 2023 11:47:29 +1100 Subject: [PATCH 1/8] Merge pull request #825 from nla/release-please--branches--main--components--nla-blacklight chore(main): release 2.11.1 --- app/components/feedback_component.html.erb | 1 + app/helpers/application_helper.rb | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/app/components/feedback_component.html.erb b/app/components/feedback_component.html.erb index 3cdfb62b..42df34b4 100644 --- a/app/components/feedback_component.html.erb +++ b/app/components/feedback_component.html.erb @@ -4,6 +4,7 @@ diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8662241d..0a3c796e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -65,6 +65,15 @@ def error_feedback_url(id) end end + def culturally_sensitive_url(id) + url = ENV.fetch("CULTURALLY_SENSITIVE_URL", "#") + if url != "#" + "#{url}&qnudftb17=#{request.original_url}&qnudftb11=#{id}" + else + url + end + end + # Used to find users who have made too many requests to a resource def log_eresources_offsite_access(url) message = if current_user.present? From 0855e5bb5889090ad6ad43931243ecbc0c40126c Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Fri, 22 Dec 2023 10:45:55 +1100 Subject: [PATCH 2/8] Merge pull request #825 from nla/release-please--branches--main--components--nla-blacklight chore(main): release 2.11.1 --- .env.development | 1 + .env.test | 1 + app/assets/images/message-stick.svg | 12 ++++++++++++ app/components/feedback_component.html.erb | 4 +++- config/locales/en.yml | 2 +- spec/components/feedback_component_spec.rb | 6 ++++++ 6 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 app/assets/images/message-stick.svg diff --git a/.env.development b/.env.development index 10f3be0c..6f709eac 100644 --- a/.env.development +++ b/.env.development @@ -66,6 +66,7 @@ THUMBNAIL_SERVICE_API_BASE_URL="define THUMBNAIL_SERVICE_API_BASE_URL" # Feedback FEEDBACK_ERROR_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error +CULTURALLY_SENSITIVE_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error # Patron Keycloak migration PATRON_UPGRADE_URL="define PATRON_UPGRADE_URL" diff --git a/.env.test b/.env.test index e90b648a..7e9a29ec 100644 --- a/.env.test +++ b/.env.test @@ -46,6 +46,7 @@ THUMBNAIL_SERVICE_API_BASE_URL=http://thumbservices.test # Feedback FEEDBACK_ERROR_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error +CULTURALLY_SENSITIVE_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error # Patron Keycloak migration PATRON_UPGRADE_URL=https://test.nla.gov.au/patron/upgrade diff --git a/app/assets/images/message-stick.svg b/app/assets/images/message-stick.svg new file mode 100644 index 00000000..17bf40f9 --- /dev/null +++ b/app/assets/images/message-stick.svg @@ -0,0 +1,12 @@ + + + message-stick-16px + + + + + + + + + \ No newline at end of file diff --git a/app/components/feedback_component.html.erb b/app/components/feedback_component.html.erb index 42df34b4..77a04ea4 100644 --- a/app/components/feedback_component.html.erb +++ b/app/components/feedback_component.html.erb @@ -4,7 +4,9 @@ diff --git a/config/locales/en.yml b/config/locales/en.yml index 2b838fa2..574998b5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -230,4 +230,4 @@ en: feedback: title: "Feedback" report_error: "Report an error" - culturally_sensitive: "Report culturally sensitive content" + culturally_sensitive: "Report culturally sensitive item" diff --git a/spec/components/feedback_component_spec.rb b/spec/components/feedback_component_spec.rb index 4c797a65..b5bb231c 100644 --- a/spec/components/feedback_component_spec.rb +++ b/spec/components/feedback_component_spec.rb @@ -8,4 +8,10 @@ expect(rendered_content).to have_link(I18n.t("feedback.report_error")) end + + it "renders the culturally sensitive item reporting link" do + render_inline(described_class.new("123")) + + expect(rendered_content).to have_link(I18n.t("feedback.culturally_sensitive")) + end end From ccc5d9f77307b252b282124ee9f4694c0d686c94 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 21 Dec 2023 11:47:29 +1100 Subject: [PATCH 3/8] Merge pull request #825 from nla/release-please--branches--main--components--nla-blacklight chore(main): release 2.11.1 --- app/components/feedback_component.html.erb | 1 + app/helpers/application_helper.rb | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/app/components/feedback_component.html.erb b/app/components/feedback_component.html.erb index 3cdfb62b..42df34b4 100644 --- a/app/components/feedback_component.html.erb +++ b/app/components/feedback_component.html.erb @@ -4,6 +4,7 @@
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8662241d..0a3c796e 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -65,6 +65,15 @@ def error_feedback_url(id) end end + def culturally_sensitive_url(id) + url = ENV.fetch("CULTURALLY_SENSITIVE_URL", "#") + if url != "#" + "#{url}&qnudftb17=#{request.original_url}&qnudftb11=#{id}" + else + url + end + end + # Used to find users who have made too many requests to a resource def log_eresources_offsite_access(url) message = if current_user.present? From 4038c717f9a1889bcf918c66335b138994f15972 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Fri, 22 Dec 2023 10:45:55 +1100 Subject: [PATCH 4/8] Merge pull request #825 from nla/release-please--branches--main--components--nla-blacklight chore(main): release 2.11.1 --- .env.development | 1 + .env.test | 1 + app/assets/images/message-stick.svg | 12 ++++++++++++ app/components/feedback_component.html.erb | 4 +++- config/locales/en.yml | 2 +- spec/components/feedback_component_spec.rb | 6 ++++++ 6 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 app/assets/images/message-stick.svg diff --git a/.env.development b/.env.development index 480c21f3..d02df166 100644 --- a/.env.development +++ b/.env.development @@ -69,6 +69,7 @@ THUMBNAIL_SERVICE_API_BASE_URL="define THUMBNAIL_SERVICE_API_BASE_URL" # Feedback FEEDBACK_ERROR_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error +CULTURALLY_SENSITIVE_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error # 2FA registration EMAIL_2FA_REGISTRATION_URL="define EMAIL_2FA_REGISTRATION_URL" diff --git a/.env.test b/.env.test index 4576c3ba..a22b6f68 100644 --- a/.env.test +++ b/.env.test @@ -46,6 +46,7 @@ THUMBNAIL_SERVICE_API_BASE_URL=http://thumbservices.test # Feedback FEEDBACK_ERROR_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error +CULTURALLY_SENSITIVE_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error # Copyright COPYRIGHT_SERVICE_URL=https://test.nla.gov.au/copyright/ diff --git a/app/assets/images/message-stick.svg b/app/assets/images/message-stick.svg new file mode 100644 index 00000000..17bf40f9 --- /dev/null +++ b/app/assets/images/message-stick.svg @@ -0,0 +1,12 @@ + + + message-stick-16px + + + + + + + + + \ No newline at end of file diff --git a/app/components/feedback_component.html.erb b/app/components/feedback_component.html.erb index 42df34b4..77a04ea4 100644 --- a/app/components/feedback_component.html.erb +++ b/app/components/feedback_component.html.erb @@ -4,7 +4,9 @@
diff --git a/config/locales/en.yml b/config/locales/en.yml index d45944d2..2a060ef3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -246,4 +246,4 @@ en: feedback: title: "Feedback" report_error: "Report an error" - culturally_sensitive: "Report culturally sensitive content" + culturally_sensitive: "Report culturally sensitive item" diff --git a/spec/components/feedback_component_spec.rb b/spec/components/feedback_component_spec.rb index 4c797a65..b5bb231c 100644 --- a/spec/components/feedback_component_spec.rb +++ b/spec/components/feedback_component_spec.rb @@ -8,4 +8,10 @@ expect(rendered_content).to have_link(I18n.t("feedback.report_error")) end + + it "renders the culturally sensitive item reporting link" do + render_inline(described_class.new("123")) + + expect(rendered_content).to have_link(I18n.t("feedback.culturally_sensitive")) + end end From acafd559fe1cc58bcd0537fb48f2b167aa26f004 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 08:45:18 +1100 Subject: [PATCH 5/8] Add cultural sensitive feedback button --- .env.development | 2 +- .env.staging | 3 +++ .env.test | 2 +- app/components/feedback_component.html.erb | 25 +++++++++++++++++++--- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index d02df166..9e9c42fb 100644 --- a/.env.development +++ b/.env.development @@ -69,7 +69,7 @@ THUMBNAIL_SERVICE_API_BASE_URL="define THUMBNAIL_SERVICE_API_BASE_URL" # Feedback FEEDBACK_ERROR_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error -CULTURALLY_SENSITIVE_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error +CULTURALLY_SENSITIVE_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Cultural_Feedback&qnudftb17=https://catalogue.nla.gov.au/catalog/1698874 # 2FA registration EMAIL_2FA_REGISTRATION_URL="define EMAIL_2FA_REGISTRATION_URL" diff --git a/.env.staging b/.env.staging index 84d50506..09926e91 100644 --- a/.env.staging +++ b/.env.staging @@ -70,5 +70,8 @@ EMAIL_2FA_REGISTRATION_REDIRECT_URL="define EMAIL_2FA_REGISTRATION_REDIRECT_URL" EMAIL_2FA_ACTION="define EMAIL_2FA_ACTION" ABOUT_2FA_URL=https://www.library.gov.au/research/start-researching/get-started-catalogue/two-factor-authentication +# Feedback +CULTURALLY_SENSITIVE_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Cultural_Feedback&qnudftb17=https://catalogue.nla.gov.au/catalog/1698874 + # disable functionality during FOLIO updates FOLIO_UPDATE_IN_PROGRESS= diff --git a/.env.test b/.env.test index a22b6f68..bb4989e5 100644 --- a/.env.test +++ b/.env.test @@ -46,7 +46,7 @@ THUMBNAIL_SERVICE_API_BASE_URL=http://thumbservices.test # Feedback FEEDBACK_ERROR_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error -CULTURALLY_SENSITIVE_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Report_an_error +CULTURALLY_SENSITIVE_URL=https://reftracker.nla.gov.au/reft100.aspx?key=Cultural_Feedback&qnudftb17=https://catalogue.nla.gov.au/catalog/1698874 # Copyright COPYRIGHT_SERVICE_URL=https://test.nla.gov.au/copyright/ diff --git a/app/components/feedback_component.html.erb b/app/components/feedback_component.html.erb index 77a04ea4..953f386c 100644 --- a/app/components/feedback_component.html.erb +++ b/app/components/feedback_component.html.erb @@ -2,11 +2,30 @@

<%= t("feedback.title") %>

    + + <%#= link_to t("feedback.report_error"), helpers.error_feedback_url(@id) %> + <%#= link_to helpers.culturally_sensitive_url(@id) do %> + <%#= image_tag "message-stick.svg", width: "16", height: "16", alt: "Message stick", aria: {hidden: true} %> <%#= t("feedback.culturally_sensitive") %> + <%# end %> + +
From 051246d14a09baf806a2371c3175c2e1bd120599 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 09:01:07 +1100 Subject: [PATCH 6/8] cleanup component, remove unused svg --- app/assets/images/message-stick.svg | 12 ------------ app/components/feedback_component.html.erb | 8 -------- 2 files changed, 20 deletions(-) delete mode 100644 app/assets/images/message-stick.svg diff --git a/app/assets/images/message-stick.svg b/app/assets/images/message-stick.svg deleted file mode 100644 index 17bf40f9..00000000 --- a/app/assets/images/message-stick.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - message-stick-16px - - - - - - - - - \ No newline at end of file diff --git a/app/components/feedback_component.html.erb b/app/components/feedback_component.html.erb index 953f386c..b46cc553 100644 --- a/app/components/feedback_component.html.erb +++ b/app/components/feedback_component.html.erb @@ -2,16 +2,8 @@

<%= t("feedback.title") %>

From e282ac2a0c189a0015f1846bd190932c512449f0 Mon Sep 17 00:00:00 2001 From: CEdwardsBlasikiewicz Date: Thu, 12 Dec 2024 11:25:59 +1100 Subject: [PATCH 8/8] Fix up issues --- .env.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.test b/.env.test index 27284716..3057cdc0 100644 --- a/.env.test +++ b/.env.test @@ -29,7 +29,7 @@ CATALOGUE_SEARCH_URL=http://test.host/catalog.json FINDING_AIDS_SEARCH_URL=http://test.host/finding-aids/catalog.json EBSCO_SEARCH_URL=https://search.ebscohost.com/login.aspx?authtype=ip,guest&groupid=main&profile=eds&direct=true -GLOBAL_MESSAGE_URL="define GLOBAL_MESSAGE_URL" +GLOBAL_MESSAGE_URL=http://test.nla.gov.au/catalogue-message/1234 NATIONAL_LIBRARY_CARD_URL="https://www.library.gov.au/research/join-library" ASK_LIBRARIAN_URL=https://www.library.gov.au/services/ask-librarian