Git Product home page Git Product logo

Comments (3)

nkappler avatar nkappler commented on July 19, 2024 1

Thanks for your feedback and your kind words 😊
I haven't had much time to look at your code, but I had a glance. If I understand you correctly, you want to add APIs to control the lifecycle of the menu instead of relying on events doing it for you, in other words, control the opening/closing programmatically, right?
I think there's no reason not to have this, in fact, I had some similar requests in the past, because of the open closeMenu function, which is private at the moment.

Feel free to prepare a PR, I'll be happy to review it.
Please consider the following things:

  • naming should be consistent: either show and hide, or open and close. I wouldn't want to mix it. I prefer show and hide and maybe we should rename/delete the private open closeMenu function to avoid future confusion
  • The github pages file (./docs/demo.js) doubles as a manual test file, as there are no automated tests (yet). Feel free to add some buttons to the page to showcase the feature, or some hidden global functions.
  • I've seen you've added tsdoc comments to the interface. If you could also add the documentation to the README.md that would be absolutely fantastic 💯

Thank you!

from ctxmenu.

nkappler avatar nkappler commented on July 19, 2024

The private open closeMenu method might not be required at all after your change, so if you can replace it with the new show hide method, feel free to delete it...
In your current implementation there are similar functions both for show and hide, which calls for confusion... 🙂

from ctxmenu.

jkorrek avatar jkorrek commented on July 19, 2024

Great! I will give it go in the next couple of days.

from ctxmenu.

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.