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

Add support for fullscreen display mode #212

Merged
merged 5 commits into from
Jun 30, 2020

Conversation

christianliebel
Copy link
Contributor

Closes #175

@christianliebel
Copy link
Contributor Author

@andreban What should we do if the display mode is browser or minimal-ui?

@andreban andreban added the enhancement New feature or request label Jun 27, 2020
Copy link
Member

@andreban andreban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request!

From a Trusted Web Activity perspective, only standalone and fullscreen would make sense. minimal-ui would be similar to launching a Custom Tab and browser just launching a browser Intent. This is specially true for Bubblewrap, as users download an app from an app store don't expect it to open the browser.

When reading the Web Manifest, we'd default browser, minimal-ui and standalone to standalone and fullscreen to fullscreen.

We could use a fullscreen: boolean flag, but having a DisplayMode that only accepts standalone and fullscreen looks more future-proof.

packages/cli/src/lib/inputHelpers.ts Outdated Show resolved Hide resolved
packages/core/src/lib/TwaManifest.ts Outdated Show resolved Hide resolved
packages/core/src/lib/TwaManifest.ts Outdated Show resolved Hide resolved
packages/core/src/spec/lib/TwaManifestSpec.ts Outdated Show resolved Hide resolved
packages/core/src/lib/types/WebManifest.ts Outdated Show resolved Hide resolved
packages/cli/src/lib/cmds/init.ts Outdated Show resolved Hide resolved
packages/cli/src/spec/inputHelpersSpec.ts Outdated Show resolved Hide resolved
Copy link
Member

@andreban andreban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's export a typed Array for DisplayModes so we get nice type checking if we need to use items from the Array later.

Copy link
Member

@andreban andreban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you!

@andreban andreban merged commit dfbc017 into GoogleChromeLabs:master Jun 30, 2020
@christianliebel christianliebel deleted the fullscreen-mode branch July 1, 2020 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for fullscreen/immersive mode
2 participants