Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Story

I can use the clipboard to copy and paste items around. I can paste copied items multiple times and a previously copied item is replaced, if I copy a different item to the clipboard.

If I'm unsure where I could paste the current content of the clipboard, I can use a clipboard function to show me all supported locations in the currently showing view. I typically use the clipboard only within a view, rarely across views, but the more acquainted I get with different parts of Magnolia, the more I attempt to use the clipboard to transfer items between its workspaces.

Description of desired behavior

The basic clipboard function does not have to be explained in all detail - it is well known from applications such as Word or text editors. Content can be copied to the clipboard and pasted in another location, but it can also be cut - copied and removed - and pasted later. The challenge is to do this right across multiple contexts with different types of items.

Please consult the usage summary for a full definition of mouse, touch and keyboard usage.

The clipboard is global

In Magnolia, the clipboard is a global function. As such, it works across workspaces and the item sets they show. The clipboard also works across all item subsets and between all views of a workspace. Every workspace has its own toolbar with its own clipboard controls, but they all use the same, global clipboard to interact with.

I've iterated through numerous versions of clipboards, from clipboards anchored on item sets to workspaces to work areas. A global clipboard is a lot less confusing then a non-global one: you don't have to either flush the clipboard when switching contexts or deal with clipboards containing content you copied earlier. A global clipboard is also more powerful, as you can allow a workspace to e.g. only paste a string representation. Finally, the basic rule to understand a clipboard stays as simple as you know it from other applications: if the clipboard is there, you can use it, and you can paste an item in the clipboard, if its type is accepted by your currently selected item.

The clipboard may be missing in a workspace. It should actually only be shown (i.e. not shown with all buttons disabled), if a workspace can make use of it.

Because the clipboard is a global function, it does not offer a cut operation. It would be unclear how to cancel it, if you switch the context. Instead, the clipboard concentrates on offering powerful copy&paste support only.

Also, when copying an item containing sub items, all the sub items are copied as well. This provides a powerful means to work with item hierarchies. A workspace may not offer a way to only copy an item itself.

Preview of paste operation

If a user clicks/taps and holds the paste function, a tooltip will show the number and type of items currently in the clipboard (e.g. 5 videos or 3 items) and will highlight all items in the current view accepting a paste of the content in the clipboard. This effect disappears again if the mouse button is released or the tap ends. Note that releasing the mouse button or ending the tap does not cause a paste operation in this case - you have to click/tap the paste button again to get this behavior.

The clipboard offers converters

While the clipboard will typically be used to copy items within the same workspace or even the same view (e.g. to copy pages within the same site structure), Magnolia's global clipboard is more powerful, since it offers built-in converters. Converters allow the clipboard to convert an item to a different, usually lower-level item type. If you e.g. copy a page in the website workspace, then open a dialog containing a field requiring a URL, pasting the copied page pastes its URL. The global clipboard becomes an even more powerful tool to copy content from here to there.

Magnolia's global clipboard has the following characteristics:

  • any item may be copied
  • the clipboard may offer its item or items in a number of different item types by using converters
  • the selected item acting as the target of a paste operation usually only accepts one item type (e.g. a page)
  • the clipboard tries to satisfy the expected item type by leveraging its built-in converters

Similarity with drag'n'drop

Note that this somewhat similar to how drag and drop support is typically implemented:

  • any item may be dragged
  • the drag source knows the data formats it can offer the dragged items in
  • the drop target consults the drag source and matches the data formats offered with those it supports
  • the drop target chooses the data format, where most of the data and its structure is preserved

It might be worth while verifying if the two functions could leverage the same internal framework.

Mockups