Skip to content

Commit

Permalink
Clearly mark the selected request action in "Select action" dropdown
Browse files Browse the repository at this point in the history
The contrast is much better now, it passes the accessibility checks.
This is also consistent with how we display selected items/elements
throughout the application, like the notification filters.
  • Loading branch information
Dany Marcoux committed Jan 16, 2023
1 parent 4c1a572 commit a12ab4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/api/app/views/webui/request/_action_text.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
%p.mt-0.mb-0.fw-normal
%span.me-2 ##{action_index + 1}
= details['comment'].truncate(50)
%p.mb-0.mt-0.text-muted.fw-light.small
%p.mb-0.mt-0.small
= action.name
- else
%p.mt-0.mb-0.fw-normal
Expand All @@ -18,14 +18,14 @@
= action.name
-# add_role, delete and set_bugowner are actions on the target repo, so they don't need to mention where they are coming from
- unless %w[add_role delete set_bugowner].include?(action.type)
%p.mb-0.mt-0.text-muted.fw-light.small
%p.mb-0.mt-0.small
from
= action.source_project
- if action.source_package
\/
= action.source_package
- if details
%p.mb-0.mt-0.text-muted.fw-light.small
%p.mb-0.mt-0.small
by
= details['user']
#{ApplicationController.helpers.time_ago_in_words(details['time'].to_i)} ago
6 changes: 3 additions & 3 deletions src/api/app/views/webui/request/_actions_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
%span Action
%span.float-end Revision
- submit_actions.each_with_index do |action_item, action_index|
%li
%hr.dropdown-divider
%li.border-top
= link_to((render partial: 'action_text', locals: { action: action_item, action_index: action_index }),
request_show_path(number: bs_request.number,
request_action_id: action_item.id,
full_diff: diff_limit,
diff_to_superseded: diff_to_superseded_id),
class: "dropdown-item #{action_item.id == active_action.id ? 'disabled' : ''}")
class: "dropdown-item #{action_item.id == active_action.id ? 'active' : ''}",
'aria-current': 'true')
%p
- if submit_actions_count > 1
- active_action_index = submit_actions.find_index(active_action) + 1
Expand Down

0 comments on commit a12ab4e

Please sign in to comment.