Skip to content

Conversation

@Nyan11
Copy link
Collaborator

@Nyan11 Nyan11 commented Nov 29, 2023

#91

@Nyan11
Copy link
Collaborator Author

Nyan11 commented Nov 29, 2023

The CI is fix here : OpenSmock/Bloc-Serialization#11

@labordep labordep self-requested a review December 2, 2023 11:31
Copy link
Member

@labordep labordep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why "roots" have an "s" and why there is a collection and not just BlSpace>>root element when there is no selection.

image

Copy link
Member

@labordep labordep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All cases are good expect the root case, I think this should be as the single selection case.

@Nyan11
Copy link
Collaborator Author

Nyan11 commented Dec 9, 2023

I don't understand why "roots" have an "s" and why there is a collection and not just BlSpace>>root element when there is no selection.

Hello,

I choose "root" to be the collection containing the BlElement.

It was a requirement that Pyramid saves a Collection of elements.

If we make it able to edit the BlSpace>>root element, i'm afraid we could have unwanted behaviour with the openFromSpace shortcut.

Is the BlSpace>>root element the same in Pyramid and in the Space we opened it from ? (We have 2 BlSpace and also 2 root BlElement. One from the original space, one to display the Pyramid Editor)

@labordep
Copy link
Member

labordep commented Dec 9, 2023

I don't understand why "roots" have an "s" and why there is a collection and not just BlSpace>>root element when there is no selection.

Hello,

I choose "root" to be the collection containing the BlElement.

It was a requirement that Pyramid saves a Collection of elements.

If we make it able to edit the BlSpace>>root element, i'm afraid we could have unwanted behaviour with the openFromSpace shortcut.

Is the BlSpace>>root element the same in Pyramid and in the Space we opened it from ? (We have 2 BlSpace and also 2 root BlElement. One from the original space, one to display the Pyramid Editor)

Hi @Nyan11!

We shouldn't show users the technical details of Pyramid.
So, technically, it's good to handle two "Spaces": one for editing and one for viewing.
We can improve this later if needed.

Why does it matter?
From a user perspective, in the Playground, when I haven't selected elements, I use a Space and add elements to it.
As a user, I don't know the technical details of Pyramid, and I don't want to.
Pyramid users expect a Bloc API level in the Playground.
When no elements are selected, I can access the "root" element of the BlSpace (without an "s" because this is a Pyramid technical stuff).

If I understand your explaination there is an issue because if we expose the root to the user, this is not the "view" root but the pyramid edition "root", right ? The risk is to install behavior on this root and lost it when the view is opened in a test window or when the editor is closed to go back the original edited view ?

@Nyan11
Copy link
Collaborator Author

Nyan11 commented Dec 9, 2023

If I understand your explaination there is an issue because if we expose the root to the user, this is not the "view" root but the pyramid edition "root", right ? The risk is to install behavior on this root and lost it when the view is opened in a test window or when the editor is closed to go back the original edited view ?

Yes. For example, i set a specific layout in my root to display the children, this layout will not be replicated in "test space" or "original space".

@Nyan11
Copy link
Collaborator Author

Nyan11 commented Dec 9, 2023

One possible solution is to force the user to always have always one element as root.

The +++

  • the root can be the same as the "original" root and the "test" root
  • It make serializing/materializing a bit simplier.

The ---

  • You cannot have multiples elements as roots
  • It will change a lot of thing in Pyramid
  • If you want to replace the root element, it will be complicated. (For example if you want your root to be a (ToPanel and not a BlElement)

@Nyan11
Copy link
Collaborator Author

Nyan11 commented Dec 12, 2023

Check this work : #111

Edit ok, tree is updated when a new element is added

@Nyan11
Copy link
Collaborator Author

Nyan11 commented Dec 14, 2023

image

image

image

image

image

Ready to merge (closing #111 and #91)

@labordep labordep merged commit c370ef2 into main Dec 16, 2023
@labordep labordep deleted the Issue_0091 branch December 16, 2023 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants