Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Action Buttons implementation, dependant on Tag or all #92

Open
NicoJuicy opened this issue Apr 18, 2017 · 3 comments
Open

Action Buttons implementation, dependant on Tag or all #92

NicoJuicy opened this issue Apr 18, 2017 · 3 comments
Labels

Comments

@NicoJuicy
Copy link
Owner

NicoJuicy commented Apr 18, 2017

An action button should:

  • Add a tag
  • Remove a tag

It should be represented in:

  • Item Details
  • Item overview ( title)
  • Item actions ( discuss)
  • Mail ( click and change)

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
Copy link
Owner Author

NicoJuicy commented May 11, 2017

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
Copy link
Owner Author

NicoJuicy commented May 12, 2017

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
Copy link
Owner Author

NicoJuicy commented May 12, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant