Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use Octicons in submenu

Henriette Darge3056387501b1
diff --git a/app/components/open_project/common/submenu_component.html.erb b/app/components/open_project/common/submenu_component.html.erb
index cda24f1dd8c..b3d1ea95b78 100644
--- a/app/components/open_project/common/submenu_component.html.erb
+++ b/app/components/open_project/common/submenu_component.html.erb
@@ -33,12 +33,15 @@
<% selected = menu_item.selected ? 'selected' : '' %>
<a class="op-sidemenu--item-action <%= selected %>" href="<%= menu_item.href %>" data-test-selector="op-sidemenu--item-action">
<% if menu_item.icon %>
- <span class="op-sidemenu--item-icon icon-<%= menu_item.icon %>"></span>
- <% end %>
- <span class="op-sidemenu--item-title"><%= menu_item.title %></span>
- <% if menu_item.show_enterprise_icon %>
- <%= render Primer::Beta::Octicon.new(icon: "op-enterprise-addons", "aria-label": "TODO", classes: "upsale-colored", ml: 2) %>
+ <%= render Primer::Beta::Octicon.new(icon: menu_item.icon, classes: "op-sidemenu--item-icon", mr: 2) %>
<% end %>
+ <span class="op-sidemenu--item-title">
+ <%= menu_item.title %>
+
+ <% if menu_item.show_enterprise_icon %>
+ <%= render Primer::Beta::Octicon.new(icon: "op-enterprise-addons", "aria-label": I18n.t(:label_enterprise_edition), classes: "upsale-colored", ml: 2) %>
+ <% end %>
+ </span>
<% if menu_item.count %>
<span class="op-bubble op-bubble_alt_highlighting" data-test-selector="op-sidemenu--item-count"><%= menu_item.count %></span>
@@ -72,16 +75,19 @@
<% selected = child_item.selected ? 'selected' : '' %>
<a class="op-sidemenu--item-action <%= selected %>" href="<%= child_item.href %>" data-test-selector="op-sidemenu--item-action">
<% if child_item.icon %>
- <span class="op-sidemenu--item-icon icon-<%= child_item.icon %>"></span>
+ <%= render Primer::Beta::Octicon.new(icon: child_item.icon, classes: "op-sidemenu--item-icon", mr: 2) %>
<% end %>
- <span class="op-sidemenu--item-title"><%= child_item.title %></span>
+ <span class="op-sidemenu--item-title">
+ <%= child_item.title %>
- <% if child_item.show_enterprise_icon %>
- <%= render Primer::Beta::Octicon.new(icon: "op-enterprise-addons", "aria-label": "TODO", classes: "upsale-colored", ml: 2) %>
- <% end %>
- <% if child_item.favored %>
- <%= render Primer::Beta::Octicon.new(icon: "star-fill", "aria-label": I18n.t(:label_favorite), classes: %w[op-sidemenu--item-mark op-primer--star-icon]) %>
- <% end %>
+ <% if child_item.show_enterprise_icon %>
+ <%= render Primer::Beta::Octicon.new(icon: "op-enterprise-addons", "aria-label": I18n.t(:label_enterprise_edition), classes: "upsale-colored", ml: 2) %>
+ <% end %>
+
+ <% if child_item.favored %>
+ <%= render Primer::Beta::Octicon.new(icon: "star-fill", "aria-label": I18n.t(:label_favorite), classes: %w[op-sidemenu--item-mark op-primer--star-icon], ml: 2) %>
+ <% end %>
+ </span>
<% if child_item.count %>
<span class="op-bubble op-bubble_alt_highlighting" data-test-selector="op-sidemenu--item-count"><%= child_item.count %></span>
diff --git a/app/menus/notifications/menu.rb b/app/menus/notifications/menu.rb
index 9a7f402edbe..02a2cfe973b 100644
--- a/app/menus/notifications/menu.rb
+++ b/app/menus/notifications/menu.rb
@@ -124,10 +124,11 @@ module Notifications
def icon_map
{
"mentioned" => :mention,
- "responsible" => :accountable,
- "watched" => :watching,
- "shared" => :share,
- "dateAlert" => :"date-alert"
+ "assigned" => :"op-person-assigned",
+ "responsible" => :"op-person-accountable",
+ "watched" => :eye,
+ "shared" => :"share-android",
+ "dateAlert" => :"op-calendar-alert"
}
end
diff --git a/frontend/src/global_styles/content/_sidemenu.sass b/frontend/src/global_styles/content/_sidemenu.sass
index 019ef72b898..a89ce71a616 100644
--- a/frontend/src/global_styles/content/_sidemenu.sass
+++ b/frontend/src/global_styles/content/_sidemenu.sass
@@ -46,16 +46,10 @@
padding-left: 12px
&--item-title
+ flex-grow: 1
display: inline-block
overflow: hidden
text-overflow: ellipsis
white-space: nowrap
line-height: 30px
text-decoration: none
-
- &--item-icon
- font-size: 24px
- margin-right: 8px
-
- &--item-mark
- margin-left: 8px