Prompt to remove tag when value is cleared and Done is pressed#105
Closed
dougborg wants to merge 3 commits intoFoggedLens:mainfrom
Closed
Prompt to remove tag when value is cleared and Done is pressed#105dougborg wants to merge 3 commits intoFoggedLens:mainfrom
dougborg wants to merge 3 commits intoFoggedLens:mainfrom
Conversation
Empty tags are not useful — when a user clears a tag value field and presses Done, show a confirmation dialog offering to remove the tag entirely. Applies to profile editor, operator profile editor, and additional existing tags on the refine sheet. Refinable tags (which start empty by design) are unaffected. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests verify the RawAutocomplete onSubmitted pattern used by NSITagValueField: Done on empty field calls onCleared (not onFieldSubmitted), Done on non-empty field auto-completes normally, and omitting onCleared makes empty submit a safe no-op. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address PR review feedback: - Replace hardcoded English dialog strings with localization keys - Fix wrong localization namespace (common.* → actions.*) - Use locService.cancel helper instead of raw key lookup - Add removeTagTitle/removeTagMessage keys to all 7 locale files - Trim whitespace before checking emptiness in onSubmitted guard - Add test for whitespace-only field triggering onCleared Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
Negative - current UX is fine. If behavior needs to change due to OSM standards, we will make that change silently. |
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
onClearedcallback to prompt the user to remove the tag entirelyonClearedcallback toNSITagValueField— fires when Done is pressed on an empty fieldChanges
lib/widgets/nsi_tag_value_field.dart— newonClearedcallback, called fromonSubmittedwhen text is emptylib/screens/profile_editor.dart—_confirmRemoveTag()dialog, wired toonClearedlib/screens/operator_profile_editor.dart— same patternlib/widgets/refine_tags_sheet.dart— same pattern for additional existing tagstest/widgets/nsi_tag_value_field_test.dart— 4 tests: empty field stays empty, onCleared fires, non-empty doesn't fire onCleared, no-op when onCleared not providedTest plan
🤖 Generated with Claude Code