Manim-Notebook / manim-notebook

Simple commands to replicate the manim dev workflow in VSCode
MIT License
5 stars 0 forks source link

notification stays longer than code is executing (MacOS) #65

Closed VladimirFokow closed 1 day ago

VladimirFokow commented 1 day ago

Log 1:

Manim Notebook.log

Video:

https://github.com/user-attachments/assets/7daeb310-aa35-42f2-b931-4cb3e4cd81bb

Notes:

Code:

from manimlib import *

i = 0

class SquareToCircle(Scene):
    def construct(self):
        #
        ## Test
        i += 1
        print(i)
Splines commented 1 day ago

I think this is because VSCode has baked-in a minimal time that any notification should show, which is actually a good thing just for users to be able to at least read what the message is saying. Otherwise, imagine a notification popping up and the moment you move your eyes to it it's already gone...

You also notice this behavior when you start a log recording. While already started, the "Preparing everything..." notification stays a bit longer on screen.

Due to these reasons I will flag this as won't fix.

VladimirFokow commented 1 day ago

ok, but saying it's "executing" even though it's not - isn't clean.

If anyone fixes this, I think it would be great

VladimirFokow commented 1 day ago

(I'll leave it closed in case that there's really a hard limitation on VSCode's side that it's impossible to show a notification <1s in length)

Splines commented 1 day ago

Related are these lines at vscode and this issue.

// with a delay we only wait for the finish of the promise
if (typeof options.delay === 'number' && options.delay > 0) {
    await progressStateModel.promise;
}

// without a delay we show the notification for at least 800ms
// to reduce the chance of the notification flashing up and hiding
else {
    await Promise.all([timeout(800), progressStateModel.promise]);
}

But the options.delay is not accessible via the API as far as I know.