backup-settings changes:
- adds a new button in the Backup section of about:preferences / about:settings
- shows the turn on dialog after pressing the button
Turn on dialog behaviour (implemented):
- pressing the cancel will close the dialog
- pressing the confirm button will set the pref browser.backup.scheduled.enabled=true and close the dialog
- pressing the passwords checkbox will show more options
Turn on dialog behaviour (not implemented):
- requiring a password for the backup (see Bug 1895981)
- modifying the save location and showing a file picker (see Bug 1895943)
Other changes:
- tests for backup-settings and the turn on dialog
- Storybook template for the turn on dialog
Lo-fi Figma designs: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4558&t=PYLY0QMN1n8GR9vW-0
Differential Revision: https://phabricator.services.mozilla.com/D209769
The earlier patches in this stack (a) made it possible to await on the stub to complete and (b) ensured that the update system initiates properly regardless of when and if the update service stub is invoked. This allows us to remove explict stub invocations in some cases and to have the await on the results in others.
Differential Revision: https://phabricator.services.mozilla.com/D209129
I want the initialization function that I'm going to add later in the patch stack to be asynchronous, so the update entry points should be asynchronous functions.
Differential Revision: https://phabricator.services.mozilla.com/D209109
The earlier patches in this stack (a) made it possible to await on the stub to complete and (b) ensured that the update system initiates properly regardless of when and if the update service stub is invoked. This allows us to remove explict stub invocations in some cases and to have the await on the results in others.
Differential Revision: https://phabricator.services.mozilla.com/D209129
I want the initialization function that I'm going to add later in the patch stack to be asynchronous, so the update entry points should be asynchronous functions.
Differential Revision: https://phabricator.services.mozilla.com/D209109
The problem I'm trying to solve: There is currently no way to create a selected region in the screenshots overlay with the keyboard.
I recently added support for resizing a selected region in bug 1801954, but a user still needs to create a region with the mouse before the keyboard can be used.
I tried to look at what other browsers are doing in this scenario. Unfortunately there isn't much to go off. Most browsers, I can't even take a screenshot and the only browser that I found to have keyboard support for screenshots is MS Edge. In Edge, when you open screenshots, if your mouse isn't over the content area it will immediately move your mouse to the center of the page. If your mouse is over the content, it remains in place. Then, arrow keys will move the cursor around and you can hit space/enter to start creating a region.
I didn't like that Edge moved the mouse immediately after opening screenshots so I took a different approach.
My approach:
Screenshots will not move the mouse until an arrow key is pressed.
How it works:
If your cursor is above the content and an arrow key is pressed, the cursor will move in the direction of the arrow key that was pressed.
If your cursor is not above the content and a arrow key is pressed, the cursor will be moved to the middle of the content. Screenshots will not move the cursor until an arrow key is pressed.
When moving around the overlay with the keyboard: only hitting an arrow key will move the cursor around by 1px. If shift + arrow key, the cursor will move around by 10px.
When space is clicked while moving the cursor, it will start a region. Moving the arrow keys allows the region to sized.
When the cursor is above an element and the hover element rect is visible, hitting enter will select that region. If no hover element region exists, enter will behave the same as space.
I am also keeping the screenshots UI focused in this patch. Tab/shift + tab will keep focus to screenshots UI. Shift + F6 will escape the focus loop I've made in this patch if needed. Although, if a user has entered screenshots, it makes sense that for the current time, only screenshots UI is focusable.
Differential Revision: https://phabricator.services.mozilla.com/D197703
The problem I'm trying to solve: There is currently no way to create a selected region in the screenshots overlay with the keyboard.
I recently added support for resizing a selected region in bug 1801954, but a user still needs to create a region with the mouse before the keyboard can be used.
I tried to look at what other browsers are doing in this scenario. Unfortunately there isn't much to go off. Most browsers, I can't even take a screenshot and the only browser that I found to have keyboard support for screenshots is MS Edge. In Edge, when you open screenshots, if your mouse isn't over the content area it will immediately move your mouse to the center of the page. If your mouse is over the content, it remains in place. Then, arrow keys will move the cursor around and you can hit space/enter to start creating a region.
I didn't like that Edge moved the mouse immediately after opening screenshots so I took a different approach.
My approach:
Screenshots will not move the mouse until an arrow key is pressed.
How it works:
If your cursor is above the content and an arrow key is pressed, the cursor will move in the direction of the arrow key that was pressed.
If your cursor is not above the content and a arrow key is pressed, the cursor will be moved to the middle of the content. Screenshots will not move the cursor until an arrow key is pressed.
When moving around the overlay with the keyboard: only hitting an arrow key will move the cursor around by 1px. If shift + arrow key, the cursor will move around by 10px.
When space is clicked while moving the cursor, it will start a region. Moving the arrow keys allows the region to sized.
When the cursor is above an element and the hover element rect is visible, hitting enter will select that region. If no hover element region exists, enter will behave the same as space.
I am also keeping the screenshots UI focused in this patch. Tab/shift + tab will keep focus to screenshots UI. Shift + F6 will escape the focus loop I've made in this patch if needed. Although, if a user has entered screenshots, it makes sense that for the current time, only screenshots UI is focusable.
Differential Revision: https://phabricator.services.mozilla.com/D197703
Megalist is a feature where a user can manage their personal data from one place. This is available as an entry in the browser sidebar by adding the pref “browser.megalist.enabled”.
This initial patch includes:
* Displaying logins, credit cards, and addresses in the browser sidebar
* Editing login, credit card, or address
* Rendering site favicons
* Importing logins
* Copying field values
* Filtering records using search text
* Conceal / reveal password
What’s not included:
* Creating a login, credit card, or address
* Deleting
* Sorting records
* Tests
* Documentation
**Architecture**
At a high-level, the relationship between modules can be outlined as such:
DataSource <—> Aggregator <—> View Model <—> View
The **MegalistViewModel** is responsible for providing the data that will be displayed in the view (MegalistView). It is responsible for organizing data accessed from the Aggregator into a list and send this data as “snapshots” to the view. The MegalistParent/Child actors facilitate the communication between the browser context and content.
The **Aggregator** is responsible for connecting a data source to the ViewModel. It can connect multiple data sources to the ViewModel.
The **data source **defines how the data is fetched and represented in Megalist as a group of “lines”. At this level, we define specific functionality on what commands can act on this data and what is exposed to the ViewModel.
Differential Revision: https://phabricator.services.mozilla.com/D202678