Allow editing elements#18
Merged
Merged
Conversation
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>
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.
Summary
ElementEditscreenrn-emoji-keyboard, pure JS) — guarantees the value is always a single emojiupdateElementmutation is a full replace, so the form round-trips the fields it doesn't expose (location, schedule, labels, trips) to avoid clearing themElementDetailquery with the fields needed to reconstruct a completeElementInputNotes
rn-emoji-keyboarddependency (peer deps onlyreact/react-native, no native modules) — reviewers shouldbun installbefore building.Test plan
bunx tsc --noEmit,bun run lint,bun run testall pass