Sub-issue of #83762. Covers Tasks 3, 4 & 7 of @Guccio163's Apr 27 follow-up proposal, grouped per the May 11 split comment.
This is the third and final of three sub-issues. It is blocked by the <Link /> extraction sub-issue so the renames don't collide with the new <Link /> API surface.
Background
Three independent cleanups are bundled here because they are all small, mechanical, and share the same review surface (Button props and call sites):
Button.Text applies textAlignLeft conditionally when iconLeft is present, but it has a visible effect only when textNumberOfLines > 1 — exactly one real-world case in the codebase.
ButtonWithIcons falls back to iconLeftFill / iconLeftHoverFill when iconRightFill / iconRightHoverFill are not provided. This is implicit coupling between unrelated props.
- Several
should* props carry the prefix unnecessarily — they are simple opt-in flags or enums.
Scope
Remove conditional textAlignLeft from Button.Text
In ButtonWithIcons.tsx lines 137 & 144, the wrapper passes [!!iconLeft && styles.textAlignLeft, textStyles] into Button.Text / ButtonDoubleLineText. Remove the conditional, and migrate the one real-world multi-line case to pass textStyles={[styles.textAlignLeft]} at the call site.
Remove iconRightFill / iconRightHoverFill fallback
In ButtonWithIcons.tsx lines 154–155:
fill={iconRightFill ?? iconLeftFill}
hoverFill={iconRightHoverFill ?? iconLeftHoverFill}
Drop the fallback. Audit existing call sites that relied on it and pass iconRightFill / iconRightHoverFill explicitly where the right icon should match the left.
Rename should* props
| Current |
Proposed |
Notes |
shouldRemoveBorderRadius |
removeBorderRadius?: 'left' | 'right' | 'all' |
Already an enum in the new API — the name just retains the old boolean prefix. |
shouldEnableHapticFeedback |
hapticFeedback?: boolean |
Opt-in feature flag — no need for the "should" framing. |
shouldBlendOpacity |
blendOpacity?: boolean |
Same reasoning; passed through to PressableWithFeedback, so a coordinated rename may be needed there too. |
shouldStayNormalOnDisable |
stayNormalOnDisable?: boolean |
Simple rename — removes the "should" prefix while keeping the same boolean semantics. |
These renames touch at minimum:
For shouldBlendOpacity → blendOpacity, also update the corresponding prop on PressableWithFeedback if reviewers prefer a coordinated rename.
Acceptance criteria
Dependencies
- Blocked by the
<Link /> extraction sub-issue — to avoid renaming props that change shape during Link extraction.
Issue Owner
Current Issue Owner: @ZhenjaHorbach
Sub-issue of #83762. Covers Tasks 3, 4 & 7 of @Guccio163's Apr 27 follow-up proposal, grouped per the May 11 split comment.
This is the third and final of three sub-issues. It is blocked by the
<Link />extraction sub-issue so the renames don't collide with the new<Link />API surface.Background
Three independent cleanups are bundled here because they are all small, mechanical, and share the same review surface (
Buttonprops and call sites):Button.TextappliestextAlignLeftconditionally wheniconLeftis present, but it has a visible effect only whentextNumberOfLines > 1— exactly one real-world case in the codebase.ButtonWithIconsfalls back toiconLeftFill/iconLeftHoverFillwheniconRightFill/iconRightHoverFillare not provided. This is implicit coupling between unrelated props.should*props carry the prefix unnecessarily — they are simple opt-in flags or enums.Scope
Remove conditional
textAlignLeftfromButton.TextIn
ButtonWithIcons.tsxlines 137 & 144, the wrapper passes[!!iconLeft && styles.textAlignLeft, textStyles]intoButton.Text/ButtonDoubleLineText. Remove the conditional, and migrate the one real-world multi-line case to passtextStyles={[styles.textAlignLeft]}at the call site.Remove
iconRightFill/iconRightHoverFillfallbackIn
ButtonWithIcons.tsxlines 154–155:Drop the fallback. Audit existing call sites that relied on it and pass
iconRightFill/iconRightHoverFillexplicitly where the right icon should match the left.Rename
should*propsshouldRemoveBorderRadiusremoveBorderRadius?: 'left' | 'right' | 'all'shouldEnableHapticFeedbackhapticFeedback?: booleanshouldBlendOpacityblendOpacity?: booleanPressableWithFeedback, so a coordinated rename may be needed there too.shouldStayNormalOnDisablestayNormalOnDisable?: booleanThese renames touch at minimum:
src/components/ButtonComposed/types.tssrc/components/ButtonComposed/Button.tsxsrc/components/ButtonComposed/composed/ButtonWithIcons.tsxFor
shouldBlendOpacity→blendOpacity, also update the corresponding prop onPressableWithFeedbackif reviewers prefer a coordinated rename.Acceptance criteria
!!iconLeft && styles.textAlignLeft(or equivalent) insideButtonComposed; the multi-line use case has been moved to the call site.iconRightFill ?? iconLeftFill/iconRightHoverFill ?? iconLeftHoverFillfallback inButtonWithIcons; affected call sites pass explicit values.should*props renamed and every call site migrated; no references to the old names remain in production code.Dependencies
<Link />extraction sub-issue — to avoid renaming props that change shape during Link extraction.Issue Owner
Current Issue Owner: @ZhenjaHorbach