Skip to content

Commit 3a46659

Browse files
committed
Merge branch 'release/v5.2' into enhance/AG-35947
2 parents d224fa7 + 2c32191 commit 3a46659

File tree

122 files changed

+3184
-977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+3184
-977
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- Send last filters update time during issue reporting [#3055].
13+
- Ability to exit editor by pressing `Escape` keyboard button [#2333].
1314
- Compatibility of `$header` modifier with `$match-case`
1415
and `$third-party` modifiers in MV2 [#2942].
1516

1617
### Changed
1718

1819
- Updated Safebrowsing and blocked by rules blocking pages.
20+
- Improved accessibility for visually impaired users [#3035], [#2315], [#2332].
1921

2022
### Removed
2123

2224
### Fixed
2325

26+
- Cannot maximize Filtering log in Firefox for Windows [#2464].
2427
- Unable to paste text into user rules input field on Android [#3061].
2528
- Invalid HTML rule selectors are breaking site loading [#2646].
2629

30+
[#2464]: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2464
2731
[#2646]: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2646
2832
[#3055]: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/3055
2933
[#3061]: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/3061
34+
[#3035]: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/3035
35+
[#2315]: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2315
36+
[#2332]: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2332
37+
[#2333]: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2333
3038
[#2942]: https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2942
3139

3240
## [5.1.68] - 2025-03-07

Extension/_locales/en/messages.json

+64-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"options_filters_empty_title": {
1515
"message": "Nothing found"
1616
},
17+
"options_filters_of_group": {
18+
"message": "Filters of \"%groupName%\" group"
19+
},
1720
"options_antibanner_custom_filter_already_exists": {
1821
"message": "This custom filter has already been added"
1922
},
@@ -59,6 +62,12 @@
5962
"options_filters_filter_updated": {
6063
"message": "updated:"
6164
},
65+
"options_filters_filter_tags": {
66+
"message": "Filter tags"
67+
},
68+
"options_filters_back_button": {
69+
"message": "Go back"
70+
},
6271
"options_popup_version_update_disable_notification": {
6372
"message": "Disable notifications"
6473
},
@@ -309,6 +318,9 @@
309318
"popup_site_exception_information": {
310319
"message": "Filtering is disabled because it can interfere with this website's operation."
311320
},
321+
"popup_tab_current_website": {
322+
"message": "Current website"
323+
},
312324
"popup_tab_blocked_count": {
313325
"message": "Blocked: %num%"
314326
},
@@ -318,6 +330,9 @@
318330
"popup_statistics_total": {
319331
"message": "Total"
320332
},
333+
"popup_statistics_category_label": {
334+
"message": "Statistics category"
335+
},
321336
"popup_statistics_all_categories": {
322337
"message": "All"
323338
},
@@ -393,6 +408,9 @@
393408
"popup_statistics_months_dec": {
394409
"message": "Dec"
395410
},
411+
"options_popup_updating_filters": {
412+
"message": "Updating filters..."
413+
},
396414
"options_popup_update_title_error": {
397415
"message": "Error updating filters"
398416
},
@@ -435,6 +453,12 @@
435453
"popup_reset_page_user_rules": {
436454
"message": "Delete user rules for this website"
437455
},
456+
"popup_open_settings": {
457+
"message": "Open AdGuard settings"
458+
},
459+
"popup_protection_button": {
460+
"message": "AdGuard protection"
461+
},
438462
"context_block_site_ads": {
439463
"message": "Block ads manually"
440464
},
@@ -540,6 +564,12 @@
540564
"filtering_table_filter": {
541565
"message": "Filter"
542566
},
567+
"filtering_table_action": {
568+
"message": "Action"
569+
},
570+
"filtering_table_open_details": {
571+
"message": "Open details"
572+
},
543573
"filtering_table_empty_reload_page_desc": {
544574
"message": "Nothing found. <reset>Disable filters<\/reset> or <refresh>reload the page<\/refresh> to view log records."
545575
},
@@ -681,6 +711,12 @@
681711
"filtering_log_status_modified": {
682712
"message": "Modified"
683713
},
714+
"options_skip_to_main_content": {
715+
"message": "Skip to main content"
716+
},
717+
"options_navigation": {
718+
"message": "Navigation"
719+
},
684720
"options_settings": {
685721
"message": "AdGuard Settings"
686722
},
@@ -768,6 +804,9 @@
768804
"options_userfilter_subtitle_key": {
769805
"message": "Fine-tune ad blocking with your own filtering rules"
770806
},
807+
"options_userfilter_line_break": {
808+
"message": "Line break"
809+
},
771810
"options_userfilter_line_break_off": {
772811
"message": "Line break: Disabled"
773812
},
@@ -1006,12 +1045,18 @@
10061045
"popup_open_filtering_log": {
10071046
"message": "Open filtering log"
10081047
},
1048+
"popup_tabs": {
1049+
"message": "Tabs"
1050+
},
10091051
"popup_tab_actions": {
10101052
"message": "Actions"
10111053
},
10121054
"popup_tab_statistics": {
10131055
"message": "Statistics"
10141056
},
1057+
"popup_statistics_time_label": {
1058+
"message": "Statistics time period"
1059+
},
10151060
"popup_statistics_time_day": {
10161061
"message": "Last day"
10171062
},
@@ -1025,7 +1070,7 @@
10251070
"message": "Last year"
10261071
},
10271072
"popup_switch_button": {
1028-
"message": "Protection switch"
1073+
"message": "Protection for current website"
10291074
},
10301075
"popup_limits_exceeded_warning": {
10311076
"message": "Your browser has modified the list of active built-in filters"
@@ -1051,6 +1096,9 @@
10511096
"options_about_version": {
10521097
"message": "Version"
10531098
},
1099+
"options_about_libs": {
1100+
"message": "Used libraries"
1101+
},
10541102
"options_copyright": {
10551103
"message": "All rights reserved."
10561104
},
@@ -1069,6 +1117,9 @@
10691117
"options_filters_search": {
10701118
"message": "Search"
10711119
},
1120+
"options_filters_search_filter": {
1121+
"message": "Search filter"
1122+
},
10721123
"options_about_title": {
10731124
"message": "AdGuard Browser extension"
10741125
},
@@ -1138,12 +1189,18 @@
11381189
"filtering_log_details_modal_try_again": {
11391190
"message": "Try again"
11401191
},
1192+
"filtering_log_tag_request_source": {
1193+
"message": "Request source"
1194+
},
11411195
"filtering_log_tag_tooltip_first_party": {
11421196
"message": "First-party requests"
11431197
},
11441198
"filtering_log_tag_tooltip_third_party": {
11451199
"message": "Third-party requests"
11461200
},
1201+
"filtering_log_tag_request_status": {
1202+
"message": "Request status"
1203+
},
11471204
"filtering_log_tag_tooltip_regular": {
11481205
"message": "Requests processed without filtering"
11491206
},
@@ -1159,6 +1216,9 @@
11591216
"filtering_log_tag_tooltip_user_rules": {
11601217
"message": "Requests affected by user rules"
11611218
},
1219+
"filtering_log_tag_request_type": {
1220+
"message": "Request type"
1221+
},
11621222
"filtering_log_tag_tooltip_html": {
11631223
"message": "Documents and subdocuments"
11641224
},
@@ -1243,6 +1303,9 @@
12431303
"close_button_title": {
12441304
"message": "Close"
12451305
},
1306+
"clear_button_title": {
1307+
"message": "Clear"
1308+
},
12461309
"filtering_modal_applied_rules": {
12471310
"message": "| Applied rule: | Applied rules:",
12481311
"description": "WARNING: correct number of plural forms is required"

Extension/src/background/api/ui/pages.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,22 @@ export class PagesApi {
209209

210210
const windowStateString = await browserStorage.get(FILTERING_LOG_WINDOW_STATE);
211211

212+
// Firefox does not allow to maximize popup windows on Windows operating system.
213+
// For more details, see the Bugzilla report:
214+
// https://bugzilla.mozilla.org/show_bug.cgi?id=1756507
215+
// As a temporary solution, we open the window in a normal state for Firefox on Windows
216+
// to fix issue reported to us:
217+
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2464
218+
const windowType = UserAgent.isFirefox && UserAgent.isWindows ? 'normal' : 'popup';
219+
212220
try {
213221
const options = typeof windowStateString === 'string'
214222
? JSON.parse(windowStateString)
215223
: PagesApi.defaultPopupWindowState;
216224

217225
await WindowsApi.create({
218226
url,
219-
type: 'popup',
227+
type: windowType,
220228
...options,
221229
});
222230
} catch (e) {
@@ -227,7 +235,7 @@ export class PagesApi {
227235
// https://github.com/AdguardTeam/AdguardBrowserExtension/issues/2100
228236
await WindowsApi.create({
229237
url,
230-
type: 'popup',
238+
type: windowType,
231239
...PagesApi.defaultPopupWindowState,
232240
});
233241
}

Extension/src/background/api/ui/toasts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export class Toasts {
333333
*
334334
* @returns Title and text lines for message.
335335
*/
336-
private static getFiltersUpdateResultMessage(
336+
public static getFiltersUpdateResultMessage(
337337
success: boolean,
338338
updatedFilters?: FilterMetadata[],
339339
): {

Extension/src/pages/common/common-script.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export async function sleepIfNecessary(
5050
*/
5151
export function addMinDurationTime<
5252
T extends (...args: any[]) => Promise<R>,
53-
R,
53+
R = Awaited<ReturnType<T>>,
5454
>(fn: T, minDurationMs: number): (...args: Parameters<T>) => Promise<R> {
5555
return async (...args: Parameters<T>): Promise<R> => {
5656
const start = Date.now();

Extension/src/pages/common/components/ConfirmModal/ConfirmModal.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ export const ConfirmModal = ({
142142
<button
143143
type="button"
144144
className="button modal__close"
145-
aria-label={translator.getMessage('close_button_title')}
145+
title={translator.getMessage('close_button_title')}
146146
onClick={handleCancel}
147147
>
148-
<Icon id="#cross" />
148+
<Icon id="#cross" aria-hidden="true" />
149149
</button>
150150
</div>
151151
{subtitle && (

Extension/src/pages/common/components/Editor/Editor.jsx

+18-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,13 @@ const Editor = ({
4343
name,
4444
value,
4545
editorRef,
46-
shortcuts,
46+
shortcuts = [],
4747
onChange,
4848
fullscreen,
4949
highlightRules,
5050
shouldResetSize,
51+
onSave,
52+
onExit,
5153
}) => {
5254
const SIZE_STORAGE_KEY = `${name}_editor-size`;
5355
const editorStorageSize = localStorage.getItem(SIZE_STORAGE_KEY);
@@ -94,6 +96,20 @@ const Editor = ({
9496
// highlight rules syntax only for user rules
9597
const editorMode = highlightRules ? 'adguard' : 'text';
9698

99+
const mergedShortcuts = [
100+
{
101+
name: 'save',
102+
bindKey: { win: 'Ctrl-S', mac: 'Command-S' },
103+
exec: onSave,
104+
},
105+
{
106+
name: 'exit',
107+
bindKey: { win: 'Esc', mac: 'Esc' },
108+
exec: onExit,
109+
},
110+
...shortcuts,
111+
];
112+
97113
return (
98114
<div style={editorStyles} className={editorClassName}>
99115
<AceEditor
@@ -107,7 +123,7 @@ const Editor = ({
107123
editorProps={{ $blockScrolling: true }}
108124
fontSize={14}
109125
value={value}
110-
commands={shortcuts}
126+
commands={mergedShortcuts}
111127
onChange={onChange}
112128
/>
113129
<ReactResizeDetector

Extension/src/pages/common/components/SavingButton/SavingButton.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import classnames from 'classnames';
2323
import { SavingFSMState } from '../Editor/savingFSM';
2424
import { translator } from '../../../../common/translators/translator';
2525
import { Icon } from '../ui/Icon';
26+
import { UserAgent } from '../../../../common/user-agent';
2627

2728
const renderSavingState = (savingRulesState: SavingFSMState) => {
2829
type IndicatorTextMapType = {
@@ -51,6 +52,7 @@ const renderSavingState = (savingRulesState: SavingFSMState) => {
5152
<Icon
5253
id="#tick"
5354
classname="icon--18 icon--green-default editor__icon"
55+
aria-hidden="true"
5456
/>
5557
{indicatorText}
5658
</div>
@@ -84,6 +86,7 @@ export const SavingButton = ({ onClick, savingState, contentChanged }: SavingBut
8486
onClick={onClick}
8587
title={translator.getMessage('options_editor_save')}
8688
disabled={!contentChanged}
89+
aria-keyshortcuts={UserAgent.isMacOs ? 'Meta+S' : 'Ctrl+S'}
8790
>
8891
{translator.getMessage('options_editor_save')}
8992
</button>

0 commit comments

Comments
 (0)