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

Window Controls Overlay 'visible' js bool #56

Open
travisleithead opened this issue Apr 21, 2022 · 0 comments
Open

Window Controls Overlay 'visible' js bool #56

travisleithead opened this issue Apr 21, 2022 · 0 comments

Comments

@travisleithead
Copy link
Member

This issue has been migrated from MicrosoftEdge/MSEdgeExplainers#275

@michaelwasserman commented on 2020-04-07

The Window Controls Overlay explainer describes offering a 'visible' js bool in addition to the bounding rect.

I wonder if checking for an empty rect would suffice? Might the rect ever return bounds but not be visible? (or the inverse). Maybe a bool makes the logic a little simpler for sites (instead of checking that the width and height are both 0).

I also wonder if the controls might ever auto-hide like the ones in Windows 10's "Movies & TV" app do when that's in fullscreen mode. Chrome has similar behavior in fullscreen with the exit button appearing on top-edge mouse hovers or touch drags.


@amandabaker commented on 2020-04-07

I wonder if checking for an empty rect would suffice?

Checking for an empty rect would be sufficient to determine if the overlay is visible, but like you said, including the visible member makes the logic simpler and easier to understand. Do you see including the visible member on controlsOverlay as problematic?

I also wonder if the controls might ever auto-hide like the ones in Windows 10's "Movies & TV" app do when that's in fullscreen mode.

Currently, there is no intention to ever hide the overlay. A user could still enable fullscreen (F11) on the app to achieve a similar result, but otherwise the overlay will always be visible when enabled (except the out-of-scope case you pointed out earlier)

@michaelwasserman commented on 2020-04-07

A 'visible' flag might be helpful, but cautious devs may feel compelled to check both the flag and the rect emptiness, and it would be unclear how to handle a discrepancy. Sometimes a single source of truth is simpler than additional API surface, even if it means devs need to check |visible = rect.width > 0 && rect.height > 0|. Documentation explicitly stating the flag's relation to rect emptiness might be helpful in that regard.

Thanks for clarifying that these controls should always be visible in windowed-mode and hidden in fullscreen mode; that might also be valuable to document in the explainer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant