Skip to content

Allow editing elements#18

Merged
dfalling merged 2 commits into
mainfrom
add-element-edit
Jun 2, 2026
Merged

Allow editing elements#18
dfalling merged 2 commits into
mainfrom
add-element-edit

Conversation

@dfalling
Copy link
Copy Markdown
Owner

@dfalling dfalling commented Jun 1, 2026

Summary

  • Add an Edit button to element details that opens a new ElementEdit screen
  • Editable fields: name, icon, URL, completed, and description
  • Icon uses a tap-to-open emoji picker (rn-emoji-keyboard, pure JS) — guarantees the value is always a single emoji
  • URL is validated against an http(s) pattern; Save is disabled until it's valid
  • The updateElement mutation is a full replace, so the form round-trips the fields it doesn't expose (location, schedule, labels, trips) to avoid clearing them
  • Expanded the ElementDetail query with the fields needed to reconstruct a complete ElementInput

Notes

  • Adds the rn-emoji-keyboard dependency (peer deps only react/react-native, no native modules) — reviewers should bun install before building.

Test plan

  • bunx tsc --noEmit, bun run lint, bun run test all pass
  • Manually verified editing name/completed/description saves and reflects on the detail screen

dfalling and others added 2 commits June 1, 2026 23:11
Element details was read-only. Add an Edit button that opens a form for
the three most-commonly-changed fields. The updateElement mutation is a
full replace (name/description/uri/completed/icon are non-null), so the
edit screen round-trips the untouched fields (uri, icon, location,
schedule, labels, trips) to avoid clearing them on save. The detail
query was expanded with the fields needed to reconstruct that input.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Round out the edit form with the remaining identity fields. The URL is
validated against an http(s) pattern so a malformed value can't be saved.
The icon uses an emoji picker rather than free text: the system keyboard's
emoji panel can't be opened programmatically, and a single tap-to-replace
picker guarantees the field is always exactly one emoji, which is what the
icon is meant to be.

Adds rn-emoji-keyboard (pure JS, no native deps).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dfalling dfalling merged commit bc5e8fd into main Jun 2, 2026
2 checks passed
@dfalling dfalling deleted the add-element-edit branch June 2, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant