mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 06:18:45 +08:00
feat(mobile): improve android edgeless & ci (#15118)
#### PR Dependency Tree * **PR #15118** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Improved mobile CI workflow with change-aware Android/iOS build jobs and updated completion dependencies so tests wait for the relevant mobile builds. * **Performance / App Behavior** * Enhanced Android WebView behavior: improved viewport/WebView tuning, disabled zoom and scrollbars, and made mixed-content allowance environment-aware (debug vs non-debug). * Adjusted Android cleartext traffic handling based on build/debug settings and Capacitor server URL configuration. * **Tests** * Strengthened Electron BYOK storage tests with per-test temporary directories, mock control, and added coverage for when secure storage is unavailable. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -2,3 +2,21 @@ import '@affine/core/bootstrap/browser';
|
||||
import '@affine/component/theme';
|
||||
import '@affine/core/mobile/styles/mobile.css';
|
||||
import './proxy';
|
||||
|
||||
import { viewportRuntimeConfig } from '@blocksuite/affine/std/gfx';
|
||||
|
||||
// Android WebView is less prone to the iOS WKWebView process kill, so keep the
|
||||
// user-facing zoom range unchanged. These knobs only reduce gesture-time work
|
||||
// and low-zoom canvas memory while preserving the normal-zoom render quality.
|
||||
viewportRuntimeConfig.VIEWPORT_REFRESH_PIXEL_THRESHOLD = 60;
|
||||
viewportRuntimeConfig.VIEWPORT_REFRESH_MAX_INTERVAL = 300;
|
||||
viewportRuntimeConfig.SKIP_REFRESH_DURING_GESTURE = true;
|
||||
viewportRuntimeConfig.OVERSCAN_RATIO = 0.2;
|
||||
viewportRuntimeConfig.OVERSCAN_RATIO_BLOCK = 0;
|
||||
// Keep this aligned with iOS: the ~200ms gesture debounce plus this delay gives
|
||||
// elements/connectors enough time to settle while still reappearing within ~500ms.
|
||||
viewportRuntimeConfig.POST_GESTURE_REFRESH_DELAY = 220;
|
||||
viewportRuntimeConfig.CANVAS_DPR_CAP_BY_ZOOM = [
|
||||
[0.5, 1],
|
||||
[0.8, 2],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user