Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags #3

Merged
merged 7 commits into from Jan 4, 2015
Merged

Tags #3

merged 7 commits into from Jan 4, 2015

Conversation

danohu
Copy link
Collaborator

@danohu danohu commented Dec 21, 2014

No description provided.

 - add nid field and index to database
 - allow query by nid through store API
 - configure store plugin to query by nid and ignore URI
 - create a plugin for node-based annotation (annotator_drupalnode.js)

DESIGN

We store the appropriate node id (nid) with every annotation. We override the
annotation API to search by nid rather than URL. We also manipulate the url to
be always the path to the node detail page.

SETUP

 - in admin/config/content/annotator, enable the DrupalNode plugin
 - in admin/config/content/annotator, set Annotator element to ".node :has(>p)"
   [this selects the div immediately surrounding the node content. Any other selector should
   also be fine, provided the markup within it will be identical on both node and index pages]
 - there is a new field in the annotation module. So you will need to either reinstall, or
   manually add the nid field
Add some javascript omitted from the last commit
add new js as its own behavior, not overwriting the Tags plugin!
Add autocomplete to the Tag plugin as an option when activating the plugin,
rather than manually bolting it on later.

This solves the issue noted by @tanius at edgeryders#3
@danohu
Copy link
Collaborator Author

danohu commented Jan 3, 2015

@tanius, I've changed how we apply autocomplete, to avoid your race completion.

Note that you'll need to rebuild annotatorjs to test this.

See discussion at https://edgeryders.eu/en/open-ethnographer/task-4120

When somebody creates a tag, it should automatically be available for further use from the autocomplete list.

i.e. we shouldn't wait for the page to be reloaded, but should update the autocomplete list immediately.
@danohu
Copy link
Collaborator Author

danohu commented Jan 3, 2015

@tanius -- we also need to define what characters are allowed in tags. In particular, the tagging interface treats spaces as tag delimiters. If we're only allowing one tag at a time, we don't need that.

@tanius
Copy link
Member

tanius commented Jan 3, 2015

@danohuiginn Right, that. Thought about it, and my conclusion is that in addition to "normal" alphanumerical characters (full Unicode range), spaces and punctuation should also be allowed. Then it maps nicely to what is allowed in Drupal taxonomy terms and CATMA (I just checked). No need to add artificial restrictions, I think.

I also rethought the "one tag per annotation" thing. It still makes sense, I think. It makes our tagging plugin for annotator quite special-purpose, but so be it.

We can extend it in a later version to allow multiple tags per annotation without breaking the database structure (no extra table, using the "delta" column mechanism of Drupal instead). But then we also have to solve problems with access right (people will only have access to part of an annotation if the other tags are private). One tag per annotation is the usual case, and simplifies things.

@tanius
Copy link
Member

tanius commented Jan 4, 2015

@danohuiginn Tested your changes. Race condition is gone, and the auto-complete list updating (and creation of new tags) works find. Will merge this now, as the basic functionality works fine now and we can treat everything else as adding to this.

I think I start to get an impression of the "feel" of the ready product ... and I like it, this fast client-side auto-complete and stuff 👍

@tanius tanius merged commit 2462355 into edgeryders:master Jan 4, 2015
@tanius tanius added this to the 1.0 milestone Jan 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants