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 Spec for IsWindowControlsOverlayEnabled.md #4613

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

tochukwuIbeEkeocha
Copy link
Contributor

@tochukwuIbeEkeocha tochukwuIbeEkeocha commented Jun 4, 2024

What

These new APIs introduce support for a Webview2 Window Controls Overlay. The Window Controls Overlay will allow developers to build apps in webview2 with 100% of the UI controlled by the browser process. Devs will be able to create their apps as borderless & caption-less windows, and have the Webview draw its own window control buttons (minimize,maximize, close, restore).

image image

specs/IsWindowControlsOverlayEnabled.md Outdated Show resolved Hide resolved
specs/IsWindowControlsOverlayEnabled.md Outdated Show resolved Hide resolved
specs/IsWindowControlsOverlayEnabled.md Outdated Show resolved Hide resolved
specs/IsWindowControlsOverlayEnabled.md Outdated Show resolved Hide resolved
specs/IsWindowControlsOverlayEnabled.md Outdated Show resolved Hide resolved
specs/IsWindowControlsOverlayEnabled.md Outdated Show resolved Hide resolved
specs/IsWindowControlsOverlayEnabled.md Outdated Show resolved Hide resolved
specs/IsWindowControlsOverlayEnabled.md Outdated Show resolved Hide resolved
@tochukwuIbeEkeocha tochukwuIbeEkeocha force-pushed the api-isWindowControlsOverlayEnabled-draft branch 7 times, most recently from 3866c89 to bce67e9 Compare August 28, 2024 21:54
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
@tochukwuIbeEkeocha tochukwuIbeEkeocha force-pushed the api-isWindowControlsOverlayEnabled-draft branch from bce67e9 to 700ec3a Compare September 4, 2024 20:19
@tochukwuIbeEkeocha tochukwuIbeEkeocha force-pushed the api-isWindowControlsOverlayEnabled-draft branch from 700ec3a to 654b176 Compare September 11, 2024 22:30
@ahqsoftwares
Copy link

Is there any ETA on when this update might come to webview2?

@tochukwuIbeEkeocha tochukwuIbeEkeocha force-pushed the api-isWindowControlsOverlayEnabled-draft branch from 654b176 to 5a4eb5f Compare October 28, 2024 20:47
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
InitializeComponent();
m_AppWindow.TitleBar.ExtendsContentIntoTitleBar = true;

CoreWebView2WindowControlsOverlaySettings config = _coreWebView2Controller.WindowControlsOverlaySettings;
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have a way to get from a WebView2 class to the controller. Where does _coreWebView2Controller come from? I would expect we either plan to update WPF / WinForms / WinUI2/3 WebView2 class to add something for WindowControlsOverlay or to say your new API is only supported when directly using the CoreWebView2Controller class (eg not using a WebView2 class)

Copy link
Member

Choose a reason for hiding this comment

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

@tochukwuIbeEkeocha, can you remind we why we decided to put this object on the Controller and not CoreWebView2? I recall at one point we were thinking about passing in the setting in the ControllerOptions, was that why?

Controller is meant for things the framework needs to host a WebView2, or for things where the framework element already has a defined property (i.e. BackgroundColor). The WindowControlOverlay is content being shown inside the WebView2. If we put it on the CoreWebView2, then it is just available in all the frameworks without us and WinUI having to do work to each WebView2 element.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will move it to the the CoreWebview2 Object.

specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved


/// The `Height` property in raw screen pixels, allows you to set the height of the overlay and
/// title bar area. Defaults to 48px.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a min height? What happens if you make the value very small?

specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Show resolved Hide resolved
specs/WindowControlsOverlayConfiguration.md Outdated Show resolved Hide resolved
@tochukwuIbeEkeocha tochukwuIbeEkeocha force-pushed the api-isWindowControlsOverlayEnabled-draft branch from 2f02f47 to b38a178 Compare November 4, 2024 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Proposal Review WebView2 API Proposal for review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants