[MGNLUI-1295] In all apps with lists and trees, add a "rename <item>" action for renaming items Created: 02/May/13  Updated: 04/Sep/13  Resolved: 09/Jul/13

Status: Closed
Project: Magnolia UI
Component/s: app framework, content app, design, pages app, security app, user interaction
Affects Version/s: None
Fix Version/s: 5.0.1

Type: Story Priority: Critical
Reporter: Andreas Weder Assignee: Christopher Zimmermann
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon CNTCTSAPP-39 Add rename action to contacts app Closed
depends upon MGNLDAM-275 Add rename action to assets app Closed
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)
Date of First Response:
Sprint: Beta 3

 Description   

We need a "rename" action in all apps offering the basic sub apps with views to browser a set of items.

  • It only works on a single item (multi-selection is not supported).
  • It opens a dialog containing every editable text attribute in both visible and invisible columns of the currently selected item. The text input fields are shown one after the other with the column name used as labels.
  • Group the action with "duplicate" and "move". Split this group off the group containing "edit" and "preview". Put "duplicate", "rename" and "move" in a separate group, in this order.

We need an actual "rename" action for two reasons:
#. The action bar should show all actions available. This includes a rename action.
#. It's not enough to only support editing the text directly by two single clicks (see http://jira.magnolia-cms.com/browse/MGNLUI-1294). That action is not very discoverable, depends on device and user capabilities and might not always be very accessible.



 Comments   
Comment by Christopher Zimmermann [ 07/May/13 ]

This spec seems a bit odd as items typially have an edit feature which opens a subapp which enables editing most of these fields.
Shouldn't the Edit form simply be updated to include all of the fields?
It would be wierd to have a Rename dialog and an Edit Subapp - that had very similar fields.

I would expect a "rename" action to just edit one field - the displayed name.

Comment by Christopher Zimmermann [ 03/Jul/13 ]

1. Add Rename Actions to content apps:
As there is already a way to edit all the other fields - it seemed more appropriate to add an action just to rename the node. This avoids confusion and redundancy.

Added a rename dialog to ui-framework configuration.
Contacts, Assets, Config apps extend this dialog and have actions to open the dialogs.

Changed websiteJcrBrowser to extend Configuration app, just as all the other configuration type apps do.

2. Add ability to edit properties in Config apps:
Created SaveConfigDialogAction/Definition which simply fires an ItemEditedEvent on the subapp eventbus.
This action is used in the new editProperty dialog to cause changes to a property to be changed.
By firing the event, it causes the property changes to be saved in exactly the same way as if a user had used inplace editing because BrowserPresenter#editItem() is called.

For this to work had to 'expand' signiture of OpenEditDialogAction to have an JcrItemAdapter injected instead of JcrNodeAdapter so that it can be used on Nodes and on Properties.

Finally, AbstractJcrAdapter needed some additional logic in updateProperties to set the item=getJcrItem() if the name of the property changed so that any other changed values on the property would be applied to the renamed property, not to the 'stored' 'old named' property.

Comment by Christopher Zimmermann [ 04/Jul/13 ]

Added simple test for SaveConfigDialogAction to confirm that it sends an event on the eventbus parameter when it executes.
Improve javadoc for SaveConfigDialogAction.
Changed log.info to log.debug

Comment by Tobias Mattsson [ 04/Jul/13 ]

This needs to be done also in a version handler and the version handler requires a test case as well.

Comment by Christopher Zimmermann [ 05/Jul/13 ]

Added Module Version handlers and Tests for the following:

  • Adding editProperty and rename dialogs.
  • Adding editProperty and rename actions.
  • Updating folder actionbar to have editActions (instead of duplicationActions) which references editProperty and rename actions.
  • Changed websiteJcrBrowser app to extend configuration app.
Comment by Christopher Zimmermann [ 09/Jul/13 ]

Error when trying to rename Asset after running MVH from 5.0:
No dialogDefinition found for dam:renameAsset

Error when tring to rename Contact after running MVH from 5.0
No dialog definition registered for id: contacts:renameContact

In MVH, new editActions group must be positioned after the addingActions group.

Comment by Christopher Zimmermann [ 09/Jul/13 ]

Added an ordering MVH task.

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