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

Settings editor #1584

Closed rickmcgeer closed 3 months ago

rickmcgeer commented 3 months ago

Describe the Feature This came up when I was going to ask that ctrl/cmd-click not be the bring-up-Halo shortcut, which is nominally easy to do but not the right thing for everybody (the reason I wanted it is it conflicts with the standard multiselect keystroke in lists.). This is one example of a property that needs to be controlled on a per-user and perhaps per-project basis. I believe in another issue thread we discussed profile/config files, and so this is really a doc request -- I'm more than happy to edit the file externally as well as using a Lively widget.

Graphics I'm not a big fan of the VSCode settings editor, but here's a screenshot: image

The Jupyter Settings editor is a little better: image

Implementation Details The easy thing to do is just to document the per-project settings file, if there is one. The editor can follow...

merryman commented 3 months ago

As you mentioned, we already have a smiliar request for the lively config here: https://github.com/LivelyKernel/lively.next/issues/773. I am not really sure what you mean here. Are you suggesting a project specific localconfig.js that is just loaded when the project is loaded?

rickmcgeer commented 3 months ago

At a minimum, a per-user config is desirable, and a per-project localconfig.js (or .json) is helpful in some circumstances -- for example, when there's a multi-select list and the designer wants to support the standard ctrl-click to toggle selection on an item. I was originally going to suggest another shortcut for halo, but that's a usage pain in the neck for current lively users and it's only really important when ctrl-click is a standard shortcut for something else. So that's one use case; I suspect that there are others, similar, when people want to use current Lively shortcuts in a design.

linusha commented 3 months ago

As @merryman mentioned, we are working on a settings editor that makes changing the localconfig.js easier by providing a GUI inside of lively itself. The localconfig.js is a per-user config, as that one is not controlled via git.

We experimented with a per-project config file, however it turned out that implementing that is not trivial. If you absolutely need it, we could probably do it, but for now this feature seemed to be too expensive from our point of view.

As localconfig.js is only loaded when using an actual lively instance and is not available for bundled applications, inside of bundled applications there is currently no out-of-the-box way to customize, e.g., keyboard shortcuts in bundled applications on a per-user basis and you would need to roll your own if that's something that is important. In the case you want to experiment with this, I'd suggest storing stuff in the localstorage of the browser as a starting point.

However, you can overwrite options of the config inside of a project and in fact GalyleoStudio already does that. Inside of the main method you can see how its done :slightly_smiling_face:. Basically, you just need to overwrite the desired key on the config object.

I'll close here for now, let me know if this helps! If necessary, I'll of coure reopen this.