You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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)
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.
The text was updated successfully, but these errors were encountered:
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
@michaelwasserman commented on 2020-04-07
The text was updated successfully, but these errors were encountered: