Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software:2222/vole.git

A free and open-source forge that lives in your Git repo.

#190

Edit issue and change details in place

merged · by keenan 5d ago · merged into main at 802e0e52 by keenan 5d ago

keenan opened this 5d ago

What

The issue and change pages now edit their title and description in place. Edit swaps the heading to a text input and the description card to a text area; Save posts through the existing metadata writer and replaces only those two regions. The discussion, sidebar, and any other open state stay where they are.

The standalone /edit page remains as the fallback when the browser does not run the page script.

Why

A typo fix should not cost a navigation, and a refused change should not make the reader retype it. Comments already work this way. Closes #189.

Details

  • detailsEdit carries the open state, the typed values, and the refusal message for the page’s title and description.
  • An HTMX save returns issue_details_update or request_details_update: the description swaps into the form’s target, and the page head (title and actions) swaps out of band. The change’s alert swaps out of band as well, so the response has only one primary region.
  • A refused inline write comes back with the form open, the typed title and body intact, and the reason above the field.
  • Prefilled edit text areas size themselves to their content on opening and after an HTMX swap. They keep resize: vertical, so the reader can still make one taller or shorter. Comment edits get the same sizing; empty comment composers keep their fixed starting height.
  • The no-script edit pages use the same sizing for their prefilled description.

Tests

TestIssueAndChangeDetailsCanBeEditedInTheBrowser now also checks the in-place markup, the HTMX response for an issue and a change, the out-of-band title, and a refused write that keeps the typed body. The existing plain-form and permission checks are unchanged.

vole workflow check and vole workflow run verify both pass, and the page script passes node --check.

Checklist

  • Relevant checks pass
  • Docs updated for both surfaces
  • Copy and controls match the comment editor’s behaviour

Discussion (1)

keenan 5d ago

Updated the implementation: the heading now has its own pencil and title-only form, and the description card has a comment-style menu with Copy text and Edit. Each saves only its own field so an open draft in the other one survives.