Commit graph

72 commits

Author SHA1 Message Date
hannajones
23f7226e62 Bug 1606785 - Format Firefox CSS files with Prettier r=desktop-theme-reviewers,perftest-reviewers,places-reviewers,translations-reviewers,omc-reviewers,backup-reviewers,browser-installer-reviewers,sparky,dao,pdahiya,nrishel,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D249182
2025-05-28 02:31:27 +00:00
agoloman
c18faaae88 Revert "Bug 1606785 - Enable Prettier for CSS files r=desktop-theme-reviewers,Standard8,frontend-codestyle-reviewers,emilio" for causing multiple failures.
This reverts commit ec5fa1d4c0ee7ec6d1cac04433767211cfdf0045.

Revert "Bug 1606785 - Format Firefox CSS files with Prettier r=desktop-theme-reviewers,perftest-reviewers,places-reviewers,translations-reviewers,omc-reviewers,backup-reviewers,browser-installer-reviewers,sparky,dao,pdahiya,nrishel,kpatenio"

This reverts commit baa5d72bbdb3e07046bf6feb2b7dd4da3271fff9.

Revert "Bug 1606785 - Format browser/themes and toolkit/themes CSS files with Prettier r=desktop-theme-reviewers,pip-reviewers,tabbrowser-reviewers,places-reviewers,dao,mconley"

This reverts commit 9604b0a8ae1ceb26631e678e6865874191225baf.

Revert "Bug 1606785 - Format browser/themes/preferences CSS files with Prettier r=settings-reviewers,desktop-theme-reviewers,dao,mconley"

This reverts commit 686c1cf85f12d95024f9ae980434cfc068e4f1e2.

Revert "Bug 1606785 - Format urlbar CSS files with Prettier r=urlbar-reviewers,desktop-theme-reviewers,dao"

This reverts commit a7a4f31251a2f00d8736232e8e71d2a52bf7674e.

Revert "Bug 1606785 - Format webcompat CSS files with Prettier r=webcompat-reviewers,denschub"

This reverts commit 41bc4d52371e55746141fca64f85197b61203897.

Revert "Bug 1606785 - Format search CSS files with Prettier r=search-reviewers,jteow"

This reverts commit 7bb7f8237413ace2ca084980d455cd7cd2d21834.

Revert "Bug 1606785 - Format dom CSS files with Prettier r=emilio"

This reverts commit c22e910235ebe3c03f89563273c13d616548b6e2.

Revert "Bug 1606785 - Format android CSS files with Prettier r=geckoview-reviewers,hiro"

This reverts commit c08e43fc3d5eb3b1703a643a5abfe206d5f28d7f.

Revert "Bug 1606785 - Format layout CSS files with Prettier r=layout-reviewers,dholbert"

This reverts commit 4f2a32d1a4814a0c33492c752112ad4a6817e9ff.

Revert "Bug 1606785 - Format devtools CSS files with Prettier r=devtools-reviewers,nchevobbe,frontend-codestyle-reviewers"

This reverts commit c05f675ddfcd42d744b734491905bfa3ad081976.

Revert "Bug 1606785 - Format recomp CSS files with Prettier r=reusable-components-reviewers,desktop-theme-reviewers,dao,mkennedy"

This reverts commit b10c7de8d0c38a40b3b0d9ffbfecfcda62dada39.

Revert "Bug 1606785 - Format sidebar CSS files with Prettier r=sidebar-reviewers,desktop-theme-reviewers,dao,nsharpley"

This reverts commit d32c555e37d4ca69a57f4924731970c3c7d5a56b.

Revert "Bug 1606785 - Format shopping CSS files with Prettier r=shopping-reviewers,desktop-theme-reviewers,dao,rking"

This reverts commit 965887a7087c1cc17b13d5f0f41ac49243390ce8.

Revert "Bug 1606785 - Format profiles CSS files with Prettier r=profiles-reviewers,desktop-theme-reviewers,dao,mossop"

This reverts commit 8338860f74d672071fbeb96574f57a225248d6a3.

Revert "Bug 1606785 - Format genai and ml CSS files with Prettier r=firefox-ai-ml-reviewers,Mardak"

This reverts commit d66681f553dbe1a9859155e614bedb476438a9ca.

Revert "Bug 1606785 - Format firefoxview CSS files with Prettier r=fxview-reviewers,desktop-theme-reviewers,dao,jsudiaman"

This reverts commit 530b815cadad2fc8946b5f91124cef74dece69f4.

Revert "Bug 1606785 - Format aboutlogins, megalist, and form autofill CSS files with Prettier r=credential-management-reviewers,mtigley,desktop-theme-reviewers,dao"

This reverts commit 813c8643812ac795739119d67fc51912feabb75b.
2025-05-21 04:49:28 +00:00
hannajones
57c8f50444 Bug 1606785 - Format Firefox CSS files with Prettier r=desktop-theme-reviewers,perftest-reviewers,places-reviewers,translations-reviewers,omc-reviewers,backup-reviewers,browser-installer-reviewers,sparky,dao,pdahiya,nrishel,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D249182
2025-05-21 03:55:13 +00:00
mark
a1761852d1 Bug 1936120 - Enforce no quotes around Lit expressions r=reusable-components-reviewers,credential-management-reviewers,fxview-reviewers,omc-reviewers,backup-reviewers,sidebar-reviewers,frontend-codestyle-reviewers,profiles-reviewers,mtigley,mconley,hjones,jsudiaman,niklas,Standard8,pdahiya
* Enables lit/quoted-expressions rule to enforce that no surrounding
  quotes when expressions are bound to attributes and properties in Lit templates.
  See f71ea1741e/docs/rules/quoted-expressions.md

* Updates all violations to adhere to lit/quoted-expressions rule

Differential Revision: https://phabricator.services.mozilla.com/D237657
2025-02-19 16:19:42 +00:00
hjones
5507f785e8 Bug 1837658 - enable Stylelint length-zero-no-unit r=frontend-codestyle-reviewers,desktop-theme-reviewers,mtigley,settings-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,tabbrowser-reviewers,translations-reviewers,android-reviewers,backup-reviewers,nchevobbe,dao,mconley,tthibaud
This use of units for zero length occasionally gets flagged during theme reviews so it makes sense to establish our preference and automate checks via Stylelint.

Differential Revision: https://phabricator.services.mozilla.com/D230287
2024-12-10 00:28:49 +00:00
Logan Rosen
8859fe06ac Bug 1857834 - auto-formatting with Prettier v3 r=linter-reviewers,webdriver-reviewers,perftest-reviewers,search-reviewers,devtools-reviewers,sync-reviewers,reusable-components-reviewers,profiler-reviewers,dom-storage-reviewers,android-reviewers,firefox-ai-ml-reviewers,hjones,mcheang,mstange,sparky,janv,nchevobbe,tarek,Standard8,markh
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D230598
2024-11-29 15:18:25 +00:00
Spencer Poor
39dca98d30 Bug 1920145 - [moz-message] Modified moz-message property definitions, fluent set to true. r=hjones,settings-reviewers,credential-management-reviewers,reusable-components-reviewers,translations-reviewers,backup-reviewers,mtigley,fxview-reviewers,sidebar-reviewers,mossop,mconley
Bug 1920145 - [moz-message] Further cleanup of moz-message attribute declarations, edited docs. r=hjones

Bug 1920145 - [moz-message] Edited additional README that mentions relevant header declarations. r=hjones

Bug 1920145 - [moz-message] Fixed linter errors stemming from changes. r=hjones

Bug 1920145 - [moz-message] Reverted accidental removals of necessary data-l10n-attrs references. r=hjones

Bug 1920145 - [moz-message] Further reverted other removals of data-l10n-attrs references in components that aren't moz-message. r=hjones

Bug 1920145 - [moz-message] Cleaned up a couple more references to datal10nAttrs in NotificationMessageBar.mjs. r=hjones

Differential Revision: https://phabricator.services.mozilla.com/D226891
2024-11-15 19:21:06 +00:00
Mike Conley
f2af8dbf62 Bug 1893485 - Add the profileGroupID to the backup manifest. r=backup-reviewers,kpatenio
This is a BackupManifest schema change that will break recovering from
any backups created before this change. However, considering that we
haven't released this feature yet, I figured it wasn't worth the
effort of doing a schema version bump or handling of the prior
version.

I'm making the field optional in the BackupManifest because in the
event that we decide to backport the backup component to ESR 115,
we need to handle the fact that ESR 115 has no notion of a profile
group ID (and is unlikely to ever have such a notion).

Differential Revision: https://phabricator.services.mozilla.com/D218976
2024-09-04 17:39:33 +00:00
Stephen Thompson
6c1381ca4b Bug 1901308 - Show profile backup errors and keep modals open r=backup-reviewers,fluent-reviewers,firefox-desktop-core-reviewers ,mconley,bolsson
Currently, clicking "confirm" buttons on modals in the profile backup settings menu will always close the modals regardless of whether the operation succeeded or failed. In the case of errors, users don't know that something went wrong. It's better to keep the modals open and display an error so that the user knows what to do next and can try to fix the issue, if applicable.

Differential Revision: https://phabricator.services.mozilla.com/D218358
2024-08-06 18:21:16 +00:00
Narcis Beleuzu
0285f1c53c Backed out changeset bd72ed21a114 (bug 1901308) for Doc failure on BackupUIChild.sys . CLOSED TREE 2024-08-06 20:46:23 +03:00
Stephen Thompson
84003852f2 Bug 1901308 - Show profile backup errors and keep modals open r=backup-reviewers,fluent-reviewers,firefox-desktop-core-reviewers ,mconley,bolsson
Currently, clicking "confirm" buttons on modals in the profile backup settings menu will always close the modals regardless of whether the operation succeeded or failed. In the case of errors, users don't know that something went wrong. It's better to keep the modals open and display an error so that the user knows what to do next and can try to fix the issue, if applicable.

Differential Revision: https://phabricator.services.mozilla.com/D218358
2024-08-06 14:56:53 +00:00
Stephen Thompson
e893e33e61 Bug 1905157 - Display profile recovery error messages in UI r=backup-reviewers,fluent-reviewers,mconley,bolsson,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D216090
2024-07-26 16:41:40 +00:00
kpatenio
0112ee8243 Bug 1896772 - embed password fields as a separate component into the turn-on-scheduled-backups dialog r=backup-reviewers,sthompson
The patch adds `password-validation-inputs` into `turn-on-scheduled-backups`, therefore removing the need for duplicate password fields and validation logic in the latter component. The turn-on dialog is notified via a dispatched event whenever a valid and invalid password pair is entered.

Tests are written in D216892

Depends on D216617

Differential Revision: https://phabricator.services.mozilla.com/D216762
2024-07-25 22:23:35 +00:00
kpatenio
1a865a5bfd Bug 1896772 - verify and display password rules r=backup-reviewers,fluent-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D216617
2024-07-25 22:23:34 +00:00
Norisz Fay
638f6ccbe3 Backed out changeset 898c9afa27d2 (bug 1905157) for causing build bustages CLOSED TREE 2024-07-23 19:28:00 +03:00
Stephen Thompson
8832f84b7f Bug 1905157 - Display profile recovery error messages in UI r=backup-reviewers,fluent-reviewers,mconley,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D216090
2024-07-23 15:54:15 +00:00
Fred Chasen
ce80c671e2 Bug 1905154: Restore dialog should remain open while a backup recovery is in progress. r=backup-reviewers,fluent-reviewers,flod,sthompson
- Adds a #recoveryInProgress member to BackupService to limit to one recovery at a time
- Adds recoveryInProgress and recoveryErrorCode properties to the BackupSettings component
- Has BackupUIChild set recoveryInProgress / recoveryErrorCode while a recovery is underway.
- Keeps the restore dialog open while the recovery is underway, disables the confirm button and updates it's text to "Restoring..."
- Has BackupUIChild close the recovery dialog if recovery is successful.

Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4568&t=rmWErO2I6lpY3Vz7-0

Differential Revision: https://phabricator.services.mozilla.com/D215677
2024-07-15 16:29:48 +00:00
Stanca Serban
9fc5ed62f7 Backed out changeset d98136b45ed4 (bug 1905154) for causing mozilla::dom::PathUtils::InitFileWithPath related mochitests failures. CLOSED TREE 2024-07-13 02:15:07 +03:00
Fred Chasen
7a73f2d7f2 Bug 1905154: Restore dialog should remain open while a backup recovery is in progress. r=backup-reviewers,fluent-reviewers,flod,sthompson
- Adds a #recoveryInProgress member to BackupService to limit to one recovery at a time
- Adds recoveryInProgress and recoveryErrorCode properties to the BackupSettings component
- Has BackupUIChild set recoveryInProgress / recoveryErrorCode while a recovery is underway.
- Keeps the restore dialog open while the recovery is underway, disables the confirm button and updates it's text to "Restoring..."
- Has BackupUIChild close the recovery dialog if recovery is successful.

Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4568&t=rmWErO2I6lpY3Vz7-0

Differential Revision: https://phabricator.services.mozilla.com/D215677
2024-07-12 20:36:27 +00:00
Mike Conley
1e3645ddee Bug 1906739 - Implement scheduled backups CTA and restore your data sections in backup-settings. r=backup-reviewers,fluent-reviewers,kpatenio,flod
Differential Revision: https://phabricator.services.mozilla.com/D215972
2024-07-11 18:21:03 +00:00
kpatenio
b735ff7449 Bug 1904973 - Encryption checkbox in settings page should be hidden when scheduled backups are disabled. r=backup-reviewers,mconley
Summary of updates:
- the "sensitive data" checkbox to toggle backup encryption is no longer displayed when a user turns off scheduled backups
- the "Change password" button, which only appears for encrypted backups, is now aligned with the checkbox + description to match the Figma spec
- once scheduled backups are turned off,  the latest backup file is deleted via the `BackupService.deleteLastBackup()` method

Tests
- moved browser tests related to the turn-off scheduled backups dialog from `backup_settings.js` to their own file `browser_settings_turn_off_scheduled_backups.js`
- updated some browser tasks testing add/change password to have scheduled backups enabled by default
- added a chrome test for the sensitive data checkbox's visibility whenever scheduled backups are toggled on or off

Depends on https://phabricator.services.mozilla.com/D215543

Differential Revision: https://phabricator.services.mozilla.com/D215826
2024-07-10 22:16:45 +00:00
Mike Conley
430c6c4acc Bug 1904925 - Fill out more of the backup-settings reusable component. r=backup-reviewers,fluent-reviewers,firefox-desktop-core-reviewers ,flod,kpatenio
This exposes some UI to show the most recent backup timestamp
and location (if a recent backup exists), and buttons to show
that location, and to edit the location.

Differential Revision: https://phabricator.services.mozilla.com/D215543
2024-07-10 15:38:46 +00:00
Mike Conley
cdb801850d Bug 1903117 - Make the download link in the single-file archive work. r=backup-reviewers,desktop-theme-reviewers,dao,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215503
2024-07-08 19:18:58 +00:00
Stanca Serban
5dc17eb22a Backed out changeset f35d254c77a2 (bug 1903117) as requested for causing Bug 1906460. 2024-07-05 20:07:05 +03:00
Mike Conley
8e92bd8471 Bug 1903117 - Make the download link in the single-file archive work. r=backup-reviewers,desktop-theme-reviewers,dao,kpatenio
Depends on D214451

Differential Revision: https://phabricator.services.mozilla.com/D215503
2024-07-04 19:25:17 +00:00
Sandor Molnar
61f4c43ba6 Backed out 2 changesets (bug 1903117, bug 1903127) for causing xpc failures @ test_BackupService_resolveArchiveDestFolderPath.js CLOSED TREE
Backed out changeset 3d272e8ab369 (bug 1903117)
Backed out changeset afbf6e3d4145 (bug 1903127)
2024-07-04 21:16:44 +03:00
Mike Conley
9ed28413ce Bug 1903117 - Make the download link in the single-file archive work. r=backup-reviewers,desktop-theme-reviewers,dao,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D215503
2024-07-04 17:30:41 +00:00
Fred Chasen
ebd0bbddf0 Bug 1904146 - Add getBackupFileInfo method to BackupService to handle GetBackupFileInfo events. r=mconley
This implements getting the information needed to show the date of a backup in the restore component and showing the password input if that backup is encrypted.

- Adds a `getBackupFileInfo` method to `BackupService` that will call `sampleArchive` for a passed backup file and update the `backupFileInfo` in the state with a subset of that info.
- Update the `GetBackupFileInfo` event handler in `BackupUIParent` to use the new `getBackupFileInfo` method.

Differential Revision: https://phabricator.services.mozilla.com/D214899
2024-07-03 19:53:34 +00:00
kpatenio
c6ddb0f9d1 Bug 1893295 - (part 2) make enable-backup-encryption re-run encryption using BackupUI actors and BackupService. r=backup-reviewers,firefox-desktop-core-reviewers ,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214893
2024-06-28 16:55:02 +00:00
kpatenio
3de495e9da Bug 1893295 - (part 1) build enable-backup-encryption component. r=backup-reviewers,fluent-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D214483
2024-06-28 16:55:02 +00:00
Fred Chasen
3d724ed08a Bug 1904147 - Update RestoreFromBackupFile event handler to call recoverFromBackupArchive. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D215153
2024-06-27 23:06:17 +00:00
Stanca Serban
5b85b77f60 Backed out changeset edf305a8036e (bug 1904146) for causing mochitests failures in browser_settings_turn_on_scheduled_backups.js. 2024-06-28 02:20:50 +03:00
Fred Chasen
fd44c05d5c Bug 1904146 - Add getBackupFileInfo method to BackupService to handle GetBackupFileInfo events. r=mconley
This implements getting the information needed to show the date of a backup in the restore component and showing the password input if that backup is encrypted.

- Adds a `getBackupFileInfo` method to `BackupService` that will call `sampleArchive` for a passed backup file and update the `backupFileInfo` in the state with a subset of that info.
- Update the `GetBackupFileInfo` event handler in `BackupUIParent` to use the new `getBackupFileInfo` method.

Differential Revision: https://phabricator.services.mozilla.com/D214899
2024-06-27 19:04:46 +00:00
Mike Conley
0e038c3b50 Bug 1901520 - Part 2: Add styles and scripts to the single file archive. r=backup-reviewers,frontend-codestyle-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D213975
2024-06-25 00:35:43 +00:00
Mike Conley
02d7da6f8b Bug 1901520 - Part 1: Send localized template down to the archive worker. r=backup-reviewers,fluent-reviewers,kpatenio,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D213974
2024-06-25 00:35:43 +00:00
Sandor Molnar
e36a6d4453 Backed out 5 changesets (bug 1901534, bug 1891854, bug 1901520) for causing xpc failures @ test_BackupService_renderTemplate.js CLOSED TREE
Backed out changeset 5e494cb0aff6 (bug 1901534)
Backed out changeset e8773eda97c1 (bug 1891854)
Backed out changeset 4b079909d830 (bug 1901520)
Backed out changeset 5509d1905d2c (bug 1901520)
Backed out changeset 6d98566735ad (bug 1901520)
2024-06-25 01:24:56 +03:00
Mike Conley
6718a1dd48 Bug 1901520 - Part 2: Add styles and scripts to the single file archive. r=backup-reviewers,frontend-codestyle-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D213975
2024-06-24 20:47:05 +00:00
Mike Conley
d4ff2ccbcd Bug 1901520 - Part 1: Send localized template down to the archive worker. r=backup-reviewers,fluent-reviewers,kpatenio,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D213974
2024-06-24 20:47:04 +00:00
Mike Conley
3978217226 Bug 1901528 - Part 2: Support recovering from single-file archives. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D213228
2024-06-22 00:52:39 +00:00
Mike Conley
8cc8f60e8e Bug 1901528 - Part 1: Rename BackupService.recoverFromBackup to BackupService.recoverFromSnapshotFolder. r=backup-reviewers,kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D213227
2024-06-22 00:52:39 +00:00
Mike Conley
bda32b16ee Bug 1901132 - Use the ArchiveEncryptor and ArchiveDecryptor to encrypt and decrypt backup archives. r=backup-reviewers,fchasen
Differential Revision: https://phabricator.services.mozilla.com/D213046
2024-06-21 14:07:27 +00:00
Mike Conley
3c9ce8a2dc Bug 1900892 - Part 2: Define a ArchiveJSONBlock schema for the JSON block in a backup archive. r=backup-reviewers,fchasen
Since the ArchiveJSONBlock uses a $ref to reference the metadata in the
BackupManifest schema, we have to change the JSON validation mechanism
we're using to one that supports $ref's.

Differential Revision: https://phabricator.services.mozilla.com/D212860
2024-06-21 14:07:26 +00:00
kpatenio
e5c43bf9f5 Bug 1893301 - Build confirmation dialog element for removing encryption password from backup. r=backup-reviewers,firefox-desktop-core-reviewers ,fluent-reviewers,mconley
This patch adds a new dialog for disabling a backup's password protection.

Steps to test this feature:
1. First ensure that the following prefs are enabled: browser.backup.enabled and browser.backup.preferences.ui.enabled
2. Then ensure that the existing backup for the current profile has encryption enabled (should have enc-state.json)
3. Else, access the debug page (chrome://browser/content/backup/debug.html) to enable encryption
4. Once encryption is enabled, the sensitive data checkbox should be checked in about:settings / about:preferences
5. Clicking the checked checkbox should now show the new dialog for removing password protection
6. If the dialog is confirmed, the checkbox should be unchecked in both the settings/preferences page and the debug page

Other notes:
- If the checkbox is *not* checked, nothing will happen. This is because the dialog for enabling password protection is not yet implemented
- Added tests and Storybook entries as well

Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4568&t=9NNUojWMeOLwe3rD-0

Differential Revision: https://phabricator.services.mozilla.com/D213171
2024-06-19 17:36:01 +00:00
Fred Chasen
e4f3e95784 Bug 1894020 - Build dialog for restoring from a backup file. r=backup-reviewers,fluent-reviewers,bolsson,mconley
- Adds button in the preferences backup settings to restore from a backup file.
- Adds a dialog component `restore-from-backup` which will open a filepicker to select a HTML backup file to restore from, show the backup's date and prompt to input a password if needed.
- Adds a stub `getBackupInfo` event to eventually return metadata and config JSON from `sampleArchive` in Bug 1901132.

Does not yet implement:
- Expanding the input to fit multiline files names.
- Restoring the selected backup file.

Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-8701&t=zvoykS3OusX9YVCv-4

Differential Revision: https://phabricator.services.mozilla.com/D211248
2024-06-14 15:39:05 +00:00
kpatenio
6b1b9fd3ee Bug 1895981 - Allow password setting from turn-on-scheduled-backups dialog. r=backup-reviewers,fchasen
Patch by kpatenio <kpatenio@mozilla.com>.

Makes several updates to turn-on-scheduled-backups dialog:

- Selecting the encryption option will disable the Confirm button until matching passwords are entered
- Confirming turn-on options with encryption enabled will call BackupService.enableEncryption
- Does not turn on scheduled backups if there is any issue with enabling encryption.

Differential Revision: https://phabricator.services.mozilla.com/D211945
2024-06-12 17:36:53 +00:00
kpatenio
e4b7e2f244 Bug 1895943 - Implement file picker and save location for backups. r=backup-reviewers,fluent-reviewers,flod,firefox-desktop-core-reviewers
Patch by kpatenio <kpatenio@mozilla.com>.

1. Allows for selecting a custom path or the default (Documents) path for saving backups. The selection is passed from the "turn-on-scheduled-backups" dialog to "BackupService".
2. After pressing the "Choose" button in the dialog, a filepicker will appear so that a folder can be selected.
3. Once the dialog is confirmed, the absolute path is saved to a pref called "browser.backup.location" and saved in the service state.

Other changes:
- Added the Documents folder as the default save location
- Added an onUpdate function for "browser.backup.location" that passes the updated BackupService state to registered widgets (backup settings section, dialogs)
- Added Storybook entries and tests for the newly updated input and filepicker

Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4568&t=tILUMKfg8c6Ed1Ul-0 (turn on backup dialog)

Differential Revision: https://phabricator.services.mozilla.com/D210850
2024-06-12 17:36:52 +00:00
kpatenio
eeb9fddae1 Bug 1893299 - build confirmation dialog for turning off scheduled backups. r=backup-reviewers,fluent-reviewers,desktop-theme-reviewers,firefox-desktop-core-reviewers ,bolsson,dao
Patch by kpatenio <kpatenio@mozilla.com>.

Differential Revision: https://phabricator.services.mozilla.com/D210753
2024-06-12 17:36:52 +00:00
Mike Conley
67df85a3a0 Bug 1897498 - Add a mechanism for exporting backup snapshots to a single file archive. r=Gijs,valentin,backup-reviewers,frontend-codestyle-reviewers,Standard8,kpatenio
There are a number of interesting things going on this patch that I think are worth highlighting
here for my reviewers:

1. The single-file archive format is an HTML file that uses an inlined multipart/mixed MIME
   message within a HTML document comment in order to embed the backup data into the archive.
2. We use the multipart/mixed nsIStreamConverter to extract the JSON and binary data from
   the MIME block.
3. We use a Archive Worker to do the archive creation, allowing us to do the work of construction
   off of the main thread.
4. The Archive Worker is only parsing the header and getting the byte offset of the MIME block.
   Extraction is happening in the parent process. This is mainly for simplicity for now, since
   the Archive Worker cannot invoke an nsIStreamConverter. Down the line, if we determine that
   we'd prefer the Archive Worker do the base64 decoding off of the main thread, we may need
   to use a Message Channel to send the byte sfrom the nsIStreamConverter to it, and add
   stream-writing support to IOUtils so that the Archive Worker can take care of sending the
   decoded bytes to disk.
5. The patch doesn't expose the extraction mechanism in any way except through the debug
   interface right now. That will come down the line. In the meantime, this mechanism
   can be manually tested in the debug interface by creating a backup, which should also
   create an "archive.html" file in the backups folder. Using the "Extract from archive"
   button in the debug tool will let you select that HTML file and extract the ZIP as
   a file in the backups folder called "extraction.zip".
6. The test template contains Unicode characters because certain locales might involve
   us writing Unicode characters in the HTML template when generating the archive. The
   fun part about that is calculating where the byte offset is for the MIME block! See
   the comment in the Archive.worker.mjs script for how that works.

Differential Revision: https://phabricator.services.mozilla.com/D211588
2024-06-11 13:05:58 +00:00
Cristian Tuns
264a60be1c Backed out 3 changesets (bug 1895943, bug 1895981, bug 1893299) for causing bc failures in browser_startup_mainthreadio.js CLOSED TREE
Backed out changeset 8103d1ae73d6 (bug 1895981)
Backed out changeset 5dd8df7eb584 (bug 1895943)
Backed out changeset da7b6cd0a729 (bug 1893299)
2024-06-11 02:35:32 -04:00
kpatenio
909272f45f Bug 1895981 - allow password setting from turn-on-scheduled-backups dialog r=backup-reviewers,mconley
Makes several updates to turn-on-scheduled-backups dialog:

- Selecting the encryption option will disable the Confirm button until matching passwords are entered
- Confirming turn-on options with encryption enabled will call BackupService.enableEncryption
- Does not turn on scheduled backups if there is any issue with enabling encryption.

Differential Revision: https://phabricator.services.mozilla.com/D211945
2024-06-10 21:41:40 +00:00