OpenSmock / Pyramid

Pyramid is a Graphical User-Interface (GUI) builder and editor for Bloc and Toplo.
MIT License
33 stars 6 forks source link

Write a BlSpace extensions to edit a Space into Pyramid #83

Closed labordep closed 1 year ago

labordep commented 1 year ago

Remove BlElement>>openInNewSpaceWithPyramidShortcut and propose a BlSpace extensions to activate or not the shortcut. For example:

space := element openInNewSpace.
space canEditWithPyramid: true.
"> Type the F12 Key"

EDIT : Just remove BlElement>>openInNewSpaceWithPyramidShortcut and create a Settings section (see reflexion below)

labordep commented 1 year ago

I suggest to inject this behavior by default in Bloc extensions with a settings in a dedicated Pharo section.

My proposition :

image

This can be a global var from this settings and use in space canEditWithPyramid: true.. For delivery / packaging we will switch this property to off.

labordep commented 1 year ago

I think it can be prefer to exclude edition function and shortcut to edit function. Actually there is that :

element editWithPyramid.
space editWithPyramid.

The shortcut F12 on a Space is just a link to this function. And the capacity to edit a Space with a shorcut should be managed by Settings as this issue description. So don't need to add canEditWithPyramid: true because it is already on Settings.

Now we need to inject the shortcut behavior into each instanciate BlSpace.

labordep commented 1 year ago

@Nyan11 We should use the Phase system of Bloc to do that with creating a specific Pyramid Phase (see Toplo skin installer phase). The hook to install this phase can be from an event send by the BlUniverse when a Space is added with BlParallelUniverseHostSpaceCreatedSignal or BlParallelUniverseHostSpaceAddedSignal.

labordep commented 1 year ago

@Nyan11 I'm starting to write a plugin for that.