Closed wouterj closed 7 years ago
I wouldn't be able to solve that issue with the information. The linked issue is talking about showing the menu when clicking on a node. The title here speaks about an option to activate a node.
For me it sounds like activating menu on click or right click based an on option?
When clicking a node in the tree block (not tree form type), the node is activated. However, activating doesn't make any sense in the tree block. Instead of activating, nothing should happen.
Two more questions then:
That activation
event is only used/registered for input fields. From my code understanding the block does not register the event.
The linked issue is saying something about the context menu, which is an different event then and only usefull for block.
Ok, let me try to explain it one time more :)
When you visit http://sandbox.cmf.symfony.com/en/admin/dashboard and click a node in the tree shown, it will get blue. This act of becoming blue (and remaining blue) is called activating. This activating doesn't mean anything on the dashboard (or any other case using the tree block). Instead of activating, we can do 2 things on left click:
I propose to do (2).
When doing (2) we would catch and ignore the event only. I could live with that, but the issue in SonataPhpcrAdminBundle requests for a clear behavior. I can live with both, but we should not offer the menu on click
and contextmeneu
. I would suggest an option passed from configuration, which to use. When it is not on click
we should disable activation then. Doing so, users can have both, the option and configurarion would not hurt.
@ElectricMaxxx I'm against making simple behaviour like this configurable. It doesn't hurt anyone if we're going with (1) or (2), so we should just pick one and implement it.
i would also vote against 1. that leaves us open if we want something to happen in the future, like showing a summary or preview for example.
could it make sense to expand the tree when clicking on a folder node? so i don't need to hit exactly on the (+) thing...
is there drag and drop moving of nodes in the tree? that would be another reason to not do things on left click.
is there drag and drop moving of nodes in the tree? that would be another reason to not do things on left click.
Working on that atm (see #99 )
Ok. So i will do (2) tonight.
Related: https://github.com/sonata-project/SonataDoctrinePhpcrAdminBundle/issues/383