Skip to content
Open
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
3 changes: 2 additions & 1 deletion app/assets/stylesheets/css/components/ui/dropdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
}

.dropdown-menu__item:focus-visible,
.dropdown-menu__list > :is(a, button):focus-visible {
.dropdown-menu__list > :is(a, button):focus-visible,
.dropdown-menu__list form > :is(a, button):focus-visible {
@apply ring-2 ring-inset ring-info-foreground bg-primary outline-none;
}

Expand Down
5 changes: 5 additions & 0 deletions app/assets/stylesheets/css/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@
@apply flex w-full;
}

.sidebar-profile__dropdown {
@apply max-w-[60vw] sm:max-w-[40vw];
position-area: top span-left;
}

/* Menu rows inherit the dropdown row layout — override text size and,
for sign-out, the danger color + hover. */
.sidebar-profile__menu-item,
Expand Down
4 changes: 2 additions & 2 deletions app/components/avo/profile_item_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
method: method,
disabled: disabled,
params: params do %>
<%= helpers.svg(icon, class: 'sidebar-icon') if icon.present? %> <%= label %>
<%= helpers.svg(icon, class: 'sidebar-icon') if icon.present? %> <span class="truncate min-w-0"><%= label %></span>
<% end %>
<% else %>
<%= link_to path,
class: menu_item_classes,
target: target,
title: title do %>
<%= helpers.svg(icon, class: 'sidebar-icon') if icon.present? %> <%= label %>
<%= helpers.svg(icon, class: 'sidebar-icon') if icon.present? %> <span class="truncate min-w-0"><%= label %></span>
<% end %>
<% end %>
2 changes: 1 addition & 1 deletion app/components/avo/sidebar_profile_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
</div>
<div class="sidebar-profile__actions">
<%= render Avo::UI::DropdownComponent.new(popover_mode: true) do |component| %>
<%= render Avo::UI::DropdownComponent.new(popover_mode: true, classes: "sidebar-profile__dropdown") do |component| %>
<% component.with_trigger do %>
<%= render Avo::ButtonComponent.new(
icon: "tabler/outline/dots",
Expand Down
6 changes: 4 additions & 2 deletions app/views/avo/partials/_profile_menu_extra.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
<%# Example link below %>
<%#= render Avo::ProfileItemComponent.new label: 'Profile', path: '/profile', icon: 'user-circle' %>
<%#= render Avo::ProfileItemComponent.new label: "HQ", path: "https://avohq.io", icon: "tabler/outline/building", target: :_blank %>
<%#= render Avo::ProfileItemComponent.new label: "Pricing", path: "https://avohq.io/pricing", icon: "tabler/outline/tag", target: :_blank %>
<%#= render Avo::ProfileItemComponent.new label: "Blog", path: "https://avohq.io/blog", icon: "tabler/outline/notebook", target: :_blank %>
<%#= render Avo::ProfileItemComponent.new label: "Releases", path: "https://avohq.io/releases", icon: "tabler/outline/rocket", target: :_blank %>
Loading