portfolio-edit: form is edit-mode only; submit becomes a + glyph

Two related polishes:

- The add form was auto-shown by the empty-state path so brand-new
  users would see something to act on. That conflicts with the user's
  preference for "Edit always toggles the form, no other path." The
  empty state now shows guidance copy ("click edit to add one")
  instead. exitEditMode always hides the form too.
- The submit "add" word-button is replaced by a square accent-bordered
  + glyph (26×26). Matches the visual weight of the calendar ghost
  next to it but stays in the accent colour so it reads as primary.
  Adds a tiny active-state scale tick for tactile feedback.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-05-27 15:22:13 +02:00
parent 2ffd228976
commit 6377c929b8
4 changed files with 27 additions and 17 deletions

View file

@ -28,11 +28,10 @@
function exitEditMode() {
panel.classList.remove('pf-editing');
// Form stays visible when the pie is empty (empty-state UX handled
// by portfolio.js setting the pf-empty class on the panel).
if (!panel.classList.contains('pf-empty')) {
form.hidden = true;
}
// The form is edit-mode-only — always hide it on exit, including
// when the portfolio is empty. The empty state shows guidance text
// that nudges the user back to the Edit button.
form.hidden = true;
editBtn.hidden = false;
doneBtn.hidden = true;
editBtn.setAttribute('aria-pressed', 'false');