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

Make configuration more reactive and unified #5

Open
tjhorner opened this issue Jul 2, 2021 · 0 comments
Open

Make configuration more reactive and unified #5

tjhorner opened this issue Jul 2, 2021 · 0 comments
Milestone

Comments

@tjhorner
Copy link
Collaborator

tjhorner commented Jul 2, 2021

Right now there's lots of manual binding to config changes in the frontend, which can result in really unmaintainable code. The "Archive Mode" setting is also a special case right now which makes it difficult to deal with. The goal here should be a unified config system with one ConfigField component that adapts to the type of value.

The config schema should also be defined in one place, specifying all the related metadata for each option, e.g.

[
  {
    "key": "archiveMode",
    "name": "Archive Mode",
    "type": "option",
    "default": "allowlist",
    "options": [
      {
        "id": "allowlist",
        "name": "Allowlist (don't archive by default)"
      },
      {
        "id": "blocklist",
        "name": "Blocklist (archive by default)"
      }
    ]
  },
  {
    "key": "baseUrl",
    "name": "ArchiveBox Base URL",
    "type": "text",
    "default": "",
    "placeholder": "https://example.com"
  },
  // and so on
]
@tjhorner tjhorner changed the title Make configuration more reactive Make configuration more reactive and unified Jul 2, 2021
@tjhorner tjhorner added this to the 2.0.0 milestone Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant