w3c / window-management

Window Management API
https://www.w3.org/TR/window-management/
Other
98 stars 25 forks source link

Collecting Developer Feedback #67

Open michaelwasserman opened 3 years ago

michaelwasserman commented 3 years ago

We're interested to hear from developers who have used this API about their general experiences with it, beyond specific issues. Did it satisfy all of your use cases? Was it easy or difficult to integrate with? What alternatives did you consider?

Feel free to open a new GitHub issue regarding the API design, or a new Chromium issue for implementation defects. Thanks!

anssiko commented 3 years ago

This has been added to our TPAC agenda https://github.com/w3c/secondscreen-wg/issues/3 to make the W3C community aware that this API is welcoming developer feedback for signal-boosting through participants' channels and connections. We've had similar efforts for some other specs (see e.g. https://github.com/w3c/ambient-light/issues/64) and have received valuable input from developers through spec repos. I think we need to meet the developers where they are, and bring together feedback from various channels, be it spec GH repos, browser issue trackers, blogs, Twitter etc.

Related, @michaelwasserman if you are able to share any anonymized Origin Trial feedback publicly for this API, it'd be interesting for the W3C group to hear that. I penciled that in on the agenda, just in case.

scottmo-citrix commented 3 years ago

Citrix is interested in this API for our use cases.

anssiko commented 3 years ago

Thank you @scottmo-citrix. If you're able to share more details on your use cases it would help us consider them in the context of the specification design discussions. Details that you may not be able to share publicly you can abstract out.

thomaschaaf commented 2 years ago

We are planing to use the API for our phone system. Our agents have multiple displays and need to be able to have the phone system open on one screen and the crm on a second screen. However we are missing the feature that we can figure out where the popup which we opened was moved. Some of our agents would like to customize how the windows are arranged because maybe they even have three monitors. If the agent has moved the crm from screen 2 too screen 3 we'd like to know so that next time we open the crm we open it on screen 3 aswell. For this we'd love to get access to screen, screenX, screenY, screenLeft, screenTop, innerWidth and innerHeight.

michaelwasserman commented 2 years ago

@thomaschaaf: Thanks for sharing your use case, which should be fairly well-served by this API. You can check any of those Window attributes (and call getScreenDetails()) for a same-origin popup window returned via window.open(). While there is no event fired when a window moves, you can:

  1. Add an event handler for ScreenDetails.oncurrentscreenchange for the popup window to be notified when the window moves between screens (and when any properties of the screen hosting the window change...)
  2. Poll to get the latest placement of the popup window
  3. Check the last placement before close with a Window.onbeforeunload event handler on the popup window (note that beforeunload handlers may not always fire...)
  4. File a new GitHub issue on this repo requesting a Window.onmove API enhancement :)

I hope that helps! Mike