Skip to content

Commit

Permalink
Fix sidebar width errors
Browse files Browse the repository at this point in the history
  • Loading branch information
caiohsramos committed Mar 12, 2024
1 parent 0a234c0 commit 427c5be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/views/feeds/unread_list.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= turbo_frame_tag :unread_list do %>
<ul class="menu text-xs pl-0" data-turbo-prefetch="false">
<ul class="menu w-72 menu-xs px-0" data-turbo-prefetch="false">
<%= render 'sidebar/navigation_item' %>
<%= render partial: 'sidebar/navigation_item', collection: @sidebar_folders, as: :navigation_item %>
<%= render partial: 'sidebar/navigation_item', collection: @sidebar_unfoldered_feeds, as: :navigation_item %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/sidebar/_manage.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ul class="menu bg-base-300 rounded-box w-full">
<ul class="menu w-72 bg-base-300 rounded-box">
<li>
<h2 class="menu-title">Folders</h2>
<ul>
Expand Down
12 changes: 5 additions & 7 deletions app/views/sidebar/_navigation_item.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%# locals: (navigation_item: nil, **) -%>
<% if navigation_item.blank? %>
<li class="py-2" id='all-list-item'>
<%= link_to root_path, data: { hotkeys_target: 'navigationItem', turbo_frame: :content, turbo_action: :advance }, class: class_names('flex', 'justify-between', { active: @settings.selection.blank? }) do %>
<%= link_to root_path, data: { hotkeys_target: 'navigationItem', turbo_frame: :content, turbo_action: :advance }, class: class_names({ active: @settings.selection.blank? }) do %>
All feeds
<% if render_badges?(@settings.filter) %>
<div class="badge"><%= @sidebar_metrics.send(@settings.filter).all %></div>
Expand All @@ -10,12 +10,10 @@
</li>
<% elsif render_navigation_item?(navigation_item, @sidebar_metrics, @settings.selection, @settings.filter) %>
<li class="py-2" id="<%= dom_id(navigation_item, :navigation_item) %>">
<%= link_to navigation_item, data: { hotkeys_target: 'navigationItem', turbo_frame: :content, turbo_action: :advance }, class: class_names('flex', 'justify-between', { active: navigation_item == @settings.selection, 'border border-error' => navigation_item.try(:refresh_state)&.error? }) do %>
<div class='flex gap-2 items-center'>
<%= render 'icons/chevron-down' if navigation_item.respond_to?(:feeds) %>
<%= image_tag feed_icon_path(navigation_item), size: '16x16', alt: navigation_item.title, class: 'h-4' if navigation_item.try(:icon).present? %>
<%= navigation_item.title %>
</div>
<%= link_to navigation_item, data: { hotkeys_target: 'navigationItem', turbo_frame: :content, turbo_action: :advance }, class: class_names({ active: navigation_item == @settings.selection, 'border border-error' => navigation_item.try(:refresh_state)&.error? }) do %>
<%= render 'icons/chevron-down' if navigation_item.respond_to?(:feeds) %>
<%= image_tag feed_icon_path(navigation_item), size: '16x16', alt: navigation_item.title, class: 'h-4' if navigation_item.try(:icon).present? %>
<p class="min-w-0 truncate"><%= navigation_item.title %></p>
<% if render_badges?(@settings.filter) %>
<div class="badge"><%= badge_for(navigation_item, @sidebar_metrics, @settings.filter) %></div>
<% end %>
Expand Down

0 comments on commit 427c5be

Please sign in to comment.