Skip to content

Edit mode on the device page (website channel), reduced field set #185

Description

@mkerstner

Summary

As a signed-in contributor, I want to switch a device page into edit mode on the website and propose changes to a small, fixed set of curated fields, so that I can correct or complete device data without leaving the page or knowing Git.

This is the website channel of the first contribution iteration described in #74. It covers only the in-page editing experience; account handling, pull request creation and moderation are separate features (see dependencies).

Reduced field set (first iteration)

Field Input type Notes
Image File upload Image rights and license acknowledgement required at submit (depends on legal track, #35)
Name Text Display name (concatenation of model + model identifier when present and not equal)
Category Select from existing categories Proposing new categories is out of scope here
Brand Select from existing brands
Local connection multi-select over "fully local", "setup requires cloud", "requires cloud"

Fields are added over time by follow-up features, not by widening this one.

Flow

  1. Enter edit mode. A signed-in contributor presses "Edit" on a device page. Editable fields turn into inputs; everything else stays as is. Signed-out visitors see "Edit" and are routed to sign-in first (Account 0.1), returning to edit mode afterwards.
  2. Pending edits visible. If an open pull request already proposes a value for a field, that proposed value is shown next to the field (with a link to the PR) so contributors don't duplicate work.
  3. Edit. The contributor changes one or more fields. Unchanged fields are not part of the proposal.
  4. Propose. Pressing "Propose" opens a summary modal listing each changed field with current value, new value, and a plain-text source input per field (optional for now, encouraged in the UI).
  5. Submit. Pressing "Submit" hands the change set to the PR creation feature, which creates one pull request per changed field with the contributor's GitHub account.
  6. Return. The contributor lands back on the device page with their proposals shown as pending in the sidebar, each linking to its PR.
  7. Cancel. Leaving edit mode without submitting discards changes; a confirmation is shown if there are unsaved edits.

Acceptance criteria

  • "Edit" is visible on every device page; it requires a signed-in contributor (Account 0.1) before fields become editable
  • Only the four fields above become editable; reported fields are never editable
  • Existing pending proposals for a field are displayed in edit mode with a link to the PR
  • The summary modal lists only changed fields and allows a source per field
  • Submitting a change set results in exactly one pull request per changed field, attributed to the contributor
  • After submit, the device page shows the new proposals as pending without a page reload loop or stale state
  • Edit mode works on mobile and desktop and follows the current visual design; it is built so the new visual design (Define and roll out a new visual design for the Device Database #175) can restyle it without changing behaviour
  • Image uploads enforce size and type limits and require licence acknowledgement
  • A contributor can cancel at any point without side effects

Not in scope

Dependencies

Open questions

Metadata

Metadata

Assignees

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions