Patch #44205 » 0001-Refactor-actions-dropdown.patch
| app/assets/stylesheets/application.css | ||
|---|---|---|
|
margin-inline: 0;
|
||
|
padding-inline-start: 10px;
|
||
|
font-size:0.9em;
|
||
|
display: inline-flex;
|
||
|
}
|
||
|
.contextual input, .contextual select {font-size:0.9em;}
|
||
| app/assets/stylesheets/dropdown.css | ||
|---|---|---|
|
text-decoration: none;
|
||
|
}
|
||
|
.dropdown-content li a:hover .icon-svg, .dropdown-content .dropdown-items a:hover .icon-svg {
|
||
|
stroke: var(--oc-blue-9);
|
||
|
}
|
||
|
.dropdown-divider {
|
||
|
border-block-start: 1px solid var(--oc-gray-2);
|
||
|
}
|
||
| app/assets/stylesheets/responsive.css | ||
|---|---|---|
|
#content>.contextual>a,
|
||
|
#content>.contextual .drdn,
|
||
|
#content>.contextual .dropdown,
|
||
|
p.buttons a {
|
||
|
font-weight: bold;
|
||
| app/helpers/application_helper.rb | ||
|---|---|---|
|
content = capture(&)
|
||
|
if content.present?
|
||
|
trigger =
|
||
|
content_tag('span', sprite_icon('3-bullets', l(:button_actions)), :class => 'icon-only icon-actions',
|
||
|
:title => l(:button_actions))
|
||
|
trigger = content_tag('span', trigger, :class => 'drdn-trigger')
|
||
|
content = content_tag('div', content, :class => 'drdn-items')
|
||
|
content = content_tag('div', content, :class => 'drdn-content')
|
||
|
content_tag('span', trigger + content, :class => 'drdn')
|
||
|
content_tag('span', sprite_icon('3-bullets', l(:button_actions)),
|
||
|
:class => 'icon-only icon-actions dropdown-trigger',
|
||
|
:title => l(:button_actions),
|
||
|
:data => {:action => "click->dropdown#toggle"})
|
||
|
items = content_tag('ul', content_tag('li', content), :class => 'dropdown-items')
|
||
|
content = content_tag('span', items, :class => 'dropdown-content hidden', :data => {:dropdown_target => "content"})
|
||
|
content_tag('span', trigger + content, :class => 'dropdown', :data => {:controller => "dropdown"})
|
||
|
end
|
||
|
end
|
||
| test/helpers/journals_helper_test.rb | ||
|---|---|---|
|
assert_select_in journal_actions, 'a[title=?][class="icon-only icon-quote"]', 'Quote'
|
||
|
assert_select_in journal_actions, 'a[title=?][class="icon-only icon-edit"]', 'Edit'
|
||
|
assert_select_in journal_actions, 'div[class="drdn-items"] a[class="icon icon-del"]'
|
||
|
assert_select_in journal_actions, 'div[class="drdn-items"] a[class="icon icon-copy-link"]'
|
||
|
assert_select_in journal_actions, '.dropdown-items a.icon-del'
|
||
|
assert_select_in journal_actions, '.dropdown-items a.icon-copy-link'
|
||
|
assert_select_in journal_actions, 'span.reaction-button-wrapper'
|
||
|
end
|
||
| ... | ... | |
|
journal_actions = render_journal_actions(issue, journals.first, reply_links: true)
|
||
|
assert_select_in journal_actions, 'span.reaction-button-wrapper'
|
||
|
assert_select_in journal_actions, 'span.drdn'
|
||
|
assert_select_in journal_actions, 'span.dropdown'
|
||
|
assert_select_in journal_actions, 'a[class="icon-only icon-quote"]', false
|
||
|
assert_select_in journal_actions, 'a[class="icon-only icon-edit"]', false
|
||
| test/system/copy_to_clipboard_test.rb | ||
|---|---|---|
|
# Copy issue url to Clipboard
|
||
|
first('.contextual span.icon-actions').click
|
||
|
find('.contextual div.drdn-items a.icon-copy-link').click
|
||
|
find('.contextual .dropdown-items a.icon-copy-link').click
|
||
|
# Paste the value copied to the clipboard into the textarea to get and test
|
||
|
first('.icon-edit').click
|
||
| ... | ... | |
|
# Copy issue journal url to Clipboard
|
||
|
first('#note-2 .icon-actions').click
|
||
|
first('#note-2 div.drdn-items a.icon-copy-link').click
|
||
|
first('#note-2 .dropdown-items a.icon-copy-link').click
|
||
|
# Paste the value copied to the clipboard into the textarea to get and test
|
||
|
first('.icon-edit').click
|
||
| test/system/issues_import_test.rb | ||
|---|---|---|
|
def test_import_issues_without_failures
|
||
|
log_user('jsmith', 'jsmith')
|
||
|
visit '/issues'
|
||
|
find('div.contextual>span.drdn').click
|
||
|
find('div.contextual>span.dropdown').click
|
||
|
click_on 'Import'
|
||
|
attach_file 'file', Rails.root.join('test/fixtures/files/import_issues.csv')
|
||
| test/system/reactions_test.rb | ||
|---|---|---|
|
assert_selector 'a.reaction-button'
|
||
|
assert_no_selector 'a.icon-quote'
|
||
|
assert_no_selector 'span.drdn'
|
||
|
assert_no_selector 'span.dropdown'
|
||
|
end
|
||
|
within("#change-#{journal_without_notes.id}") do
|
||
|
assert_selector 'a.reaction-button'
|
||
|
assert_no_selector '.drdn'
|
||
|
assert_no_selector '.dropdown'
|
||
|
end
|
||
|
click_link 'History'
|
||
| ... | ... | |
|
assert_selector 'a.reaction-button'
|
||
|
assert_selector 'a.icon-quote'
|
||
|
assert_selector 'span.drdn'
|
||
|
assert_selector 'span.dropdown'
|
||
|
end
|
||
|
within("#change-#{journal_without_notes.id}") do
|
||
|
assert_selector 'a.reaction-button'
|
||
|
assert_selector 'span.drdn'
|
||
|
assert_selector 'span.dropdown'
|
||
|
assert_no_selector 'a.icon-quote'
|
||
|
end
|
||