LivelyKernel / lively.next

lively.next is a personal programming kit. It emphasizes liveness, directness, and interactivity.
https://lively-next.org
MIT License
65 stars 16 forks source link

Re-using Lively UI items #1487

Open rickmcgeer opened 4 months ago

rickmcgeer commented 4 months ago

What would you like to achieve? I'd like a set of high-level UI items and widgets I can use in my projects, and I know that they are already available in Lively. These include (but aren't limited to):

  1. Drop-down menus
  2. Menu bar
  3. File browser
  4. Search box attached to 1-3

The thing is, I know this stuff is already in Lively. For example, the Module Browser is amazing. But these components aren't really available to Lively developers for items other than Lively development.

How are you trying to achieve that ATM, rolling my own (badly) by looking at the code and guessing.

Additional Resources I think 80% of this is documentation and the remainder are a (few) very high-level methods. For example:

  1. Setting the action of a button should be a single method call -- it's actually pretty much there for buttons, since there's an action field already
  2. Same thing for a drop-down list: it should be a single call (addItem(label, action))

Most of this is really easy (or should be) but it's not done and a user/developer really doesn't have the information to do it themselves

Version: Please paste the lively.next commit on which the problem occurred here (use the copy button of the Version Checker in the bottom left corner). af0c3623fbe24a48097cb69eace75feafddf0406

rickmcgeer commented 4 months ago

As I think about this, there's actually a straightforward way to do this (and get documentation, too!). Factor the Lively UI into Lively-specific applications of reusable components, with an emphasis that the Lively level should be very thin. I will do the same with Galyleo. The general idea is that we'll not only have reusable components for the UI, we'll also have working examples of how to use them

linusha commented 4 months ago

You are absolutely right. This has been on our roadmap basically since we started working focused in 2021. We have #529 and want to ship it this summer! I'll leave this open to up the pressure on us :joy:

rickmcgeer commented 4 months ago

I want them today! :-) Which means I'll be happy to help.
In particular, I was looking at the code for the dropdowns from the top bar (we replicate these in Galyleo, but I think @merryman just copied this, so I wasn't involved), and I confess I really don't understand the code. If I can an idea of the anatomy of it, I'll be happy to work on this one.