Patch #44205 » 0001-Refactor-actions-dropdown.patch
| app/assets/stylesheets/application.css | ||
|---|---|---|
| 810 | 810 |
margin-inline: 0; |
| 811 | 811 |
padding-inline-start: 10px; |
| 812 | 812 |
font-size:0.9em; |
| 813 |
display: inline-flex; |
|
| 813 | 814 |
} |
| 814 | 815 |
.contextual input, .contextual select {font-size:0.9em;}
|
| 815 | 816 | |
| app/assets/stylesheets/dropdown.css | ||
|---|---|---|
| 49 | 49 |
text-decoration: none; |
| 50 | 50 |
} |
| 51 | 51 | |
| 52 |
.dropdown-content li a:hover .icon-svg, .dropdown-content .dropdown-items a:hover .icon-svg {
|
|
| 53 |
stroke: var(--oc-blue-9); |
|
| 54 |
} |
|
| 55 | ||
| 52 | 56 |
.dropdown-divider {
|
| 53 | 57 |
border-block-start: 1px solid var(--oc-gray-2); |
| 54 | 58 |
} |
| app/assets/stylesheets/responsive.css | ||
|---|---|---|
| 592 | 592 | |
| 593 | 593 |
#content>.contextual>a, |
| 594 | 594 |
#content>.contextual .drdn, |
| 595 |
#content>.contextual .dropdown, |
|
| 595 | 596 |
p.buttons a {
|
| 596 | 597 |
font-weight: bold; |
| 597 | 598 | |
| app/helpers/application_helper.rb | ||
|---|---|---|
| 899 | 899 |
content = capture(&) |
| 900 | 900 |
if content.present? |
| 901 | 901 |
trigger = |
| 902 |
content_tag('span', sprite_icon('3-bullets', l(:button_actions)), :class => 'icon-only icon-actions',
|
|
| 903 |
:title => l(:button_actions)) |
|
| 904 |
trigger = content_tag('span', trigger, :class => 'drdn-trigger')
|
|
| 905 |
content = content_tag('div', content, :class => 'drdn-items')
|
|
| 906 |
content = content_tag('div', content, :class => 'drdn-content')
|
|
| 907 |
content_tag('span', trigger + content, :class => 'drdn')
|
|
| 902 |
content_tag('span', sprite_icon('3-bullets', l(:button_actions)),
|
|
| 903 |
:class => 'icon-only icon-actions dropdown-trigger', |
|
| 904 |
:title => l(:button_actions), |
|
| 905 |
:data => {:action => "click->dropdown#toggle"})
|
|
| 906 |
items = content_tag('ul', content_tag('li', content), :class => 'dropdown-items')
|
|
| 907 |
content = content_tag('span', items, :class => 'dropdown-content hidden', :data => {:dropdown_target => "content"})
|
|
| 908 |
content_tag('span', trigger + content, :class => 'dropdown', :data => {:controller => "dropdown"})
|
|
| 908 | 909 |
end |
| 909 | 910 |
end |
| 910 | 911 | |
| test/helpers/journals_helper_test.rb | ||
|---|---|---|
| 49 | 49 | |
| 50 | 50 |
assert_select_in journal_actions, 'a[title=?][class="icon-only icon-quote"]', 'Quote' |
| 51 | 51 |
assert_select_in journal_actions, 'a[title=?][class="icon-only icon-edit"]', 'Edit' |
| 52 |
assert_select_in journal_actions, 'div[class="drdn-items"] a[class="icon icon-del"]'
|
|
| 53 |
assert_select_in journal_actions, 'div[class="drdn-items"] a[class="icon icon-copy-link"]'
|
|
| 52 |
assert_select_in journal_actions, '.dropdown-items a.icon-del'
|
|
| 53 |
assert_select_in journal_actions, '.dropdown-items a.icon-copy-link'
|
|
| 54 | 54 |
assert_select_in journal_actions, 'span.reaction-button-wrapper' |
| 55 | 55 |
end |
| 56 | 56 | |
| ... | ... | |
| 64 | 64 |
journal_actions = render_journal_actions(issue, journals.first, reply_links: true) |
| 65 | 65 | |
| 66 | 66 |
assert_select_in journal_actions, 'span.reaction-button-wrapper' |
| 67 |
assert_select_in journal_actions, 'span.drdn'
|
|
| 67 |
assert_select_in journal_actions, 'span.dropdown'
|
|
| 68 | 68 | |
| 69 | 69 |
assert_select_in journal_actions, 'a[class="icon-only icon-quote"]', false |
| 70 | 70 |
assert_select_in journal_actions, 'a[class="icon-only icon-edit"]', false |
| test/system/copy_to_clipboard_test.rb | ||
|---|---|---|
| 26 | 26 | |
| 27 | 27 |
# Copy issue url to Clipboard |
| 28 | 28 |
first('.contextual span.icon-actions').click
|
| 29 |
find('.contextual div.drdn-items a.icon-copy-link').click
|
|
| 29 |
find('.contextual .dropdown-items a.icon-copy-link').click
|
|
| 30 | 30 | |
| 31 | 31 |
# Paste the value copied to the clipboard into the textarea to get and test |
| 32 | 32 |
first('.icon-edit').click
|
| ... | ... | |
| 40 | 40 | |
| 41 | 41 |
# Copy issue journal url to Clipboard |
| 42 | 42 |
first('#note-2 .icon-actions').click
|
| 43 |
first('#note-2 div.drdn-items a.icon-copy-link').click
|
|
| 43 |
first('#note-2 .dropdown-items a.icon-copy-link').click
|
|
| 44 | 44 | |
| 45 | 45 |
# Paste the value copied to the clipboard into the textarea to get and test |
| 46 | 46 |
first('.icon-edit').click
|
| test/system/issues_import_test.rb | ||
|---|---|---|
| 23 | 23 |
def test_import_issues_without_failures |
| 24 | 24 |
log_user('jsmith', 'jsmith')
|
| 25 | 25 |
visit '/issues' |
| 26 |
find('div.contextual>span.drdn').click
|
|
| 26 |
find('div.contextual>span.dropdown').click
|
|
| 27 | 27 |
click_on 'Import' |
| 28 | 28 | |
| 29 | 29 |
attach_file 'file', Rails.root.join('test/fixtures/files/import_issues.csv')
|
| test/system/reactions_test.rb | ||
|---|---|---|
| 130 | 130 |
assert_selector 'a.reaction-button' |
| 131 | 131 | |
| 132 | 132 |
assert_no_selector 'a.icon-quote' |
| 133 |
assert_no_selector 'span.drdn'
|
|
| 133 |
assert_no_selector 'span.dropdown'
|
|
| 134 | 134 |
end |
| 135 | 135 |
within("#change-#{journal_without_notes.id}") do
|
| 136 | 136 |
assert_selector 'a.reaction-button' |
| 137 | 137 | |
| 138 |
assert_no_selector '.drdn'
|
|
| 138 |
assert_no_selector '.dropdown'
|
|
| 139 | 139 |
end |
| 140 | 140 | |
| 141 | 141 |
click_link 'History' |
| ... | ... | |
| 144 | 144 |
assert_selector 'a.reaction-button' |
| 145 | 145 | |
| 146 | 146 |
assert_selector 'a.icon-quote' |
| 147 |
assert_selector 'span.drdn'
|
|
| 147 |
assert_selector 'span.dropdown'
|
|
| 148 | 148 |
end |
| 149 | 149 |
within("#change-#{journal_without_notes.id}") do
|
| 150 | 150 |
assert_selector 'a.reaction-button' |
| 151 |
assert_selector 'span.drdn'
|
|
| 151 |
assert_selector 'span.dropdown'
|
|
| 152 | 152 | |
| 153 | 153 |
assert_no_selector 'a.icon-quote' |
| 154 | 154 |
end |