NicoJuicy / Handlr

Issue tracker for a DMS web application, currently in private beta
3 stars 0 forks source link

Action Buttons implementation, dependant on Tag or all #92

Open NicoJuicy opened 7 years ago

NicoJuicy commented 7 years ago

An action button should:

It should be represented in:

Action buttons can be implemented on Private tags. Can be set per user, user role or everyone.

This can improve the flow. When an item changed the tags, the appropriate people can be notified

NicoJuicy commented 7 years ago

Currently a button is support in the overview / details page.

Type of action supported for now is: Toggle Tag and currently working for a HTTP post, but need some code generation tools to make it easy for all. Currently a json schema is used and a tool will generate code for: PHP, c#, Java, Javascript, Typescript. ( javascript doesn't generate the models though, Typescript does)

NicoJuicy commented 7 years ago

The CLI for code conversion generated @ https://github.com/NicoJuicy/JsonUtils . It's based on https://jsonutils.com/

Currently thinking about the model that will be used when send to third parties. This is the first example: //it happens on the tag "notify"

{
  "parameters": {
    "url": "http://www.sapico.me",
    "title": "Checkout out my website ;) -- just an example url",
    "body": "This is the supplied text, mostly only title or body!",
    "tags": [
        "ai" ,"neural-network","neural-networks","notify"
    ],
    "fields": [
      {
        "name": "Comments",
        "label": "",
        "type": "Text",
        "value": "This is a label that can be used"
      },
      {
        "name": "Email",
        "label": "",
        "type": "Email",
        "value": "nico a t sapico.me"
      },
      {
        "name": "A Number",
        "label": "",
        "type": "numeric",
        "value": "1"
      }
    ]

  },
  "expectedResponse": {
    "descriptionInHTML":"Submitted to HN",
    "fields": [
      {
        "name": "Comments",
        "label": "",
        "type": "Text",
        "value": "{Fill-This-In}"
      }
    ],
    "tags":
    {
      "add":["notified","finished"],
      "remove":["notify"]
    }
  }
}
NicoJuicy commented 7 years ago

Request part is implemented, used https://requestb.in/ for checking the results ;)