Skip to content

[MCORE-205] Update switch component#73

Merged
lisandra-santos merged 5 commits intomainfrom
feature/MCORE-205/update-switch-component
Mar 19, 2026
Merged

[MCORE-205] Update switch component#73
lisandra-santos merged 5 commits intomainfrom
feature/MCORE-205/update-switch-component

Conversation

@lisandra-santos
Copy link
Contributor

@lisandra-santos lisandra-santos commented Mar 6, 2026

Description

  • Update Switch component with a custom icon because the current one doesn’t scale well at 12.dp and create screenshot tests

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 Style/UI change (visual changes to components)
  • ♻️ Code refactoring (no functional changes)
  • ⚡ Performance improvement

Backward Compatibility

  • This change is backward compatible
  • This change includes deprecations (with @Deprecated annotation and migration guidance)
  • This change includes breaking changes (requires major version bump)

If breaking changes or deprecations, please explain:

Changes Made

  • Add a custom icon to the switch component
  • Update the preview screen to include more states for GdsSwitch and remove the legacy and neo styles
  • Update the colors for the disabled state. The colors are the same as in the enabled state, with reduced opacity applied to the entire switch.
  • Create screenshot tests
  • I noticed the ripple effect was extending outside the card, so I fixed it by using the clickable Card component.

Screenshots / Videos

image

Testing

  • Tested in the companion app
  • Tested in light and dark themes
  • Tested with different screen sizes/orientations
  • Verified existing functionality still works

Test details:

Documentation

  • Updated KDoc comments with usage examples
  • Updated README if needed
  • Added preview composables for new components

Checklist

  • My code follows the project's code style (ran ./gradlew spotlessApply)
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added usage examples for new public APIs
  • Any dependent changes have been merged and published

Additional Notes

@lisandra-santos lisandra-santos changed the title Update switch component [MCORE-205] Update switch component Mar 6, 2026
@lisandra-santos lisandra-santos marked this pull request as draft March 6, 2026 13:03
@github-actions
Copy link

Spotless Check Failed

The code formatting does not match the project standards. Please run ./gradlew spotlessApply locally to fix the formatting issues, then commit and push the changes.

@lisandra-santos lisandra-santos marked this pull request as ready for review March 18, 2026 12:28
Copy link

@shubhamseb shubhamseb left a comment

Choose a reason for hiding this comment

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

Nice 👏

Copy link
Collaborator

@enerothseb enerothseb left a comment

Choose a reason for hiding this comment

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

👍

@lisandra-santos lisandra-santos merged commit c51d2bb into main Mar 19, 2026
6 checks passed
@lisandra-santos lisandra-santos deleted the feature/MCORE-205/update-switch-component branch March 19, 2026 14:00
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.

3 participants