Skip to content

Window Controls Overlay 'visible' js bool #56

Description

@travisleithead

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions