这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@frankcalise
Copy link
Contributor

@frankcalise frankcalise commented Apr 17, 2024

Please verify the following:

  • yarn test jest tests pass with new tests, if relevant
  • yarn lint eslint checks pass with new code, if relevant
  • yarn format:check prettier checks pass with new code, if relevant
  • README.md (or relevant documentation) has been updated with your changes

Describe your PR

  • Closes [Enhancement] v10 - Refactor Toggle #2644
  • Hides <Toggle /> in favor of exposing <Checkbox />, <Radio /> and <Switch />
  • Updates ir-docs components documentation to match boilerplate component changes
  • Removes react-native-reanimated dependency from Toggle components in favor of core Animated

@frankcalise frankcalise requested a review from mazenchami April 17, 2024 18:14
@mazenchami mazenchami changed the base branch from master to v10 April 17, 2024 21:40
@frankcalise frankcalise marked this pull request as ready for review April 18, 2024 16:54
Copy link
Contributor

@mazenchami mazenchami left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀 🎉

@jamonholmgren
Copy link
Member

This is awesome!

Someday I'd like to have screenshots of every component in the docs.

@frankcalise
Copy link
Contributor Author

frankcalise commented Apr 22, 2024

@jamonholmgren I agree, was thinking of that as I wrote these changes up.

Would we want the assets to live in this project though along side the docs or elsewhere? For cli/boilerplate development, seems like extra to pull down

EDIT: nevermind, saw the issue you opened :)

@jamonholmgren
Copy link
Member

Yeah I'm fairly strongly against checking in screenshots into open source repos, if they are just for documentation. Otherwise they live in the repo forever (even if you delete them).

@mazenchami mazenchami requested a review from yulolimum April 26, 2024 15:52
@mazenchami
Copy link
Contributor

@yulolimum could you please take a look at this PR?

return (
<Wrapper
activeOpacity={1}
// accessibilityRole={variant} // TODO: solve this since we no longer have variant
Copy link
Member

Choose a reason for hiding this comment

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

We can't use displayName to determine this, can we we? Or would that be "ToggleInput". We could definitely just pass in accessibilityRole and that would get spread below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the new revision, I passed it in from each of the parents with the variant names we would have had before - with the spread coming after in the event someone wanted to override it.

Copy link
Member

@yulolimum yulolimum left a comment

Choose a reason for hiding this comment

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

impressive work

@frankcalise frankcalise merged commit 0214b07 into v10 May 6, 2024
@frankcalise frankcalise deleted the feat/toggle-components branch May 6, 2024 13:26
frankcalise added a commit that referenced this pull request May 29, 2024
… Switch (#2667 by @frankcalise)

* refactor(toggle): split to Checkbox, Radio and Switch components

* fix(boilerplate): update demos to use specific toggle components

* updating deprecated reanimated Extrapolate

* TS fixes

* docs: explode Toggle docs to Checkbox, Radio, Switch

* docs(components): added Checkbox, Radio, Switch to main listing

* fix(boilerplate): remove reanimated from Checkbox

* fix(boilerplate): remove reanimated from Radio

* fix(boilerplate): checkbox, radio match old duration times from default reanimated values

* fix(boilerplate): remove reanimated dep from Switch

* docs(toggle): tsx formatting

* refactor(boilerplate):drop prefix from component specific props

* some missed props

* fix(boilerplate): toggle components accessibilityRole

---------

Co-authored-by: Mazen Chami <mazenchami@gmail.com>
infinitered-circleci pushed a commit that referenced this pull request Oct 14, 2024
# [10.0.0](v9.10.1...v10.0.0) (2024-10-14)

### Bug Fixes

* **boilerplate:** expo-router initialize i18n ([#2791](#2791) by [@frankcalise](https://github.com/frankcalise)) ([a00113e](a00113e))
* **boilerplate:** Make icon default color explicit, and respond to dark mode ([#2795](#2795) by [@lindboe](https://github.com/lindboe)) ([b82398d](b82398d))
* **cli:** improper MST removal when using CLI prompt, new arch compat ([#2785](#2785) by [@frankcalise](https://github.com/frankcalise)) ([3956652](3956652))
* remove snackify command and references ([#2763](#2763) by [@frankcalise](https://github.com/frankcalise)) ([09671e8](09671e8))

### Features

* Ignite X with Expo 51 ([005ef05](005ef05))
* **boilerplate:** Toggle component refactored to Checkbox, Radio and Switch ([#2667](#2667) by [@frankcalise](https://github.com/frankcalise)) ([54f5208](54f5208))
* **cli:** expo-router option ([#2727](#2727) by [@frankcalise](https://github.com/frankcalise)) ([8bea1f9](8bea1f9)), closes [#2731](#2731)
* **cli:** generator options --dir and --case  ([#2726](#2726) by [@frankcalise](https://github.com/frankcalise)) ([dff3d24](dff3d24))
* **Theming:** Adds theming support with documentation. ([#2636](#2636)) ([a1ae047](a1ae047))
* **v10:** cng default ([#2641](#2641)) ([c7d998d](c7d998d))
* **v10:** Remove MobX-State-Tree flag for non-demo projects ([#2647](#2647) by @Jpoliachik) ([a738243](a738243))
* add MMKV for v10 ([#2660](#2660) by [@frankcalise](https://github.com/frankcalise)) ([9164e5e](9164e5e))

### BREAKING CHANGES

* Ignite X is out now! This update adds:

* Expo Prebuild as default
* Dark mode support
* Static routing with Expo Router
* Flexible generator directory support
* Option to remove mobx-state-tree
* AsyncStorage->MMKV
* New i18n configuration with react-i18next
* Lint configuration updates
* Toggle component → Checkbox, Radio, and Switch
* Improved keyboard avoidance
* Component test example configuration

Read all about it in our blog article!

https://shift.infinite.red/what-is-ignite-x-9ecde0b34d75
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.

[Enhancement] v10 - Refactor Toggle

5 participants