Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Correctly handle error screens when the app is offline and allow to open cozy-apps when offline in iOS #1238

Open
wants to merge 5 commits into
base: feat/files_offline
Choose a base branch
from

Commits on Sep 25, 2024

  1. feat: Use NetStatusBoundary only when logged out

    `NetStatusBoundary` is used to display an `offline` error screen when
    the app is offline
    
    Now that we implemented offline mode, we now want to disable the
    `NetStatusBoundary` for cozy-apps as they should now be accessible when
    offline
    
    `NetStatusBoundary` is kept only on onboarding screens
    Ldoppea committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    add192b View commit details
    Browse the repository at this point in the history
  2. fix: Set correct return objects for getIndexHtmlForSlug

    In a previous commit we changed the return type for
    `getIndexHtmlForSlug()`
    
    We did not change the return objects for every execution paths
    
    This commit fixes that
    Ldoppea committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7ef8036 View commit details
    Browse the repository at this point in the history
  3. feat: Enable offline mode only for cozy-home and mespapiers

    For now offline mode has only been implemented in cozy-home and
    mespapiers apps
    
    This commit prevents other cozy-apps to be opened offline
    
    Later we will declare offline support in cozy-apps' manifests, so this
    hard coded condition is meant to be replaced in the future
    Ldoppea committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    21bf405 View commit details
    Browse the repository at this point in the history
  4. feat: Display an error message when opening unsupported offline cozy-app

    Cozy-apps can be opened offline only when they support this mode but
    also when they have been opened at least one time to retrieve necessary
    data to make them run offline
    
    When those conditions are not met, we want to display an error message
    to explain the user why the app cannot be opened
    
    For now this message is in an Alert form, but later we may want to
    improve the UI for this part
    Ldoppea committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    dba021f View commit details
    Browse the repository at this point in the history
  5. feat: Enable HttpServer on iOS when offline

    In iOS, we disabled HttpServer for all cozy-apps as the WebView API may
    behave differently
    
    The side effect is that we cannot open those app when offline as we
    cannot inject minimal code to make them work without network access
    
    So we want to enable HttpServer on those apps when we detect the app to
    be offline
    
    Related PR: #486
    Ldoppea committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    d411dc6 View commit details
    Browse the repository at this point in the history