-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Persist Interaction State for tabs (#3824)
<!-- Note: This checklist is a reminder of our shared engineering expectations. Feel free to change it, although assigning a GitHub reviewer and the items in bold are required.⚠️ If you're an external contributor, please file an issue first before working on a PR, as we can't guarantee that we will accept your changes if they haven't been discussed ahead of time. Thanks! --> Task/Issue URL: https://app.asana.com/0/0/1208991633646641/f Tech Design URL: https://app.asana.com/0/481882893211075/1208983861756006/f CC: **Description**: Adds storage and automatically stores WKWebView's interaction state data for each tab. These are used to restore back/forward history and scroll position on next launch after app was terminated. **Steps to test this PR**: 1. Mark yourself as internal user to enable the feature. Restart is required for the flag to have an effect. 1. Open a few tabs, navigate to various links so that navigating back/forward is possible. Scroll can be adjusted. 2. Terminate the app. 3. Verify last opened tab is visible and website is scrolled to (roughly) the same position on the screen. 4. Verify navigation history is available and working properly. 5. Use Fire button. Verify all cache files are being removed. You can check the directory by putting a breakpoint somewhere in `TabInteractionStateDiskSource` and printing `interactionStateCacheLocation` or use debug menu to see the list of cache files. 6. Open a few tabs again, enable Automatic Data Clearing. 7. Verify all interaction cache files are removed. <!-- Before submitting a PR, please ensure you have tested the combinations you expect the reviewer to test, then delete configurations you *know* do not need explicit testing. Using a simulator where a physical device is unavailable is acceptable. --> **Definition of Done (Internal Only)**: * [ ] Does this PR satisfy our [Definition of Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)? --- ###### Internal references: [Software Engineering Expectations](https://app.asana.com/0/59792373528535/199064865822552) [Technical Design Template](https://app.asana.com/0/59792373528535/184709971311943)
- Loading branch information
Showing
18 changed files
with
662 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.