Skip to content

Rename Boolean options to follow Swift naming conventions - #157

Merged
yysskk merged 1 commit into
mainfrom
refactor/option-naming
Jul 7, 2026
Merged

Rename Boolean options to follow Swift naming conventions#157
yysskk merged 1 commit into
mainfrom
refactor/option-naming

Conversation

@yysskk

@yysskk yysskk commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

Three SwipeMenuViewOptions properties had names that read as broken English and ignored the Swift API Design Guidelines conventions for Boolean assertions. This PR renames them; the old spellings are removed (breaking change, recorded under Unreleased → Breaking in the changelog):

Old New Rationale
TabView.needsAdjustItemViewWidth adjustsItemViewWidth UIKit's adjusts… pattern (e.g. adjustsFontSizeToFitWidth)
TabView.needsConvertTextColorRatio interpolatesTextColorOnSwipe says what happens: titles crossfade between textColor and selectedTextColor in proportion to the swipe progress
TabView.AdditionView.isAnimationOnSwipeEnable isAnimationOnSwipeEnabled fixes the is…Enable grammar

The doc comments for the renamed options now describe the behavior precisely (the old ones, e.g. "AdditionView swipe animation disable feature. Defaults to 'true'", did not). The DocC article, example app, and tests are updated to the new names; no references to the old spellings remain.

Tests

  • Existing behavior tests for these options (fixed-width items, text-color interpolation, defaults) now exercise the new names.
  • All 70 package tests and the 8 example-app tests pass locally on the iPhone 17 simulator (Xcode 26.5).

Three SwipeMenuViewOptions properties had names that read as broken
English and ignored the Swift API Design Guidelines' conventions for
Boolean assertions:

- TabView.needsAdjustItemViewWidth -> adjustsItemViewWidth, matching
  UIKit's adjusts... pattern (e.g. adjustsFontSizeToFitWidth).
- TabView.needsConvertTextColorRatio -> interpolatesTextColorOnSwipe,
  which says what actually happens: titles crossfade between textColor
  and selectedTextColor in proportion to the swipe progress.
- TabView.AdditionView.isAnimationOnSwipeEnable ->
  isAnimationOnSwipeEnabled, fixing the is...Enable grammar.

The old spellings are removed. Documentation comments for the renamed
options now describe their behavior precisely, and the DocC article,
example app, and tests use the new names.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, purely mechanical rename of three SwipeMenuViewOptions booleans to follow Swift API naming guidelines. Verified no stray references to the old names remain anywhere (source, docs, example app, tests), the changelog documents the breaking change, and the updated doc comments accurately describe the actual runtime behavior. No logic changes, no concurrency concerns.

@yysskk
yysskk merged commit 1c437bf into main Jul 7, 2026
4 checks passed
@yysskk
yysskk deleted the refactor/option-naming branch July 7, 2026 13:24
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