Skip to content

Hide the custom indicator icon picker from Settings#338

Merged
FuJacob merged 1 commit into
mainfrom
chore/hide-indicator-icon-setting
May 28, 2026
Merged

Hide the custom indicator icon picker from Settings#338
FuJacob merged 1 commit into
mainfrom
chore/hide-indicator-icon-setting

Conversation

@FuJacob
Copy link
Copy Markdown
Owner

@FuJacob FuJacob commented May 28, 2026

Summary

Removes the Settings UI for changing the field-edge indicator icon (the Choose Image / Reset row and its file importer / failure alert). The underlying storage and rendering path is untouched, so any custom image a user previously chose is still loaded and used at runtime.

Validation

  • swiftlint lint --quiet → exit 0
  • xcodebuild -project Cotabby.xcodeproj -scheme Cotabby -destination 'platform=macOS' build → ** BUILD SUCCEEDED **

Linked issues

None.

Risk / rollout notes

UI-only deletion. The model APIs (setCustomIndicatorImage, clearCustomIndicatorImage, customIndicatorImage) remain in place and are still consumed by AppDelegate, so this is a hide rather than a removal. If we want to fully retire the feature later, a follow-up can clean up the model and its UserDefaults key.

Greptile Summary

This PR removes the Indicator Icon picker UI from SettingsView — specifically the "Choose Image…" / "Reset" row, its fileImporter sheet, and the import-failure alert — while leaving the underlying model APIs and AppDelegate rendering path fully intact.

  • Removes three @State variables (isIndicatorIconImporterPresented, didIndicatorIconImportFail) and the private handleIndicatorIconSelection helper that drove the file-importer flow.
  • Removes the LabeledContent("Indicator Icon") row from the General section and the associated .fileImporter / .alert view modifiers from the form.
  • The UniformTypeIdentifiers import is still required because presentDisabledAppPicker() uses panel.allowedContentTypes = [.application].

Confidence Score: 5/5

This is a straightforward UI-only deletion with no logic changes; the model layer and AppDelegate rendering path are untouched, so users who previously chose a custom icon will continue to see it at runtime.

Every piece removed in this PR (two @State vars, the fileImporter modifier, the failure alert, the LabeledContent row, and the handleIndicatorIconSelection helper) is self-contained and has no callers or dependents remaining in the file. The UniformTypeIdentifiers import is still exercised by presentDisabledAppPicker. Nothing was accidentally left dangling.

No files require special attention.

Important Files Changed

Filename Overview
Cotabby/UI/SettingsView.swift Clean removal of the indicator icon picker UI (state vars, fileImporter modifier, failure alert, LabeledContent row, and handler method). No dead code left behind; the UniformTypeIdentifiers import remains valid for the app-picker panel.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User opens Settings] --> B[General Section]
    B --> C[Show Indicator Toggle]
    C --> D["(Indicator Icon row — REMOVED)"]
    C --> E[Show Accept Hint Toggle]

    subgraph Removed["Removed in this PR"]
        D
        F[Choose Image… Button]
        G[Reset Button]
        H[fileImporter sheet]
        I[Couldn't Use That Image alert]
        J[handleIndicatorIconSelection]
        D --> F
        D --> G
        F --> H
        H --> J
        J --> I
    end

    subgraph Retained["Retained — model layer untouched"]
        K[SuggestionSettingsModel.setCustomIndicatorImage]
        L[SuggestionSettingsModel.clearCustomIndicatorImage]
        M[SuggestionSettingsModel.customIndicatorImage]
        N[AppDelegate — renders custom indicator at runtime]
        K & L & M --> N
    end

    style Removed fill:#fdd,stroke:#f00
    style Retained fill:#dfd,stroke:#0a0
Loading

Reviews (1): Last reviewed commit: "Hide the custom indicator icon picker fr..." | Re-trigger Greptile

The Choose Image / Reset row was the only path users had to swap the
field-edge indicator art, and it was never quite productized. Hiding
the UI here removes the rough edge without disturbing the underlying
model: any previously-saved custom image is still loaded and rendered
by AppDelegate, so users who set one keep their pick.
@FuJacob FuJacob merged commit 2a3ceda into main May 28, 2026
4 checks passed
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