[MGNLUI-7579] Target item should be expanded when moving items into it Created: 21/Oct/22  Updated: 28/Feb/23  Resolved: 17/Feb/23

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3, 6.2.29

Type: Bug Priority: Neutral
Reporter: Thuy To Assignee: Antonín Juran
Resolution: Fixed Votes: 0
Labels: folder
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Cloners
duplicate
duplicates MGNLUI-6813 Parent of moved item not auto-expanded Closed
relation
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLUI-7858 Implementation Sub-task Closed Antonín Juran  
MGNLUI-7859 Code review Sub-task Closed Roman Kovařík  
MGNLUI-7860 Pre-integration QA Sub-task Completed Roman Kovařík  
MGNLUI-7861 Final QA Sub-task Completed Jaromir Sarf  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* 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:
Epic Link: Issues with moving content item
Sprint: Nucleus 30
Story Points: 2
Team: Nucleus
Work Started:

 Description   

Problem: When moving, assets are focused on but folder containing assets doesn't expand.

The issue occurs both Dam and Pages app.



 Comments   
Comment by Roman Kovařík [ 12/Dec/22 ]

Discovery taken from NORSU-737

The originally reported issue affects also JCR as MoveAction doesn't reset the ValueContext (fixing this would required a ticket in UI but it's not a norsu only issue): MGNLUI-7579

Comment by Antonín Juran [ 08/Feb/23 ]

Discovery

We could inject DatasourceObservation into TreeView and register there TreeView#expandParents as an action like:
datasourceObservation.register(() -> {
expandParents(valueContext.get().collect(toSet()));
});

 

Comment by Roman Kovařík [ 08/Feb/23 ]

This would cause parent expansion on any future change in the datasource (any edit).

I believe the original discovery still applies, it should be enough to call valueContext.set(item) which is already triggering the expansion in other use cases.

Comment by Antonín Juran [ 08/Feb/23 ]

To trigger TreeView#expandParents in SelectionListener of TreeGrid in TreeView we should call valueContext.clear() before its setting in the MoveAction#execute to get true on the not equals check in valueContext.observe in GridView.

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