Skip to content

[MOO-2432]: Rewrite the toggle-buttons segmented control - #668

Open
SrirangK wants to merge 3 commits into
mx/11.12.xfrom
moo/MOO-2432-rewrite-toggle-widget-11.12
Open

SrirangK wants to merge 3 commits into
mx/11.12.xfrom
moo/MOO-2432-rewrite-toggle-widget-11.12

Conversation

@SrirangK

@SrirangK SrirangK commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • Contains unit tests ✅ ❌
  • Contains breaking changes ✅ ❌
  • Compatible with: MX 8, 9, 10
  • Did you update version and changelog? ✅ ❌
  • PR title properly formatted ([XX-000]: description)? ✅ ❌
  • Works in Android ✅ ❌
  • Works in iOS ✅ ❌
  • Works in Tablet ✅ ❌

Feature specific

  • Comply with designs ✅ ❌
  • Comply with PM's requirements ✅ ❌

Please remove unnecessary emojis and sections and this comment before proceeding

This PR contains

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Other (describe)

What is the purpose of this PR?

...

Relevant changes

Please add a high level explanation of what was changed and how the initial problem was solved

What should be covered while testing?

...

Extra comments (optional)

Please add extra comments or delete the section if not required

@SrirangK
SrirangK requested a review from a team as a code owner October 1, 2026 11:52
### Changed

- Replaced external dependency `react-native-segmented-control-tab` with in-house SegmentedControl component.
- Fixed accessibility: component now uses modern React Native accessibility props (`accessibilityRole="tab"`, `accessibilityState.selected`) instead of deprecated `accessibilityTraits` and `accessibilityComponentType`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's move this as part of a ### Fixed section for better clarification.

]}
testID={`${testID}$button-${index}`}
>
<Text numberOfLines={1} style={[textStyle, isSelected && activeTextStyle]}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There might not be a specific text for this, so let's make sure that the numberOfLines={1} does not cause text clipping on long text sizes.

backgroundColor: "transparent",
opacity: pressed ? 0.6 : 1
},
buttonStyle,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This note is part of automatic LLM review so I am not entirely sure of validity. But, posting it here so that at least we test it, since it might pass the maestro screenshot comparison threshold.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants