Re: [csswg-drafts] Standardizing `app-region` for draggable app windows (#7017)

Hey all 👋 I'm the maintainer of [Wails](https://wails.io) - an electron alternative for Go. Having this standardised would be amazing for us (as I'm sure it would be for other frameworks such as Tauri) as currently we have to hack this functionality in using JavaScript. Recently, Microsoft announced that WebView2 would support `app-region` and sure enough it works fine, however in their implementation, right clicking on any element with `app-region: drag` brings up a title bar menu, which was somewhat unexpected. I reported that as a bug [here](https://github.com/MicrosoftEdge/WebView2Feedback/issues/3565) however the response was that it was working as intended. 

So why am I bringing this up here? Well, if you read the proposal in the initial comment, everything mentioned in it is geared around the title bar as, for sure, that's how it'll be used in the majority of use cases. However, I'd argue that `app-region: drag` doesn't reflect that the intent is for it to live at the top of the page as a title bar at all. 
Currently, if you right click on a drag region in Electron it does show the title bar menu (at least on Windows) so you could argue that Microsoft is being consistent. But I believe a far more accurate value for this behaviour would be `app-region: titlebar` which indicates it should work like an OS titlebar, right click menu and all. 

I'll end with a couple of questions: 
- With regards to the standard, should "drag" be read as "titlebar"? If so, I think it should be stated explicitly. 
- Should this proposal also cover whether a "drag region" should be implemented strictly as a title bar or can we also have a value that indicates that the region should be "drag only", e.g. `app-region: drag-only` and shouldn't be implemented as a title bar?

Thank for your time 🙏 

-- 
GitHub Notification of comment by leaanthony
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7017#issuecomment-1609114145 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 27 June 2023 09:18:37 UTC