Skip to content

Commit

Permalink
Merge branch 'master' into bug-1476107-markdown-editor-rev
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoshino committed Sep 5, 2024
2 parents 547c4c3 + 24fab8c commit a48ae53
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 91 deletions.
3 changes: 2 additions & 1 deletion Bugzilla/Comment.pm
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ sub reactions_with_users {
{
my $rows = Bugzilla->dbh->selectall_arrayref(
"SELECT reaction, user_id FROM longdescs_reactions
WHERE comment_id = ?", undef, $self->id);
WHERE comment_id = ?
ORDER BY id", undef, $self->id);

my %reactions_with_users;

Expand Down
6 changes: 6 additions & 0 deletions extensions/BugModal/Extension.pm
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ sub install_before_final_checks {
default => 'on',
category => 'User Interface',
});
add_setting({
name => 'ui_show_comment_reactions',
options => ['on', 'off'],
default => 'on',
category => 'User Interface',
});
}

sub editable_tables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
[%~ END ~%]
</div>

[% IF Param('use_comment_reactions') %]
[% IF Param('use_comment_reactions') AND user.setting('ui_show_comment_reactions') == 'on' %]
[% INCLUDE bug_modal/comment_reactions.html.tmpl %]
[% END %]
[% END %]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,32 @@
# defined by the Mozilla Public License, v. 2.0.
#%]

<div id="cre-[% comment.count FILTER none %]" class="comment-reactions"
[% IF comment.collapsed +%] style="display:none"[% END %]>
[% IF user.id %]
<button type="button" class="anchor">
<span class="icon" aria-label="Toggle Reaction Picker"></span>
</button>
<div class="picker" role="dialog" aria-label="Reaction Picker" inert>
[% total_count = 0 %]

[% FOREACH key IN comment.supported_reactions.keys %]
[% total_count = total_count + (comment.reactions.$key || 0) %]
[% END %]

[% IF user.id || total_count %]
<div id="cre-[% comment.count FILTER none %]" class="comment-reactions"
[% IF comment.collapsed +%] style="display:none"[% END %]>
[% IF user.id %]
<button type="button" class="anchor">
<span class="icon" aria-label="Toggle Reaction Picker"></span>
</button>
<div class="picker" role="dialog" aria-label="Reaction Picker" inert>
[% FOREACH key IN comment.supported_reactions.keys %]
[% PROCESS emoji_button key = key sum = 0 %]
[% END %]
</div>
[% END %]
<div class="sums">
[% FOREACH key IN comment.supported_reactions.keys %]
[% PROCESS emoji_button key = key sum = 0 %]
[% PROCESS emoji_button key = key sum = 1 %]
[% END %]
</div>
[% END %]
<div class="sums">
[% FOREACH key IN comment.supported_reactions.keys %]
[% PROCESS emoji_button key = key sum = 1 %]
[% END %]
</div>
</div>
[% END %]

[% BLOCK emoji_button %]
[% count = comment.reactions.$key || 0 %]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
setting_descs.ui_remember_collapsed = "Remember visibility of header sections when viewing a bug"
setting_descs.ui_use_absolute_time = "Use absolute format instead of relative time when viewing a bug"
setting_descs.ui_attach_long_paste = "When pasting long text in bug comments, convert it into an attachment text file"
setting_descs.ui_show_comment_reactions = "Show emoji comment reactions when viewing a bug"
%]
1 change: 0 additions & 1 deletion extensions/BugModal/web/bug_modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,6 @@ a.comment-tag-url {
min-width: 24px;
height: 24px;
font-size: 12px;
line-height: 0;
}

.comment-reactions button:disabled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
title = "Enter A Bug"
generate_api_token = 1
javascript_urls = js_urls
style_urls = [ 'extensions/GuidedBugEntry/web/style/guided.css' ]
style_urls = [
'extensions/GuidedBugEntry/web/style/guided.css',
'skins/standard/index.css'
]
%]

<noscript>
Expand Down Expand Up @@ -229,48 +232,59 @@ tabbed browsing or the location bar)
[%############################################################################%]

[% BLOCK exits %]
<table class="exits">
<tr>
<td>
<div class="exit_img">
<div class="options">
<div class="option">
<div class="icon">
<a href="https://support.mozilla.org/">
<img src="[% basepath FILTER none %]extensions/GuidedBugEntry/web/images/support.png" width="32" height="32"></a>
<!-- Material Symbols: Contact Support -->
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="m25.75 44-.5-5.5h-2q-7.15 0-12.2-5.05Q6 28.4 6 21.25q0-7.15 5.075-12.2Q16.15 4 23.35 4q3.55 0 6.575 1.275Q32.95 6.55 35.2 8.85q2.25 2.3 3.525 5.425T40 21.1q0 3.3-.975 6.6T36.2 34q-1.85 3-4.5 5.55T25.75 44Zm-2.4-11.15q.8 0 1.35-.55t.55-1.35q0-.8-.55-1.35t-1.35-.55q-.8 0-1.35.55t-.55 1.35q0 .8.55 1.35t1.35.55ZM22 26.05h2.5q0-1.25.425-2.075.425-.825 1.775-2.175 1.35-1.35 1.9-2.475.55-1.125.55-2.425 0-2.25-1.525-3.7-1.525-1.45-4.075-1.45-2.1 0-3.75 1.1t-2.45 3l2.3.95q.55-1.3 1.525-1.925.975-.625 2.225-.625 1.5 0 2.35.725.85.725.85 1.925 0 .95-.55 1.925-.55.975-1.95 2.425-1.35 1.4-1.725 2.25-.375.85-.375 2.55Z"/></svg>
</a>
</div>
</td>
<td class="exit_text">
<a href="https://support.mozilla.org/">I need technical support</a>
Technical support for Firefox and other Mozilla products.
</td>
</tr>
<tr>
<td>
<div class="exit_img">
<div class="desc-container">
<div class="title">
<a href="https://support.mozilla.org/">I need technical support</a>
</div>
<div class="desc">
Technical support for Firefox and other Mozilla products.
</div>
</div>
</div>
<div class="option">
<div class="icon">
<a href="https://webcompat.com/issues/new">
<img src="[% basepath FILTER none %]extensions/GuidedBugEntry/web/images/webbug.png" width="32" height="32"></a>
<!-- Material Symbols: Language -->
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="M24 44q-4.2 0-7.85-1.575Q12.5 40.85 9.8 38.15q-2.7-2.7-4.25-6.375Q4 28.1 4 23.9t1.55-7.825Q7.1 12.45 9.8 9.75t6.35-4.225Q19.8 4 24 4q4.2 0 7.85 1.525Q35.5 7.05 38.2 9.75q2.7 2.7 4.25 6.325Q44 19.7 44 23.9t-1.55 7.875Q40.9 35.45 38.2 38.15t-6.35 4.275Q28.2 44 24 44Zm0-2.9q1.75-1.8 2.925-4.125Q28.1 34.65 28.85 31.45H19.2q.7 3 1.875 5.4Q22.25 39.25 24 41.1Zm-4.25-.6q-1.25-1.9-2.15-4.1-.9-2.2-1.5-4.95H8.6Q10.5 35 13 37.025q2.5 2.025 6.75 3.475Zm8.55-.05q3.6-1.15 6.475-3.45 2.875-2.3 4.625-5.55h-7.45q-.65 2.7-1.525 4.9-.875 2.2-2.125 4.1Zm-20.7-12h7.95q-.15-1.35-.175-2.425-.025-1.075-.025-2.125 0-1.25.05-2.225.05-.975.2-2.175h-8q-.35 1.2-.475 2.15T7 23.9q0 1.3.125 2.325.125 1.025.475 2.225Zm11.05 0H29.4q.2-1.55.25-2.525.05-.975.05-2.025 0-1-.05-1.925T29.4 19.5H18.65q-.2 1.55-.25 2.475-.05.925-.05 1.925 0 1.05.05 2.025.05.975.25 2.525Zm13.75 0h8q.35-1.2.475-2.225Q41 25.2 41 23.9q0-1.3-.125-2.25T40.4 19.5h-7.95q.15 1.75.2 2.675.05.925.05 1.725 0 1.1-.075 2.075-.075.975-.225 2.475Zm-.5-11.95h7.5q-1.65-3.45-4.525-5.75Q32 8.45 28.25 7.5q1.25 1.85 2.125 4t1.525 5Zm-12.7 0h9.7q-.55-2.65-1.85-5.125T24 7q-1.6 1.35-2.7 3.55-1.1 2.2-2.1 5.95Zm-10.6 0h7.55q.55-2.7 1.4-4.825.85-2.125 2.15-4.125-3.75.95-6.55 3.2T8.6 16.5Z"/></svg>
</a>
</div>
</td>
<td class="exit_text">
<a href="https://webcompat.com/issues/new">Report an issue with a website that I use</a>
</td>
</tr>
<tr>
<td>
<div class="exit_img">
<a href="https://ideas.mozilla.org/">
<img src="[% basepath FILTER none %]extensions/GuidedBugEntry/web/images/feedback.png" width="32" height="32"></a>
<div class="desc-container">
<div class="title">
<a href="https://webcompat.com/issues/new">Report an issue with a website that I use</a>
</div>
<div class="desc">
File a web compatibility issue.
</div>
</div>
</td>
<td class="exit_text_last">
<a href="https://connect.mozilla.org/">Provide feedback at Mozilla Connect</a>
Mozilla Connect is a collaborative space for ideas, feedback, and
discussions that will help shape future product releases.
</td>
</tr>
</table>
</div>
<div class="option">
<div class="icon">
<a href="https://connect.mozilla.org/">
<!-- Material Symbols: Lightbulb -->
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path d="M24 44q-1.7 0-2.875-1.175T19.95 39.95h8.1q0 1.7-1.175 2.875T24 44Zm-8.1-7.15v-3h16.2v3Zm.25-6.05q-3.3-2.15-5.225-5.375Q9 22.2 9 18.15q0-6.1 4.45-10.55Q17.9 3.15 24 3.15q6.1 0 10.55 4.45Q39 12.05 39 18.15q0 4.05-1.9 7.275-1.9 3.225-5.25 5.375Z"/></svg>
</a>
</div>
<div class="desc-container">
<div class="title">
<a href="https://connect.mozilla.org/">Provide feedback at Mozilla Connect</a>
</div>
<div class="desc">
Mozilla Connect is a collaborative space for ideas, feedback, and
discussions that will help shape future product releases.
</div>
</div>
</div>
</div>

<h3>
None of the above; my [% terms.bug %] is in:
</h3>
<h3>None of the above; my [% terms.bug %] is in:</h3>
[% END %]

[%############################################################################%]
Expand Down
37 changes: 0 additions & 37 deletions extensions/GuidedBugEntry/web/style/guided.css
Original file line number Diff line number Diff line change
Expand Up @@ -92,43 +92,6 @@ ul.product-list > li > .product-item {
* products and other_products step
*/

.exits {
margin: 10px 0;
border: 1px solid var(--secondary-region-border-color);
width: 600px;
background-color: var(--secondary-region-background-color);
}

.exits td {
padding: 10px 0;
}

.exits h2 {
margin: 0;
font-size: var(--font-size-small);
}

.exit_img {
width: 32px;
padding: 0 10px;
}

.exit_text,
.exit_text_last {
width: 100%;
}

.exit_text {
border-bottom: 1px solid var(--secondary-region-border-color);
}

.exit_text a,
.exit_text_last a {
font-size: var(--font-size-h4);
display: block;
margin-bottom: 2px;
}

#prod_comp_search_main {
width: 400px;
}
Expand Down

0 comments on commit a48ae53

Please sign in to comment.