Repository navigation
Conversation
/plugins/<n>/settings shows every setting of a plugin, built from its settings description, in the agreed groups (name; own settings; display time, refresh, layout, level; the rest folded under More settings, open by itself when needed; Technical information with the id). Save applies at once; errors show next to their fields with what was typed. Active Plugins links to it, and adding from the Library opens it. setting(helper=...) names a web helper shown under the field (paperpi.web.helpers; none built in yet). Part of #238 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…More settings rule, tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #238 (the last piece of part 3a, with #251 and #252). Merge order (top-down): merge this PR first, into
238-settings-form(#252); then merge #252 intomain. No conflicts that way.What changed
The plugin settings page:
/plugins/<n>/settings?id=<id>.namecomes first.id, type, storage folder and the place in the config file.(required)where needed, the setting's key, the limits for numbers, and "Default: …".paperpi.plugin.setting(..., helper="location")names a helper for a setting.paperpi.web.helpers.HELPERSholds a function per name that adds HTML under the field. A name it doesn't know adds nothing, so the plain field still works.location) comes in 3c.docs/writing-plugins.md(which field each setting type gets;helper=),docs/decisions/web-interface.md, the address table inapp.py.Choices made without asking:
Follow-up (not in this PR): some shared help texts were written for the config file ("see Layouts above", "leave it out to use…") and read a little oddly on the page. A later PR can give the page its own short wording.
Area
web (
src/paperpi/web/:app.py,forms.py,helpers.py,plugins.py, templates,style.css), core (plugin.py:setting(helper=),helper_of), docs.Tests
New
tests/test_web_settings.py: link from Active Plugins, groups and folding, saving and applying, errors shown again with nothing saved, check boxes on and off, add → settings page, changed meanwhile, unknown type, out-of-range place, a value not in the choices, secrets never on the page, a list to tick, a read-only setting, the hand-edits note, the helper hook.uv run pytestpasses (1394 on the Pi,-n auto)uv run ruff check .passesImages
No screenshot yet: there is no browser on the Pi in this session. The page's HTML is checked by the tests. I can add a screenshot from another device if you want one.
Review
Only txoof approves and merges this PR.
🤖 Generated with Claude Code