Skip to content

Commit

Permalink
fix: Latest WG edits
Browse files Browse the repository at this point in the history
  • Loading branch information
jlacivita committed Oct 30, 2023
1 parent 17b0b2f commit 0feb4d6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
8 changes: 5 additions & 3 deletions requirements/specifications/lifecycle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ Apps in this state **MUST NOT** have access to the audio-video decoder.
Apps in this state **MUST NOT** use the media pipeline.

See [Initializing an app](#51-initializing-an-app) for more information.
### 3.2. Running

### 3.2. Running

This state allows an app to be running and ready to go, but not actively part
of the user-perceptible experience.
Expand All @@ -167,8 +167,8 @@ Apps in this state **MUST NOT** have access to the audio-video decoder.

Apps in this state **MUST NOT** use the media pipeline and the platform
**MUST** tear down any Media Pipeline sessions associated with this app.
### 3.3. Active

### 3.3. Active

This state allows an app to be presented as part of the user-perceptible
experience.
Expand Down Expand Up @@ -626,6 +626,7 @@ terminated.

During the `resume()` transition, apps **SHOULD** reallocate graphics
composition and other necessary resources.

### 5.6. Putting an app to sleep

TBD
Expand Down Expand Up @@ -691,13 +692,14 @@ place of graceful [destroying](#58-destroying-an-app).
## 6. Create Parameters

The `CreateParameters` type is an object with the following properties:

```typescript
type CreateParameters = {
preload: boolean,
preloadReason?: "boot" | "restart" | "user"
}

```
## 7. Core SDK APIs
Expand Down
33 changes: 21 additions & 12 deletions requirements/specifications/lifecycle/presentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ intents, which are like deep links from the platform.
- [5.2. App-provided Loading Screen](#52-app-provided-loading-screen)
- [5.3. When to use a loading screen](#53-when-to-use-a-loading-screen)
- [6. Overlay](#6-overlay)
- [6.1. 4.1 Overlay vs Focus](#61-41-overlay-vs-focus)
- [6.1. Overlay vs Focus](#61-overlay-vs-focus)
- [7. Navigation](#7-navigation)
- [8. Background Audio](#8-background-audio)
- [9. Picture-in-Picture Video](#9-picture-in-picture-video)
Expand Down Expand Up @@ -75,6 +75,7 @@ goes offscreen, it's now offscreen.
### 4.1. Display vs Lifecycle

Each Lifecycle state only supports certain display states:

| Lifecycle | Supported Displays |
|----------------|--------------------------------------------------|
| `initializing` | `none`, `loading` |
Expand All @@ -83,7 +84,6 @@ Each Lifecycle state only supports certain display states:
| `suspended` | `none`, `loading` |
| `sleeping` | `none`, `loading` |


See [Picture-in-picture](#9-picture-in-picture-video) and [Background
Audio](#8-background-audio) for exceptions to this.

Expand All @@ -93,6 +93,12 @@ loading screens to end users when an app is going to be activated. Loading
Screens may be rendered either by the platform, the app, or both, depending on
Capability configuration.

Proposal:

If an app has the `xrn:firebolt:capability:presentation:loading-screen` capability, it **MAY** be made visible any time from the beginning of activate() transition and **MUST** be made visible no later than the end.

If an app does not have the `xrn:firebolt:capability:presentation:loading-screen` capability, it **MUST** be made visible at the end of the activate() transition.

### 5.1. Platform-provided Loading Screen

Most apps will leverage a platform-provided loading screen.
Expand Down Expand Up @@ -121,12 +127,14 @@ If an app provides the `xrn:firebolt:capability:presentation:loading-screen`
capability, then the platform **MAY** invoke this capability in some
situations.

If the app is in the [Initializing](./index.md#51-initializing-an-app) state or
the create transition w/ `preload: false` then it **MUST** be made visible at
the end of the `Application.create()` transition.
**TODO**: this section only applies for app-provided loading screens...

If the app is in any other state or transition, then it **MUST** be made
visible at the beginning of the `activate()` transition.
If the app is being explicitly launched by the user then it **MAY** be made visible either:

- as soon as the platform detects changes to the graphics plane
- at the beginning of the activate() transition

In this case, it **MUST** be made visible no later than the end of the activate transition.

The presentation state of the app **SHOULD NOT** be `none` at any time during
the `activate()` transition.
Expand All @@ -142,18 +150,19 @@ Platforms **SHOULD** consider displaying a loading screen for:
- app cold launch
- app wake from sleep

TODO: define all the various happy path & edge cases for this.

## 6. Overlay

The `Presentation` module **MUST** have an `overlay` string property that
returns one of the following values:
informs the app when a focus-consuming overlay is present.

| Value | Description |
|------------|----------------------------------------------------------------------------|
| `partial` | There is a vertical sidebar covering less than 33% of the app on one side. |
| `blocking` | There is a significantly sized UX covering a majority of the app. |
| `partial` | There is a overlay partially covering the app such that the content is still mostly viewable. |
| `blocking` | There is a blocking overlay covering a majority of the app. |
| `none` | There is nothing covering the app. |

### 6.1. 4.1 Overlay vs Focus
### 6.1. Overlay vs Focus

| Focus | Overlay |
| ----- | ----------------------- |
Expand Down

0 comments on commit 0feb4d6

Please sign in to comment.