Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[admin] Move the feedback link to the bottom of the page #5524

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Move the feedback link to the bottom of the page
  • Loading branch information
elia committed Nov 29, 2023
commit ed2bcb56d778ae1872c2be783364ba0fd89005f8
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
<span class="max-w-xs text-xs text-right text-gray-600 hidden lg:block">
<%= t(".feedback_description") %>
</span>
<%= 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 %>

<span>
<%= render component("ui/badge").new(name: "beta", size: :s, color: :blue) %>
<span class="underline"><%= t(".give_feedback") %></span>
</span>

<span class="body-small text-center">
<%= t(".feedback_description_html") %>
</span>
<% end %>
Original file line number Diff line number Diff line change
Expand Up @@ -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. <br>Please let us know what you think about this admin page.'
4 changes: 2 additions & 2 deletions admin/app/components/solidus_admin/layout/page_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading