[MGNLUI-6902] DragAndDrop can't be disabled Created: 06/Oct/21  Updated: 08/Oct/21  Resolved: 07/Oct/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2, 6.2.12
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Anne Meister Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screenshot 2021-10-06 at 13.41.38.png     File pages-app.subApps.browser.workbench.contentViews.yaml    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Steps to reproduce

  1. Edit app definition by adding dragAndDrop: false in the workbench definition (see MGNLUI-3835
  2. Check if you can still drag&drop within the app

See Documentation for 5 UI: https://docs.magnolia-cms.com/product-docs/6.2/Support/Magnolia-5-UI-documentation/Content-apps-5-UI/App-configuration-5-UI/Workbench-definition-5-UI.html#_workbench_definition

Worked fine in 5 UI but not 6 UI.

Expected results

After changing the definition, drag&drop should not be working anymore in that app.

Actual results

Changing the definition does nothing, drag&drop works nonetheless.

Workaround

None

Development notes



 Comments   
Comment by Mercedes Iruela [ 07/Oct/21 ]

Hello Anne,

Unfortunately, dragAndDrop property is not available in the new UI. However, you can disable it just not defining the drop constrain in your contentView definition:

dropConstraint:
            class: info.magnolia.pages.app.TemplateTypeRestrictionDropConstraintDefinition

You can find an example in pages-app.yaml.

I am closing this ticket, since there is a different way to configure this. Do not hesitate to create a support ticket if you need help with this configuration.

Best regards,
Mercedes
 

Comment by Anne Meister [ 08/Oct/21 ]

Hi Mercedes

We tried defining the app without the dropConstraint property (empty class, override, false). None of this has any effect at all, which also is the case on demoauthor (deleting the property completely doesn't change the drag&drop behaviour either). I would thus still say it's a Magnolia Bug. Please re-open this ticket.

Also, the documentation says that default behaviour for this property is "false" – which is not the case:

https://docs.magnolia-cms.com/product-docs/6.2/Apps/App-configuration/Content-view-definition.html

dropConstraint optional (used only in tree and list views), default is no drag-and-drop capability
Defines acceptance criteria for move operations. By restricting the nodes that a user can move, you can enforce a certain node hierarchy. For example, you might want to allow moving content under folders but not folders under content. If no value is defined, the view will have no drag-and-drop capability.
Comment by Mercedes Iruela [ 08/Oct/21 ]

Hello Anne,

Excuse me, I think that may be a misunderstanding here. When I try to decorate pages-app app with pages-app.subApps.browser.workbench.contentViews.yaml , the drag&drop is disabled in the tree view for me. Could you try it? What app are you trying to disable drag&drop? Could you check in the definitions app if there is any problem there?

Thanks.
Mercedes

Comment by Anne Meister [ 08/Oct/21 ]

Hi Mercedes

On demoauthor, I deleted the dropConstraint property completely for the pages app, which did not change anything for the pages app. https://demoauthor.magnolia-cms.com/.magnolia/admincentral#app:resources:edit;/pages-app/apps/pages-app.yaml:edit, lines 274-275. This should do the same as adding a decoration to overwrite or am I mistaken there?

And, as I mentioned above, the documentation says that by default, there is no drag-and-drop capability, which is not true at the moment (see on demoauthor, too, where the default should be applied IMO and drag and drop works for all apps).

Generated at Mon Feb 12 09:41:09 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.