Inline anemic partials

This commit is contained in:
David Heinemeier Hansson
2025-11-08 16:58:02 +01:00
parent 882cff885c
commit 0edfc337c9
7 changed files with 37 additions and 38 deletions
-1
View File
@@ -1 +0,0 @@
<%= turbo_frame_tag Current.identity, :account_menu, src: session_menu_url(script_name: nil, menu_section: true, without: ApplicationRecord.current_tenant) %>
-8
View File
@@ -1,8 +0,0 @@
<%= tag.button class:"nav__trigger input input--select center flex-inline align-center txt-normal",
data: {
action: "click->dialog#open:stop keydown.j@document->hotkey#click keydown.meta+j@document->hotkey#click keydown.ctrl+j@document->hotkey#click",
controller: "hotkey" } do %>
<span><%= image_tag "logo.png" %></span>
<strong class="txt-medium overflow-ellipsis margin-none">Fizzy</strong>
<kbd class="kbd txt-xx-small margin-inline-start hide-on-touch">J</kbd>
<% end %>
-3
View File
@@ -1,3 +0,0 @@
<footer class="nav__footer">
Fizzy&trade; is designed, built, and backed by <strong class="txt-nowrap"><%= icon_tag "37signals", class: "v-align-middle" %> <a href="https://37signals.com" target="_blank" class="txt-ink">37signals&trade;</a></strong>
</footer>
-8
View File
@@ -1,8 +0,0 @@
<div class="nav__hotkeys margin-block-end-half" role="list">
<%= filter_hotkey_link "Home", root_path, 1, "home" %>
<%= filter_hotkey_link "Assigned to me", cards_path(assignee_ids: [Current.user.id]), 2, "clipboard" %>
<%= filter_hotkey_link "Added by me", cards_path(creator_ids: [Current.user.id]), 3, "person-add" %>
<%= filter_hotkey_link "Notifications", notifications_path, 4, "bell" %>
<%= filter_hotkey_link "My Profile", user_path(Current.user), 5, "person" %>
<%= filter_hotkey_link "Settings", account_settings_path, 6, "settings" %>
</div>
+7 -1
View File
@@ -1,5 +1,11 @@
<nav class="nav" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside" data-turbo-permanent>
<%= render "my/menus/button" %>
<%= tag.button class:"nav__trigger input input--select center flex-inline align-center txt-normal", data: {
action: "click->dialog#open:stop keydown.j@document->hotkey#click keydown.meta+j@document->hotkey#click keydown.ctrl+j@document->hotkey#click",
controller: "hotkey" } do %>
<span><%= image_tag "logo.png" %></span>
<strong class="txt-medium overflow-ellipsis margin-none">Fizzy</strong>
<kbd class="kbd txt-xx-small margin-inline-start hide-on-touch">J</kbd>
<% end %>
<%= tag.dialog class: "nav__menu filter popup popup--animated panel margin-block-start-half", data: {
action: "turbo:before-cache@document->dialog#close keydown->navigable-list#navigate filter:changed->navigable-list#reset filter:changed->nav-section-expander#showWhileFiltering toggle->filter#filter",
-13
View File
@@ -1,13 +0,0 @@
<%= collapsible_nav_section "Jump to…" do %>
<%= filter_place_menu_item account_settings_path, "Account Settings", "settings" %>
<%= filter_place_menu_item user_path(Current.user), "My Profile", "person" %>
<%= filter_place_menu_item notifications_path, "Notifications", "bell" %>
<%= filter_place_menu_item notifications_settings_path, "Notification Settings", "settings" %>
<%= tag.li class: "popup__item", data: { filter_target: "item", navigable_list_target: "item" } do %>
<%= icon_tag "logout", class: "popup__icon" %>
<%= button_to session_url(script_name: nil), method: :delete, class: "popup__btn btn", data: { turbo: false } do %>
<span>Sign out</span>
<% end %>
<% end %>
<% end %>
+30 -4
View File
@@ -8,12 +8,38 @@
</button>
</div>
<%= render "hotkeys" %>
<div class="nav__hotkeys margin-block-end-half" role="list">
<%= filter_hotkey_link "Home", root_path, 1, "home" %>
<%= filter_hotkey_link "Assigned to me", cards_path(assignee_ids: [Current.user.id]), 2, "clipboard" %>
<%= filter_hotkey_link "Added by me", cards_path(creator_ids: [Current.user.id]), 3, "person-add" %>
<%= filter_hotkey_link "Notifications", notifications_path, 4, "bell" %>
<%= filter_hotkey_link "My Profile", user_path(Current.user), 5, "person" %>
<%= filter_hotkey_link "Settings", account_settings_path, 6, "settings" %>
</div>
<%= render "saved_filter", filters: @filters %>
<%= render "boards", boards: @boards %>
<%= render "tags", tags: @tags %>
<%= render "users", users: @users %>
<%= render "places" %>
<%= render "accounts" %>
<%= render "footer" %>
<%= collapsible_nav_section "Jump to…" do %>
<%= filter_place_menu_item account_settings_path, "Account Settings", "settings" %>
<%= filter_place_menu_item user_path(Current.user), "My Profile", "person" %>
<%= filter_place_menu_item notifications_path, "Notifications", "bell" %>
<%= filter_place_menu_item notifications_settings_path, "Notification Settings", "settings" %>
<%= tag.li class: "popup__item", data: { filter_target: "item", navigable_list_target: "item" } do %>
<%= icon_tag "logout", class: "popup__icon" %>
<%= button_to session_url(script_name: nil), method: :delete, class: "popup__btn btn", data: { turbo: false } do %>
<span>Sign out</span>
<% end %>
<% end %>
<% end %>
<%= turbo_frame_tag Current.identity, :account_menu,
src: session_menu_url(script_name: nil, menu_section: true, without: ApplicationRecord.current_tenant) %>
<footer class="nav__footer">
Fizzy&trade; is designed, built, and backed by <strong class="txt-nowrap"><%= icon_tag "37signals", class: "v-align-middle" %> <a href="https://37signals.com" target="_blank" class="txt-ink">37signals&trade;</a></strong>
</footer>
<% end %>