Code Monkey home page Code Monkey logo

Comments (7)

hassandraga avatar hassandraga commented on July 29, 2024 2

Implemented (4fb247e).

// Single window
webui_set_event_block(win, true);
// All windows
webui_set_config(ui_event_block, true);

from webui.

hassandraga avatar hassandraga commented on July 29, 2024

Actually, all old versions (2.2 and older) were single thread processing system, but I noticed if an event block for too long by the backend code, the user may click again, and again, which give a bad UX overall.

Your proposal is instead of completely removing the single thread processing, we can add a new API to let the programmer to choose which system he prefers. Honestly, this is a great idea. Thank you for the suggestion.

Making this new option at bind level may take time to correctly implement and test. I suggestion instead making it a window level, so the new API can be for example webui_set_bind_blocking(myWindow, true), so all binds in this window will be a one thread processing system.

@dgllghr, what do you think?

from webui.

dgllghr avatar dgllghr commented on July 29, 2024

I like that! I like it because it reduces complexity (you are only ever dealing with one system or the other). And I like it because my guess would be that most users would really only want one or the other for a single app: all events are ordered (or not), we have a separate runtime system (or we want webui to handle it).

I'm happy to give the implementation a shot. Or if you'd rather do it since it is a fundamental change, I understand.

from webui.

hassandraga avatar hassandraga commented on July 29, 2024

That's fine. I have already started working on it. I will push the commit soon.

I'm also thinking of adding it to webui_set_config() as you said, in case someone wants this system for the whole app (all windows). However, webui_set_bind_blocking() is for a single window if someone wants both systems.

from webui.

dgllghr avatar dgllghr commented on July 29, 2024

Oh I see. I misunderstood the distinction. Yes I think that makes sense, too.

from webui.

hassandraga avatar hassandraga commented on July 29, 2024

I just noticed the name, probably webui_set_event_block should be webui_set_event_blocking.

from webui.

hassandraga avatar hassandraga commented on July 29, 2024

webui_set_event_block renamed to webui_set_event_blocking.
d394a2f

from webui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.