Page MenuHomePhabricator

[desktop] Draggable window
ClosedPublic

Authored by michal on Nov 15 2022, 12:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 8:16 AM
Unknown Object (File)
Mon, Nov 4, 8:16 AM
Unknown Object (File)
Mon, Nov 4, 8:16 AM
Unknown Object (File)
Mon, Nov 4, 8:16 AM
Unknown Object (File)
Tue, Oct 22, 4:34 PM
Unknown Object (File)
Fri, Oct 18, 10:28 PM
Unknown Object (File)
Fri, Oct 18, 2:01 PM
Unknown Object (File)
Fri, Oct 18, 2:01 PM
Subscribers

Details

Summary

After hiding the titlebar users can't drag the window using it. The standard way to do it is to add a -webkit-app-region: drag property to our custom titlebar.

Test Plan
  • Check that you can drag the window using the titlebar
  • Check that you can't drag using buttons

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat added a subscriber: kamil.

I think it would be good for @kamil to review this too – he's looking at ENG-1687: Explore sqlite-worker NPM package, which is related to ENG-1685: Stateful web client, which I think has some connection to the Electron app. Given this overlap I think it makes sense for @michal to review @kamil's diffs in the space, and for @kamil to review @michal's diffs in the space.

tomek requested changes to this revision.Nov 15 2022, 6:18 AM

Have you checked if "traffic lights" buttons (top-left corner) aren't draggable?

web/app.react.js
194–196 ↗(On Diff #18425)

Shouldn't we add the new class to the header?

web/style.css
88–93 ↗(On Diff #18425)

Why do we make this draggable?

This revision now requires changes to proceed.Nov 15 2022, 6:18 AM
web/app.react.js
194–196 ↗(On Diff #18425)

Yeah, that makes sense.

web/style.css
88–93 ↗(On Diff #18425)

Not sure what you mean? The .wordmark is set to no-drag (because it's a button). Or is this the same comment as "Shouldn't we add the new class to the header?"?

Moved the new css class to the header.

Traffic light aren't draggable.

web/style.css
91–93 ↗(On Diff #18553)

Not sure if I should add a new class like electron-non-draggable instead of this?

atul added inline comments.
web/style.css
91–93 ↗(On Diff #18553)

I think that'd make sense

tomek added inline comments.
web/app.react.js
193 ↗(On Diff #18553)

It's probably not worth it, but I guess we could handle it on css by using some media query

This revision is now accepted and ready to land.Nov 18 2022, 7:52 AM