Skip to content

Commit eccf613

Browse files
committed
Add ability to report filter issue from popup panel
Related issue: - uBlockOrigin/uBlock-issues#1541 A "chat" icon has been added to the popup panel to make it easy to report filter issue on specific sites. Reporting filter issues require a GitHub account, since uBO does not have a home server through which reports could be sent. The report icon is available only for when uBO is enabled on a given site. On mobile devices, the logger icon is replaced by the "chat" icon since it is more likely to be useful on small display devices. The logger can always be opened from the Support pane in the dashboard.
1 parent 1858161 commit eccf613

13 files changed

+309
-72
lines changed

src/_locales/en/messages.json

+52
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@
127127
"message": "Open the logger",
128128
"description": "Tooltip used for the logger icon in the panel"
129129
},
130+
"popupTipReport": {
131+
"message": "Report an issue on this website",
132+
"description": "Tooltip used for the 'chat' icon in the panel"
133+
},
130134
"popupTipNoPopups": {
131135
"message": "Toggle the blocking of all popups for this site",
132136
"description": "Tooltip for the no-popups per-site switch"
@@ -856,6 +860,14 @@
856860
"message": "Open",
857861
"description": "Text for button which open an external webpage in Support pane"
858862
},
863+
"supportReportSpecificButton": {
864+
"message": "Create new report",
865+
"description": "Text for button which open an external webpage in Support pane"
866+
},
867+
"supportFindSpecificButton": {
868+
"message": "Find similar reports",
869+
"description": "A clickable link in the filter issue reporter section"
870+
},
859871
"supportS1H": {
860872
"message": "Documentation",
861873
"description": "Header of 'Documentation' section in Support pane"
@@ -908,6 +920,46 @@
908920
"message": "<b>Important:</b> Potentially private or sensitive information is redacted by default. Redacted information may make it more difficult to solve a problem.",
909921
"description": "Second paragraph of 'Troubleshooting Information' section in Support pane"
910922
},
923+
"supportS6H": {
924+
"message": "Report a filter issue",
925+
"description": "Header of 'Report a filter issue' section in Support pane"
926+
},
927+
"supportS6P1S1": {
928+
"message": "To avoid burdening volunteers with duplicate reports, please verify that the issue has not already been reported.",
929+
"description": "A paragraph in the filter issue reporter section"
930+
},
931+
"supportS6URL": {
932+
"message": "Address of the web page:",
933+
"description": "Label for the URL of the page"
934+
},
935+
"supportS6Select1": {
936+
"message": "The web page...",
937+
"description": "Label for widget to select type of issue"
938+
},
939+
"supportS6Select1Option0": {
940+
"message": "-- Pick an entry --",
941+
"description": "An entry in the widget used to select the type of issue"
942+
},
943+
"supportS6Select1Option1": {
944+
"message": "Shows ads or ad leftovers",
945+
"description": "An entry in the widget used to select the type of issue"
946+
},
947+
"supportS6Select1Option2": {
948+
"message": "Has overlays or other nuisances",
949+
"description": "An entry in the widget used to select the type of issue"
950+
},
951+
"supportS6Select1Option3": {
952+
"message": "Detects uBlock Origin",
953+
"description": "An entry in the widget used to select the type of issue"
954+
},
955+
"supportS6Select1Option4": {
956+
"message": "Has privacy-related issues",
957+
"description": "An entry in the widget used to select the type of issue"
958+
},
959+
"supportS6Select1Option5": {
960+
"message": "Breaks when uBlock Origin is enabled",
961+
"description": "An entry in the widget used to select the type of issue"
962+
},
911963
"supportRedact": {
912964
"message": "Redact",
913965
"description": "Text for 'Redact' button"

src/css/fa-icons.css

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
width: calc(1em * 1794 / 1792);
6565
}
6666
.fa-icon > .fa-icon_clipboard,
67+
.fa-icon > .fa-icon_comment-alt,
6768
.fa-icon > .fa-icon_external-link,
6869
.fa-icon > .fa-icon_eye-dropper,
6970
.fa-icon > .fa-icon_eye-open,

src/css/popup-fenix.css

+7
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,10 @@ body.mobile.no-tooltips .toolRibbon .tool {
203203
font-size: 1.6em;
204204
}
205205

206+
#basicTools:not(.canPick) .needPick {
207+
visibility: hidden;
208+
}
209+
206210
#extraTools .fa-icon {
207211
align-self: center;
208212
position: relative;
@@ -576,6 +580,9 @@ body.godMode #actionSelector > #dynaAllow {
576580
:root body[data-ui~="+no-popups"] #no-popups {
577581
display: flex;
578582
}
583+
:root.mobile [href="logger-ui.html#_"] {
584+
display: none;
585+
}
579586
body:not([data-more~="a"]) [data-more="a"],
580587
body:not([data-more~="b"]) [data-more="b"],
581588
body:not([data-more~="c"]) [data-more="c"],

src/css/support.css

+32-1
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,52 @@ body {
22
margin-bottom: 6rem;
33
}
44

5+
.body > div {
6+
max-width: 800px;
7+
}
8+
59
.supportEntry {
610
display: flex;
711
margin-top: 1em;
812
}
13+
:root.mobile .supportEntry {
14+
flex-direction: column;
15+
}
916
.supportEntry > div:first-of-type {
1017
flex-grow: 1;
1118
}
12-
.supportEntry > div:last-of-type {
19+
.supportEntry > div.hasButtons {
1320
align-items: center;
1421
display: flex;
22+
justify-content: space-around;
1523
}
1624
.supportEntry h3 {
1725
margin-top: 0;
1826
}
1927

28+
29+
.e > .supportEntry {
30+
flex-direction: column;
31+
}
32+
.e > .supportEntry > div:not(:first-of-type) {
33+
margin-top: 1em;
34+
}
35+
.e > .supportEntry *:is(input,select) {
36+
padding: var(--default-gap-xxsmall);
37+
}
38+
.e > .supportEntry input[type="url"] {
39+
width: 100%;
40+
}
41+
.e > .supportEntry *:is(input,select) {
42+
max-width: calc(100% - 1em);
43+
}
44+
body:not(.filterIssue) .body > div.e {
45+
display: none;
46+
}
47+
body.filterIssue .body > div:not(.e) {
48+
display: none;
49+
}
50+
2051
button {
2152
margin-inline-end: 1em;
2253
-webkit-margin-end: 1em;

src/img/fontawesome/fontawesome-defs.svg

+1
Loading

src/js/fa-icons.js

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/html-filtering.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ const htmlFilteringEngine = {
5050
},
5151
get discardedCount() {
5252
return discardedCount;
53-
}
53+
},
54+
getFilterCount() {
55+
return filterDB.size;
56+
},
5457
};
5558

5659
const PSelectorHasTextTask = class {

0 commit comments

Comments
 (0)