Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Add option to disable activating nodes #132

Closed
wouterj opened this issue Jan 8, 2017 · 10 comments · Fixed by #136
Closed

Add option to disable activating nodes #132

wouterj opened this issue Jan 8, 2017 · 10 comments · Fixed by #136
Milestone

Comments

@wouterj
Copy link
Member

wouterj commented Jan 8, 2017

Related: sonata-project/SonataDoctrinePhpcrAdminBundle#383

@wouterj wouterj added this to the 2.0 milestone Jan 8, 2017
@ElectricMaxxx
Copy link
Member

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.

@ElectricMaxxx
Copy link
Member

For me it sounds like activating menu on click or right click based an on option?

@wouterj
Copy link
Member Author

wouterj commented Jan 29, 2017

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.

@ElectricMaxxx
Copy link
Member

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.

@wouterj
Copy link
Member Author

wouterj commented Jan 29, 2017

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:

  1. Show the context menu (so left & right click behave the same)
  2. Do nothing

I propose to do (2).

@ElectricMaxxx
Copy link
Member

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.

@wouterj
Copy link
Member Author

wouterj commented Jan 29, 2017

@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.

@dbu
Copy link
Member

dbu commented Jan 29, 2017

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.

@wouterj
Copy link
Member Author

wouterj commented Jan 29, 2017

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 )

@ElectricMaxxx
Copy link
Member

ElectricMaxxx commented Jan 29, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants