NCI-Agency / anet

Advisor Network
MIT License
24 stars 11 forks source link

Epic 17 - Ability to tag reports with keywords #17

Closed VassilIordanov closed 4 years ago

VassilIordanov commented 7 years ago

Reference items 4 and 20

Initial functionality is: A list of keywords to be added to the data initially without the help of an UI.

108 to improve that at a later stage.

Keywords have the following properties:

When drafting a report, a user can tag a report with a keyword. Frequently used keywords to be suggested to user.

A tag should be rendered with # preceding it and on a rounded edge background. Tooltips should be displayed when clicked or (to support phone usage) or possibly also mouse-over events (todo: create a separate story for general tooltips)

Searching for keywords could be done by the search or via a custom search #109. Any report tagged with a keyword has a Is-a relationship with the search subject

Later

gjvoosten commented 7 years ago

Define who can add new tags (role-based). Decide whether tags are e.g. hierarchical. Perhaps tags also needs a description/explanation (e.g. in the form of tooltips). Does adding a tag also add tags from the hierarchy, or does e.g. the search include it?

dspCarlson commented 7 years ago
  1. Only users in the administrators group should be able to add and remove key words.

  2. Yes, tags should be hierarchical. For example, two tags are displayed: "car" and "tire." If "tire" is selected by the user, a query of "car" would return the record associated with "tire."

  3. Tool tips? Yes! Great idea! Can these tool tips be edited by the administrators?

  4. When a child tag is chosen, the parent tag does not have to be included for that record. A query will find the hierarchical parents.

gjvoosten commented 7 years ago

I'm going to make separate issues for:

VassilIordanov commented 7 years ago

After loading newReport page, focus is in Tags field, instead of Meeting Goal

gjvoosten commented 7 years ago

The documentation is a bit unclear: https://www.npmjs.com/package/react-tag-input#autofocus but apparently, true is the default and not false. 🙁

gjvoosten commented 7 years ago

I'll set autofocus to false so the tags field doesn't take focus, but note the Meeting Goal field doesn't take focus (it also didn't take focus before #130 was merged).

VassilIordanov commented 7 years ago

On IE11, on the staging server, the tag UI is not working. I suggest we replace the library we use with a simple menu that allows to pick a tag.

gjvoosten commented 7 years ago

@VassilIordanov Have the (default) tags been loaded in the database? No tags = no suggestions.

VassilIordanov commented 7 years ago

@gjvoosten - correct. It seems like they got overwritten at some point (possibly when copying production into staging db). I've pushed the tags and it is working now.

dspCarlson commented 7 years ago

@VassilIordanov @gjvoosten I inserted 12 tags and tested the key word functionality. It works great. There was one inconsistency in the drop down list. Sometimes it is no longer displayed after three seconds when left alone and sometimes it is no longer displayed after 15 seconds. I was not able to consistently recreate the two scenarios to know what triggered both scenarios. But the word tagging is great as is the announcement banner which is fantastic.

dspCarlson commented 7 years ago

@VassilIordanov also created/saved a SQL script to re-insert the 12 test key tags should the staging database need to be refreshed again.

VassilIordanov commented 4 years ago

Alas, tags have not been that effective. Time to rethink