[MGNLUI-3509] Action availability inconsistent when switching between subapps Created: 29/Jul/15 Updated: 15/Apr/16 Resolved: 18/Nov/15 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | actionbar, content app, user interaction |
| Affects Version/s: | 5.3.10, 5.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Richard Gange | Assignee: | Oanh Thai Hoang |
| Resolution: | Obsolete | Votes: | 0 |
| Labels: | support | ||
| Remaining Estimate: | 3d 1h | ||
| Time Spent: | 7h | ||
| Original Estimate: | 4d | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| 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: | |||||||||||||||||||||
| Sprint: | Saigon 19 | ||||||||||||||||||||
| Story Points: | 8 | ||||||||||||||||||||
| Description |
|
When switching between subapps the state of the subapp can be come inconsistent. To recreate:
|
| Comments |
| Comment by Oanh Thai Hoang [ 18/Nov/15 ] |
|
Hi mgeljic, This bug can be reproduced in version 5.3.10 but can't reproduce for later versions. After investigating, I found out it has been totally fixed in ticket: https://jira.magnolia-cms.com/browse/MGNLUI-3562. Here is the part has fixed the issue in TreeViewImpl class:
@Override
public void select(List<Object> itemIds) {
tree.setValue(null);
Object firstItemId = itemIds == null || itemIds.isEmpty() ? null : itemIds.get(0);
if (firstItemId == null) {
return;
}
for (Object id : itemIds) {
tree.select(id);
}
rowScroller.bringRowIntoView(firstItemId);
}
Before the fix applied, the sentence tree.setValue(null) was put after the if condition. Therefore, there is a case that return sentence will be called and finished without setting null to tree. For more details, please refer to the PR: https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/commits/f2407432fe7aae54e165edf0ef8364c50a67ef7c |
| Comment by Mikaël Geljić [ 18/Nov/15 ] |
|
Thanks for the findings! Any chance this can be backported to 5.3.x? PS: I would argue that item should remain selected when double-clicking/switching back (cc @weder), but we can first fix this inconsistency, then revisit it in followup ticket. |
| Comment by Oanh Thai Hoang [ 18/Nov/15 ] |
|
Hi mgeljic Thank you for your information. It already backported to version 5.3.11 at commit c8e61814c9. I did test in version 5.3.12-SNAPSHOT also. It works well |
| Comment by Mikaël Geljić [ 18/Nov/15 ] |
|
Ah, I misread your comment |
| Comment by Jan Haderka [ 19/Nov/15 ] |
|
In summary: This issue have been resolved in Magnolia 5.3.11 while fixing |
| Comment by Andreas Weder [ 19/Nov/15 ] |
|
mgeljic I agree: the item you open should still be selected when you return. |