Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

feat: checkbox #571

Merged
merged 5 commits into from
Dec 8, 2021
Merged

feat: checkbox #571

merged 5 commits into from
Dec 8, 2021

Conversation

intergalacticspacehighway
Copy link
Collaborator

@intergalacticspacehighway intergalacticspacehighway commented Dec 6, 2021

Checkbox

  • Handles accessibility on web and native. Added some interaction using moti. ✨

@vercel
Copy link

vercel bot commented Dec 6, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/showtime/showtime/98GwqsauLvP3SitkTxn2WDiypLtu
✅ Preview: https://showtime-git-checkbox-showtime.vercel.app

@github-actions
Copy link

github-actions bot commented Dec 6, 2021

PR Preview

This pull request preview deployment is now available.

✅ Preview: io.showtime.development://expo-development-client/?url=https://exp.host/@tryshowtime/showtime/index.exp?release-channel=pr-571&sdkVersion=43.0.0

Comment ID: 986942792

Copy link
Contributor

@fontanierh fontanierh left a comment

Choose a reason for hiding this comment

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

Not requested, but still reviewing :D
Overall LGTM, just had two kind of subjective nits

onChange(!checked)
}, [onChange, checked])

const isDark = useColorScheme() === 'dark'
Copy link
Contributor

Choose a reason for hiding this comment

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

nit (and might not be worth handling in this PR): I see we are repeating this line at multiple places in the codebase.

Might be worth to have a useIsDarkMode that just returns wether color scheme is dark. And also maybe have a ColorSchemes Enum to avoid using magic strings

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah agreed. I wrote this multiple times too 🤦‍♂️

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Screen.Recording.2021-12-07.at.1.22.55.PM.mov

Agreed 😂

Will put you in request next time :D. Your reviews are helpful! Added the hook.


const isDark = useColorScheme() === 'dark'

const commonChild = (
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: it would be IMO more readable to have this as an actual component. Here when reading Checkbox, I need to first scan through an unnamed component out of context
Def not blocking of course

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed the approach on web. Won't need commonChild anymore 🎉

Copy link
Contributor

@axeldelafosse axeldelafosse left a comment

Choose a reason for hiding this comment

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

Looking very good on mobile! But it doesn't seem to work on web?

@@ -34,6 +36,8 @@ export const decorators = [
]

const MainAxisCenter = ({ children }) => {
useDeviceContext(tw)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove this now, added it to the tabs PR here: 23d37b2

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can you test it again?
Something was off with the input used. Changed the approach on web, should work now! Let me know

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah it's working now ✨

Copy link
Contributor

@axeldelafosse axeldelafosse left a comment

Choose a reason for hiding this comment

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

LGTM ✨

@intergalacticspacehighway intergalacticspacehighway merged commit 717e47c into staging Dec 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants