android-components
android-components copied to clipboard
Create GeckoEngineSession with the display mode specified in the WebAppManifest of the browser Session if one exists
Pull Request checklist
- [x] Quality: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
- [ ] Tests: This PR includes thorough tests or an explanation of why it does not
- [ ] Changelog: This PR includes a changelog entry or does not need one
- [x] Accessibility: The code in this PR follows accessibility best practices or does not include any user facing features
After merge
- Milestone: Make sure issues closed by this pull request are added to the milestone of the version currently in development.
- Breaking Changes: If this is a breaking change, please push a draft PR on Reference Browser to address the breaking issues.
Fixes #8584 and mozilla-mobile/fenix#10252
I need some help with how to go about writing tests or what should be tested :sweat_smile: I'm not sure if it's sufficient to test whether, say, EngineMiddleware.createEngineSession returns a GeckoSession with the correct displayMode if given a mocked sessionLookup function that returns a Session with a webAppManifest, etc? or whether something more involved or integration test-like like really installing a PWA to the home screen should be done
I'm not sure what "category" I should put this under in the Changelog(browser-engine-gecko? browser-session?)
As of the time of writing, there appears to be various breaking, unrelated Nimbus-related changes https://github.com/mozilla-mobile/android-components/commit/661a91772e4f1292ad2e81321e8e081b0325cc18 so Fenix doesn't compile with autoPublish.android-components.dir=../android-components; I commented stuff out based on the compile errors just to get AC to build while I was manually testing with Fenix
A couple of websites which have display: standalone in their manifest.json: https://my.unikname.app/ https://app.sworkit.com (no affiliation to either)

Codecov Report
Merging #10229 (8db45ef) into master (867def8) will increase coverage by
2.23%. The diff coverage is4.54%.
@@ Coverage Diff @@
## master #10229 +/- ##
============================================
+ Coverage 73.97% 76.21% +2.23%
+ Complexity 6198 4766 -1432
============================================
Files 828 582 -246
Lines 31473 22880 -8593
Branches 5243 3806 -1437
============================================
- Hits 23281 17437 -5844
+ Misses 5523 3416 -2107
+ Partials 2669 2027 -642
| Impacted Files | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| ...lla/components/browser/engine/gecko/GeckoEngine.kt | 84.06% <0.00%> (-4.19%) |
58.00 <0.00> (ø) |
|
| ...n/java/mozilla/components/concept/engine/Engine.kt | 25.80% <0.00%> (-3.83%) |
0.00 <0.00> (ø) |
|
| ...ponents/browser/session/engine/EngineMiddleware.kt | 84.09% <25.00%> (-6.16%) |
2.00 <0.00> (ø) |
|
| ...nts/browser/menu2/adapter/icons/MenuIconAdapter.kt | |||
| ...mozilla/components/lib/jexl/parser/StateMachine.kt | |||
| ...illa/components/feature/share/RecentAppsStorage.kt | |||
| ...s/browser/storage/memory/InMemoryHistoryStorage.kt | |||
| ...ents/feature/autofill/structure/ParsedStructure.kt | |||
| ...er/menu2/adapter/DividerMenuCandidateViewHolder.kt | |||
| ...illa/components/service/pocket/PocketListenURLs.kt | |||
| ... and 239 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 867def8...8db45ef. Read the comment docs.
This pull request has conflicts when rebasing. Could you fix it @Transfusion? 🙏
This pull request has conflicts when rebasing. Could you fix it @Transfusion? 🙏
Any updates here? #8584 is still a problem...
This pull request has conflicts when rebasing. Could you fix it @Transfusion? 🙏
Closing due to inactivity to code review. If there's interest please feel free to discuss and re-open.