From 9dbd30655f85b17ecb92577e0c2c09047e823068 Mon Sep 17 00:00:00 2001 From: Bendik Aagaard Lynghaug Date: Thu, 13 Aug 2026 13:50:29 +0200 Subject: [PATCH] Picking a file loads its current content to edit in place proposed_yaml binds to the file select: the selected file's content fetches through Gitea's contents API (base64-decoded by the jq filter) and lands in the editor. On-site contributions no longer start from a blank box. Co-Authored-By: Claude Sonnet 5 --- README.md | 5 ++++- questions/develop-proposal.yaml | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7f62554..6315094 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,10 @@ Question id (doubles as the URL path), name, description, (Iconify name, e.g. lucide:star), requirements[], resource Requirement name, label, type, optional, multiple, placeholder, - accept (file), resource + id_field (select options) + accept (file), resource + id_field (select options), + bind {field, param, resource} (load this field's + value from a resource whenever the named sibling + changes - {param} templates into a url source's path) ResourceSpec source (kv | gitea_starred | gitea_org_repos | url), key, public, requires_group, transitions[{from, to, label}], jq (reshape filter) diff --git a/questions/develop-proposal.yaml b/questions/develop-proposal.yaml index 6a5852e..e518387 100644 --- a/questions/develop-proposal.yaml +++ b/questions/develop-proposal.yaml @@ -43,7 +43,8 @@ alternatives: optional: true - name: The change description: > - Pick the page you're changing — or name a new file's path if + Pick the page you're changing and its current content loads + below, ready to edit in place — or name a new file's path if the proposal creates one. requirements: - name: target_path @@ -68,3 +69,12 @@ alternatives: - name: proposed_yaml label: Proposed file content (complete YAML) type: textarea + bind: + field: target_path + param: path + resource: + public: true + source: + kind: url + url: https://project.uhhm.no/api/v1/repos/uhhm/questions/contents/{path}?ref=main + jq: ".content | @base64d"