replit / desktop

Replit Desktop App
116 stars 7 forks source link

Consolidate fullscreen APIs #125

Closed sergeichestakov closed 1 year ago

sergeichestakov commented 1 year ago

Why

We want to consolidate onFullscreenEnter and onFullscreenLeave into one API as that interface is cleaner and it's trivial to differentiate between the two with a parameter instead of having to call 2 separate functions with 2 separate listeners and have to worry about storing the dispose functions in an array. Also generally fits better with the React model since you can just pass a setter with that boolean state as the listener.

See thread and Linear task.

What changed

Consolidate fullscreen APIs into one method

Test plan

Testing in a corresponding web branch / PR here: https://github.com/replit/repl-it-web/pull/36046