Skip to content

Conversation

@fernandojsg
Copy link
Member

@fernandojsg fernandojsg commented Jul 12, 2016

  • Added clone and remove entity to the Edit menu
  • ID Collision detection that will add an incremental suffix
    screenshot 2016-07-12 17 41 00
  • Remove entity ask for confirmation
  • Menu => ExportMenu, CreateMenu and EditMenu
  • Fixes Clone entity #36 and Purpose of "Edit" menu? #13
this.addObject(event.target.object3D);
}.bind(this));

document.addEventListener('componentchanged', function(event) {
Copy link
Member

Choose a reason for hiding this comment

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

event => { ... } will give you the binding

@ngokevin
Copy link
Member

Is the Edit Menu the best place? There's a lot of distance between the Entity in the SceneGraph to the Edit Menu, so the mapping is not immediate. Can we move these actions to the SceneGraph (right-click contextual menu or action icons)

@fernandojsg
Copy link
Member Author

@ngokevin regardless the position on the UI I think it's good idea to keep all the options in the menu too, so people could access them even if some of the panels are collapsed for example.
In any case I also think the best place to have the icons is also in the scenegraph, maybe you could click an entity and the delete button will be aligned to the right in the same row.
I also like the contentmenu option, probably even on the viewport too, so you could click on the entities and see some options related to them.
This PR is more about adding the functionality, and then I could add another two one for context menu and another for icons in scenegraph.

@ngokevin
Copy link
Member

We don't have collapsible panels at the moment, so right now it's not ideal to address that case. I think even then, we'd just prescribe to open up the Scene Graph to do entity-level management.

@dmarcos
Copy link
Member

dmarcos commented Jul 13, 2016

What about a contextual menu (with clone, delete) as well on the viewport when right-click on an entity?

@dmarcos
Copy link
Member

dmarcos commented Jul 13, 2016

If we add the delete, clone on both the viewport and the scene graph we might be able to get rid of the edit menu. Edit menu feels indirect while a contextual menu / icon feels more like direct manipulation which reinforces the mapping between action and target of that action.

@fernandojsg
Copy link
Member Author

Yep, I was more on the way to keep all the actions on the menus as most of the apps does, like firefox you've context menu to copy, paste, whatever but you have also shortcuts and at the end you can always go to the menu.
I believe for me the most confortable will be probably contextmenu on viewport and shortcuts but this is more for "power" users.
About adding icons to the scenegraph, probably delete it's the most common that you can have there, and maybe clone too?
What I mean is that there's no problem in duplicate places where you can do the same action so isn't? so we could have them all in the menu

@fernandojsg
Copy link
Member Author

Btw from the discussion in #203
Do you think we should include the clone icon too in next to the delete icon on the selected entity?
screenshot 2016-07-14 00 28 16

@dmarcos
Copy link
Member

dmarcos commented Jul 13, 2016

How do you create a child of a given entity? If you select one and click on the + icon?

@dmarcos
Copy link
Member

dmarcos commented Jul 13, 2016

What about copy and paste for entities instead of clone? You copy an entity and can click on another one to paste it as a child. That would allow for easy creation of hierarchies.

@fernandojsg
Copy link
Member Author

Copy/paste should be on the contextmenu instead of icons right?
I'm not sure about to create a child of the selected entity with just pressing +.
Because typically you'll have always one entity selected (instead of a-scene) Unity/3DS and so on typically works that way, you just add an entity at the end of the scenegraph and then you decide where to locate it.
One option could be having two + buttons one to add an entity at the end of the scenegraph and another one (just enabled if one entity is selected) to add an entity inside the current selected entity.
Another option is that + will be always add at the end, and we could add an option in the contextmenu for each entity to add a child entity (or whatever)

@dmarcos
Copy link
Member

dmarcos commented Jul 13, 2016

Copy / paste could be accessed on:

  1. Keyboard shortcut ctrl+c / ctrl + v.
  2. Contextual menu or icons associated to the entity.
  3. Maybe also next to the + icon in the scenegraph.

We can also add a create child and paste actions to the contextual menu of the entity.

@fernandojsg
Copy link
Member Author

Ok, so I'll split all this things into different issues and PR and we could keep discussing them there, as there many little things going here

@fernandojsg
Copy link
Member Author

What do we do with this PR? Just merge the way it works right now with the Edit menu? and create another PR adding the clone and remove buttons on the �scenegraph`s entity, or modify this PR to include these button too?

@dmarcos
Copy link
Member

dmarcos commented Jul 14, 2016

Are you going to include html elment + id in the scenegraph in this PR?

@dmarcos
Copy link
Member

dmarcos commented Jul 14, 2016

We can add clone and remove in this PR too I think.

@fernandojsg
Copy link
Member Author

Are you going to include html elment + id in the scenegraph in this PR?

No, I'll leave that for another PR

@fernandojsg
Copy link
Member Author

We can add clone and remove in this PR too I think.

Ok, so I'll add clone and remove buttons next in the scenegraph in this PR and leave the rest for other PRs/issues

@fernandojsg
Copy link
Member Author

Btw how do you feel about select the newly created element after clone, or keeping selected the element to be clone?

@dmarcos
Copy link
Member

dmarcos commented Jul 14, 2016

I think + or clone should select the new element.

@fernandojsg
Copy link
Member Author

Updated with the clone and remove icon added to the scenegraph. When cloning an entity it will select the new entity by default and when removing it will select the closest entity (first looking forward and then backward):
removeclone

@ngokevin
Copy link
Member

Do we keep the Edit Menu? Don't know if we want more than one way to do something.

}
}

function findClosestEntity(entity) {
Copy link
Member

Choose a reason for hiding this comment

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

lint :)

Copy link
Member Author

Choose a reason for hiding this comment

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

👼

@ngokevin
Copy link
Member

r+wc

@fernandojsg
Copy link
Member Author

@ngokevin re leaving the options in the edit menu, let's leave them there until we'll decide which icons we'll show on the scenegraph. As one of the next things that I'll do is to copy/paste, probably we don't want to have copy, paste, clone and delete in the scenegraph, so we could arrange it in another PR/issue

@fernandojsg fernandojsg merged commit 7eb84ad into aframevr:master Jul 15, 2016
@fernandojsg fernandojsg deleted the delete branch July 15, 2016 09:38
@ngokevin
Copy link
Member

The same thing still applies to copy/paste though, you want to keep the direct mapping between the entity and its actions.

@fernandojsg
Copy link
Member Author

Yep, but what if we have like 10 actions for the entity, we should leave some of them in the context menu and just the two/three more common on the icons next to the entity data on the scenegraph right?

@ngokevin
Copy link
Member

Maybe, maybe not. But that's assuming we have 10 actions, which we don't at the moment.

fernandojsg added a commit to fernandojsg/aframe-inspector that referenced this pull request Jul 18, 2016
Added clone and remove entity to the Edit menu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants