[CONTTAGS-1] Create a tags field Created: 27/Apr/17  Updated: 07/Jul/17  Resolved: 04/Jul/17

Status: Closed
Project: Content Tags
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Story Priority: Neutral
Reporter: Antti Hietala Assignee: Robert Šiška
Resolution: Fixed Votes: 1
Labels: None
Σ Remaining Estimate: 0d Remaining Estimate: 0d
Σ Time Spent: 0.25d Time Spent: 0.25d
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: PNG File tag-field.png     PNG File vaadin-tokenfield-basic.png    
Issue Links:
dependency
depends upon MGNLUI-4219 Add vaadin add-on TokenField Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
CONTTAGS-2 Do visual design for the tagging fiel... Sub-task Closed Anja von Gunten  
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:
Epic Link: Tagging
Sprint: Kromeriz 101, Kromeriz 103
Story Points: 8

 Description   

User story:

As an editor, I want tagging to be light and quick. I want select some content items, press a keyboard shortcut, and type tags. Done!

Tasks:

  • Create a field that allows the user to enter multiple tags with keyboard entry.
    • Use the Vaadin TokenField.
    • Autocomplete (suggest) tags from the tags workspace.
    • Suggest tags that start with the string the user types.
    • Allow user to enter tokens that are not in the container (tags workspace) yet.
  • Create a light dialog for tagging.
    • Add the tags field inside the light dialog. Set the dialog label to "Tags"
    • The field does not need a label.
    • Add Cancel and Save changes buttons in the dialog.
  • -Assign a global keyboard shortcut T to open the tagging dialog.- (will be done in CONTTAGS-4)
    • -The keyboard shortcut should be available when one or more taggable items are selected. Whether an item is taggabie is defined using the taggable mixin.-
    • -The keyboard shortcut should be available in global mode when the user has selected one or more taggable items.-
    • -The keyboard shortcut should not be available in edit mode. Editing a content is typically done in a form. The Tags field should be placed directly on the form rather than launched in a separate dialog.-

Mockup 01: Add tags to a single item with shortcut or action
https://projects.invisionapp.com/share/EUBJ9PG9K#/screens



 Comments   
Comment by Evzen Fochr [ 02/Jun/17 ]

Registering of shortcut will be done in separate ticket CONTTAGS-4.

Comment by Evzen Fochr [ 08/Jun/17 ]

Field caption is set to empty string but space for caption in dialog is still present, need to be improved in css.

Comment by Roman Kovařík [ 09/Jun/17 ]

Reopened,

Allow user to enter tokens that are not in the container (tags workspace) yet.:

failing with various exceptions when adding a tag:

2017-06-09 14:52:41,197 ERROR info.magnolia.contenttags.form.field.TagContainer : Could not retrieve item with id: test
javax.jcr.PathNotFoundException: test
	at org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2167)
	at org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2161)
	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
	at org.apache.jackrabbit.core.NodeImpl.getNode(NodeImpl.java:2161)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getNode(DelegateNodeWrapper.java:204)
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.getNode(ContentDecoratorNodeWrapper.java:151)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getNode(DelegateNodeWrapper.java:204)
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.getNode(ContentDecoratorNodeWrapper.java:151)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getNode(DelegateNodeWrapper.java:204)
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.getNode(ContentDecoratorNodeWrapper.java:151)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getNode(DelegateNodeWrapper.java:204)
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.getNode(ContentDecoratorNodeWrapper.java:151)
	at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getNode(DelegateNodeWrapper.java:204)
	at info.magnolia.jcr.decoration.ContentDecoratorNodeWrapper.getNode(ContentDecoratorNodeWrapper.java:151)
	at info.magnolia.contenttags.form.field.TagContainer.getItem(TagContainer.java:73)
	at info.magnolia.contenttags.form.field.TagContainer.getContainerProperty(TagContainer.java:104)
	at com.vaadin.ui.AbstractSelect.getContainerProperty(AbstractSelect.java:823)
	at org.vaadin.tokenfield.TokenField.rememberToken(TokenField.java:410)
	at org.vaadin.tokenfield.TokenField$3.addNewItem(TokenField.java:394)
	at com.vaadin.ui.ComboBox.changeVariables(ComboBox.java:755)
2017-06-09 15:04:47,790 ERROR .magnolia.ui.admincentral.AdmincentralErrorHandler: AdmincentralUI has encountered an unhandled exception.
java.lang.NullPointerException
	at org.vaadin.tokenfield.TokenField.rememberToken(TokenField.java:411)
	at org.vaadin.tokenfield.TokenField$3.addNewItem(TokenField.java:394)
	at com.vaadin.ui.ComboBox.changeVariables(ComboBox.java:755)

The field does not need a label.

It'd be better to add a field label until the CSS will be finished.

Comment by Roman Kovařík [ 19/Jun/17 ]

Reopened:
a new tag is saved despite clicking the cancel button.

Comment by Roman Kovařík [ 28/Jun/17 ]

Reopened: the tag field is not pre-filled when item has already some tags.

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