Skip to content

Commit

Permalink
Replaces dropdown-menu-right with dropdown-menu-end (#3594)
Browse files Browse the repository at this point in the history
  • Loading branch information
HazelGrant authored Jun 12, 2024
1 parent d177729 commit 0951366
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions apps/dashboard/app/views/active_jobs/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span id="selected-filter-label"></span> <span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<ul class="dropdown-menu dropdown-menu-end">
<% filters.each do |filter| %>
<%= '<li class="divider"></li>'.html_safe if filter == filters.last %>
<li id="filter-id-<%= filter.filter_id %>" onclick="set_filter_id('<%= filter.filter_id %>');">
Expand All @@ -19,7 +19,7 @@
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span id="selected-cluster-label"></span> <span class="caret"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right">
<ul class="dropdown-menu dropdown-menu-end">
<% OODClusters.sort_by {|cluster| cluster.metadata.title || cluster.id.to_s.titleize }.each do |cluster| %>
<li id="cluster-id-<%= cluster.id %>" onclick="set_cluster_id('<%= cluster.id %>');">
<a class="dropdown-item" href="#"><%= cluster.metadata.title || cluster.id.to_s.titleize %></a>
Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<%= render partial: 'layouts/nav/user' %>
<%= render partial: 'layouts/nav/log_out' %>
<% else %>
<%= render partial: 'layouts/nav/custom_navigation', locals: { navigation: @help_bar, menu_alignment: 'dropdown-menu-right' }%>
<%= render partial: 'layouts/nav/custom_navigation', locals: { navigation: @help_bar, menu_alignment: 'dropdown-menu-end' }%>
<% end %>
</div>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<i class="fas fa-code" aria-hidden="true"></i><span class="d-sm-none d-md-none d-lg-inline"> <%= t('dashboard.nav_develop_title') %></span><span class="caret"></span>
</a>

<ul class="dropdown-menu <%= local_assigns.fetch(:menu_alignment, 'dropdown-menu-right') %>" role="menu">
<ul class="dropdown-menu <%= local_assigns.fetch(:menu_alignment, 'dropdown-menu-end') %>" role="menu">
<%= nav_link(t('dashboard.nav_restart_server'), "sync", restart_url) %>
<%= nav_link(t('dashboard.nav_develop_docs'), "book", Configuration.developer_docs_url, new_tab: true) %>
<%= nav_link(products_title(:dev), "cog", products_path(type: "dev")) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<i class="fas fa-question-circle" aria-hidden="true"></i><span class="d-sm-none d-md-none d-lg-inline"> <%= t('dashboard.nav_help_title') %></span><span class="caret"></span>
</a>

<ul class="dropdown-menu <%= local_assigns.fetch(:menu_alignment, 'dropdown-menu-right') %>" role="menu">
<ul class="dropdown-menu <%= local_assigns.fetch(:menu_alignment, 'dropdown-menu-end') %>" role="menu">
<%= nav_link(t('dashboard.nav_help_support'), "question-circle", support_url, new_tab: true) %>
<%= nav_link(t('dashboard.nav_help_docs'), "info-circle", docs_url, new_tab: true) %>
<%= nav_link(t('dashboard.nav_help_change_password'), "key", passwd_url, new_tab: true) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class CustomHelpNavigationTest < ActionDispatch::IntegrationTest

# Check custom 'Help Menu'
menu_items = dropdown_list('Help Menu')
assert_equal true, menu_items.first['class'].include?('dropdown-menu-right')
assert_equal true, menu_items.first['class'].include?('dropdown-menu-end')
menu_links = css_select(menu_items, 'a')
assert_equal 2, menu_links.size
# Check first expected link
Expand All @@ -64,7 +64,7 @@ class CustomHelpNavigationTest < ActionDispatch::IntegrationTest

# Check custom 'Docs Menu'
menu_items = dropdown_list('Docs Menu')
assert_equal true, menu_items.first['class'].include?('dropdown-menu-right')
assert_equal true, menu_items.first['class'].include?('dropdown-menu-end')
menu_links = css_select(menu_items, 'a')
assert_equal 1, menu_links.size
# Check first expected link
Expand Down

0 comments on commit 0951366

Please sign in to comment.