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

User Settings: Expose user settings in server #1656

Closed
btmorr opened this issue Jun 8, 2018 · 2 comments · Fixed by #1845
Closed

User Settings: Expose user settings in server #1656

btmorr opened this issue Jun 8, 2018 · 2 comments · Fixed by #1845
Labels
api Affects the `api` project feature Ticket is a feature request / PR introduces a feature medium
Milestone

Comments

@btmorr
Copy link
Contributor

btmorr commented Jun 8, 2018

overview

Run app should be able to query the server for a list of settings to include in the "Advanced Settings" page.

behavior

Schema:

{
  "settings": [
    {
      "title": "Calibrate to bottom of well",
      "description": "Perform labware calibration by moving the tip to the bottom-center of the well rather than the top-center (which is the default if this option is unset)",
      "value": true
    },
    {
      "title": "Other setting",
      "description": "Long description of next setting",
      "value": false
    }
  ]
}

There should be a GET endpoint that returns a title, long description, and current value for each setting in "feature_flags", and any other settings that we wish to expose through the advance settings page.

@btmorr btmorr added feature Ticket is a feature request / PR introduces a feature api Affects the `api` project medium labels Jun 8, 2018
@btmorr btmorr added this to the User Settings milestone Jun 8, 2018
@btmorr btmorr mentioned this issue Jun 8, 2018
4 tasks
@mcous
Copy link
Contributor

mcous commented Jun 28, 2018

Here's my pass at a spec. @btmorr and @Laura-Danielle let me know what you think

fetch settings

request

GET /settings

response

{
  "settings": [
    {
      "id": "short-identifier-1",
      "title": "User-facing title",
      "description": "User-facing description",
      "type": "boolean",
      "value": true
    },
    {
      "id": "short-identifier-2",
      "title": "User-facing title",
      "description": "User-facing description",
      "type": "number",
      "value": 42
    }
  ]
}

set settings

request

POST /settings

body

{
  "id": "short-identifier-1",
  "value": false
}

response

(Same response as GET /settings)

{
  "settings": [
    {
      "id": "short-identifier-1",
      "title": "User-facing title",
      "description": "User-facing description",
      "type": "boolean",
      "value": false
    },
    {
      "id": "short-identifier-2",
      "title": "User-facing title",
      "description": "User-facing description",
      "type": "number",
      "value": 42
    }
  ]
}

@btmorr
Copy link
Contributor Author

btmorr commented Jun 29, 2018

Omitting "type" field for now--currently only supporting booleans

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Affects the `api` project feature Ticket is a feature request / PR introduces a feature medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants