From ed2bcb56d778ae1872c2be783364ba0fd89005f8 Mon Sep 17 00:00:00 2001 From: Elia Schito Date: Wed, 29 Nov 2023 13:10:31 +0100 Subject: [PATCH] Move the feedback link to the bottom of the page --- .../layout/feedback/component.html.erb | 26 +++++++++++-------- .../layout/feedback/component.yml | 2 +- .../solidus_admin/layout/page_helpers.rb | 4 +-- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/admin/app/components/solidus_admin/layout/feedback/component.html.erb b/admin/app/components/solidus_admin/layout/feedback/component.html.erb index a22267c44cd..4ce8d630bc4 100644 --- a/admin/app/components/solidus_admin/layout/feedback/component.html.erb +++ b/admin/app/components/solidus_admin/layout/feedback/component.html.erb @@ -1,11 +1,15 @@ - -<%= render component("ui/button").new( - tag: :a, - text: t(".give_feedback"), - href: "https://solidus.io/feedback?category=solidus-admin", - icon: "feedback-line", - scheme: :secondary, - target: :_blank, -) %> +<%= link_to( + "https://solidus.io/feedback?category=solidus-admin", + class: 'whitespace-nowrap flex flex-col items-center gap-2 text-gray-500 text-small hover:text-black', + target: '_blank', +) do %> + + + <%= render component("ui/badge").new(name: "beta", size: :s, color: :blue) %> + <%= t(".give_feedback") %> + + + + <%= t(".feedback_description_html") %> + +<% end %> diff --git a/admin/app/components/solidus_admin/layout/feedback/component.yml b/admin/app/components/solidus_admin/layout/feedback/component.yml index 7cea13f36b8..4a4bd690d0f 100644 --- a/admin/app/components/solidus_admin/layout/feedback/component.yml +++ b/admin/app/components/solidus_admin/layout/feedback/component.yml @@ -2,4 +2,4 @@ # Use the translation in the example in your template with `t(".hello")`. en: give_feedback: 'Give feedback' - feedback_description: 'We are constantly trying to improve. Please let us know what you think about this admin page.' + feedback_description_html: 'We are constantly trying to improve.
Please let us know what you think about this admin page.' diff --git a/admin/app/components/solidus_admin/layout/page_helpers.rb b/admin/app/components/solidus_admin/layout/page_helpers.rb index bd196e59b1d..8327aa668ed 100644 --- a/admin/app/components/solidus_admin/layout/page_helpers.rb +++ b/admin/app/components/solidus_admin/layout/page_helpers.rb @@ -2,12 +2,12 @@ module SolidusAdmin::Layout::PageHelpers def page(**attrs, &block) - tag.div(capture(&block), class: "px-4 relative", "data-controller": stimulus_id, **attrs) + tag.div(capture(&block), class: "px-4 relative", "data-controller": stimulus_id, **attrs) + + tag.div(render(component("layout/feedback").new), class: "flex justify-center py-10") end def page_header_actions(&block) tag.div(safe_join([ - render(component("layout/feedback").new), capture(&block), ]), class: "flex gap-2 items-center") end