Simplify emoji suggestion settings#451
Merged
Merged
Conversation
Comment on lines
+90
to
+92
| if model.matches.isEmpty { | ||
| Text("Keep typing to search") | ||
| } else if let acceptKeyLabel = model.acceptKeyLabel { |
Contributor
There was a problem hiding this comment.
Footer copy contradicts "No emoji found" state
When the user has typed a query (e.g. :xyz) but no matches exist, the content area already shows "No emoji found". The footer unconditionally shows "Keep typing to search" in the entire matches.isEmpty branch, regardless of whether query is empty or not. A user who sees "No emoji found" above and "Keep typing to search" below gets conflicting signals — one suggests the search is done, the other suggests it might work with more input. Splitting on model.query.isEmpty would surface distinct, accurate messages for the "not started yet" vs "tried and found nothing" states.
Replace the menu Picker with the same horizontal row of selectable emoji swatches used for Skin Tone, so the two emoji-customization controls in General match visually. Three swatches: person, man, woman, in EmojiGender.allCases order.
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
Simplifies emoji suggestion settings by removing the Include Neutral Variant toggle and making the default emoji variant always appear after a preferred skin-tone variant. Replaces the skin tone dropdown with a horizontal row of victory-hand tone buttons, refreshes the option labels/copy, and adds an emoji picker footer that shows the configured word-accept shortcut.
Validation
swiftlint lint --quiet 2>&1 | tail -20— exit 0xcodebuild test -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' -only-testing:CotabbyTests/EmojiVariantResolverTests -only-testing:CotabbyTests/EmojiPickerPanelLayoutTests -only-testing:CotabbyTests/SuggestionAvailabilityEvaluatorTests CODE_SIGNING_ALLOWED=NO -derivedDataPath build/DerivedDataEmojiUx— TEST SUCCEEDED, 32 tests, 0 failuresxcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build -derivedDataPath build/DerivedDataEmojiUx— BUILD SUCCEEDEDNo screenshot captured; this is a native macOS settings UI change, and the validation above covers compilation plus the changed pure behavior.
Linked issues
N/A
Risk / rollout notes
cotabbyIncludeNeutralEmojiVariantuser defaults are now ignored because the behavior is fixed: preferred tone first, default variant next.Greptile Summary
This PR simplifies the emoji suggestion settings by removing the "Include Neutral Variant" toggle (making the default variant always follow a preferred skin-tone variant), replacing the skin-tone and gender
Pickerdropdowns with horizontal swatch-button rows, and adding a persistent footer to the emoji picker panel that shows the configured word-accept shortcut.EmojiVariantResolvernow unconditionally appends the untoned glyph after every toned glyph, replacing the oldincludeNeutralflag;EmojiVariantPreferencesloses theincludeNeutralfield accordingly.EmojiPickerViewgains a footer bar (header + divider + list + divider + footer), and the per-rowEmojiKeycapis removed in favour of a single static hint in the footer;EmojiPickerPanelLayoutadds afooterHeightconstant and includes it incontentSize.SuggestionSettingsModeladdsemojiPickerAcceptKeyLabel, which returns the word-accept label regardless of the ghost-hint toggle, so the picker instruction is always shown when a key is bound.Confidence Score: 5/5
Safe to merge. The behavior changes are intentional and well-scoped, existing user defaults for the removed toggle are gracefully ignored, and all 32 tests pass.
All changed logic paths are covered by the updated test suite. The removals (include-neutral toggle, per-row keycap, gender/neutral binding) are clean and consistent across model, resolver, UI, and tests. The one leftover binding is inert dead code with no runtime impact.
GeneralPaneView.swifthas a leftoveremojiSkinToneBindingthat was not removed when the Picker was replaced.Important Files Changed
emojiSkinToneBinding) is now unreferenced.includeNeutral;applySkinTonenow always appends the untoned match after the toned one.EmojiKeycapby dropping accent-state colouring; cleans upEmojiPickerRow.includeNeutralEmojiVariantproperty, defaults key, and setter; addsemojiPickerAcceptKeyLabelcomputed property that bypasses the ghost-hint toggle.footerHeightconstant and includes it (plus a second divider) incontentSize; tests updated to match.emojiPickerAcceptKeyLabelinstead ofacceptanceHintLabelso the picker footer is unaffected by the ghost-hint toggle.includeNeutralcases, verifies that a non-neutral skin tone now always yields both toned and untoned glyphs.emojiPickerAcceptKeyLabelignores the ghost-hint toggle and returnsnilonly when the word-accept key is cleared.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[User types :smile] --> B[EmojiPickerViewModel\nmatches + selectedIndex] B --> C{matches empty?} C -- yes --> D[Content: 'Type to search'\nor 'No emoji found'] C -- no --> E[ScrollView\nEmojiPickerRow list] D --> F[Footer: 'Keep typing to search'] E --> G{acceptKeyLabel set?} G -- yes --> H[Footer: Press keycap to insert] G -- no --> I[Footer: Click an emoji to insert] B --> J[EmojiVariantResolver.resolve] J --> K[applyGender\ncollapses neutral/man/woman] K --> L[applySkinTone] L --> M{skinTone == neutral?} M -- yes --> N[return match unchanged] M -- no --> O[tonedMatch + match\nalways both]Reviews (2): Last reviewed commit: "Make People Emoji Style a swatch row mat..." | Re-trigger Greptile