Skip to content

Add animation to Segmented Button icons#4543

Open
aravind3566 wants to merge 47 commits into
callstack:5.0from
aravind3566:main
Open

Add animation to Segmented Button icons#4543
aravind3566 wants to merge 47 commits into
callstack:5.0from
aravind3566:main

Conversation

@aravind3566

@aravind3566 aravind3566 commented Nov 7, 2024

Copy link
Copy Markdown

A pull request for the react-native-paper repository adds animated icon changes to SegmentedButtons and SegmentedButtonItem components, improving UI and addressing an unspecified issue.

Key Takeaways:

  • A pull request was created for the react-native-paper repository.
  • The pull request includes changes to SegmentedButtons.tsx and SegmentedButtonItem.tsx files.
  • The main change is the addition of an animated icon feature to the SegmentedButtons component.
  • Three commits were made on November 7, 2024.
  • The pull request involves 13 additions and 2 deletions across 2 files.
  • The pull request is mergeable.
  • Add option for number of lines for label text
  • The changes include adding an animated property to both SegmentedButtons and SegmentedButtonItem components.

Source:
main...aravind3566:react-native-paper:main

@callstack-bot

callstack-bot commented Nov 7, 2024

Copy link
Copy Markdown

Hey @aravind3566, thank you for your pull request 🤗. The documentation from this branch can be viewed here.

aravindIapparel
aravindIapparel approved these changes Nov 8, 2024
@aravind3566
aravind3566 marked this pull request as draft November 19, 2024 02:21
@aravind3566
aravind3566 marked this pull request as ready for review November 19, 2024 02:21
@lukewalczak
lukewalczak force-pushed the main branch 4 times, most recently from db1ca25 to dc21edf Compare May 8, 2025 08:39
aravind3566 and others added 26 commits June 24, 2025 15:42
* chore: remove md2 support

* docs: remove md2 references from docs

* chore: update example to use md3 only, removing md2 references

* chore: remove Typography/v2 and version references from types

* chore: remove subtitle and subtitleStyle from AppbarContent

* chore: remove getColor from BottomNavigation
* docs: remove md2 references from docs

* fix: pre-commit hook lint issues

* fix: ripple not showing
* chore: remove md2 support

* fix: update colors as per material-components color tokens

* see https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/color/res/values/tokens.xml

* fix: update the color schema for LightTheme and DarkTheme

* see: https://m3.material.io/styles/color/roles

* feat: add DynamicTheme

* Known limitation: surface/container roles on API 31-33 use
* @color/m3_ref_palette_dynamic_neutral_variant* (MCL resources that require a
* native DynamicColors setup). No @android:color/ equivalent exists for those
* slots. Reference palette values are used as fallback on API 31-33.

* refactor: remove usage of expo-material3-theme

* refactor: rename "device colors" to "Dynamic Theme"

* feat: update Colors and stateOpacity tokens
for PlatformColor compatibility

* surfaceDisabled, onSurfaceDisabled and backdrop which were not part of the MD standard were removed
* the reference theme elevation colors now use the correct neutral tones; see https://m3.material.io/blog/tone-based-surface-color-m3
* replace usage of "alpha" with opacity or surface colors
* remove disabled FAB prop
* refactor: remove MD3 prefix and use deprecated aliases

* refactor: strip remaining v3 version markers
Adds src/theme/tokens/sys/color/roles.ts with a roleToTone table keyed
by (mode, contrast) and a buildScheme() function. LightTheme and
DarkTheme replace their hand-duplicated color literals with a single
buildScheme() call each. Output shape is identical; tone values match
the existing hand-written spec.
…#4917)

* feat: add theme.state opacity tokens and split theme types

* feat: add disabled and enabled opacity to theme.state

* fix: code review findings
…stack#4920)

Adds 15 *Emphasized entries per M3 Design Kit: Display/Headline/TitleLarge/Body use Medium (500), TitleMedium/TitleSmall/Label use Bold (700). Adds weightBold to ref.typeface. Fixes displayLarge letterSpacing (0 -> -0.25) and bodyLarge letterSpacing (0.15 -> 0.5).
Adds theme.motion with two preset schemes (expressiveMotion default, standardMotion), M3 easing curves, and duration constants verified against the material.io spec. Includes toRawSpring() helper to convert the spec damping ratio to the raw coefficient expected by Animated.spring and Reanimated
Co-authored-by: Satyajit Sahoo <satyajit.happy@gmail.com>
…eme export

  - DynamicTheme.android: replace duplicated light/dark tables with a
    single colorRoleMap + buildDynamicColors helper; use Palette.* tokens
    directly for the ref fallback instead of reading back through
    LightTheme.colors.*/DarkTheme.colors.*; export isDynamicColorSupported
    and short-circuit map construction when unsupported
  - PaperProvider: respect theme.dark when picking the base scheme and
    shallow-merge colors so partial color overrides survive
  - Remove public DefaultTheme export (use LightTheme); update internal
    imports and babel-import-rewrite fixtures
Adds an `error?: boolean` prop to Checkbox, CheckboxAndroid and
CheckboxIOS. When true, the outline (unchecked) and container (checked /
indeterminate) use `theme.colors.error`. The `disabled` state and
explicit `color` / `uncheckedColor` overrides take precedence.

Addresses one bullet from callstack#4937 / callstack#4949 (Checkbox section,
"Error state not implemented"). Verified visually on iOS Simulator
and Android Emulator across light and dark themes.
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.