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
Tags #3
Conversation
- 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
@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.
@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. |
@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. |
@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 👍 |
No description provided.