Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve occasional styling bug with inline display in datetime mode on iOS #697

Merged
merged 5 commits into from
Apr 8, 2023

Conversation

fobos531
Copy link
Contributor

@fobos531 fobos531 commented Apr 8, 2023

Overview

Continuing on from our discussion #672, the aim of this PR is to provide a temporary resolution of the occasional styling bug with inline display in datetime mode on iOS. More context is in the linked issue. When testing, I found that 370 is the most appropriate value with the current default styles of the picker. However, after more tinkering, I discovered that applying various other styles to the picker, e.g. modalStyleIOS and pickerStyleIOS, it could affect the efficiency of this "fix". With that said, this will work IF the users use the default styles provided by this library. For cases when they provide more of their own styles, a pickerComponentStyleIOS prop is now exposed which they can use to overwrite the fix applied in this PR. I'm not sure if this is the best approach, but I felt it was necessary to cover all cases.

Test Plan

See: #672 (comment)

Please let me know if you feel any modifications need to be made here.

Side question: do you have any plans/roadmap on making tweaks to this library in general in the near future? I saw it could use some love (e.g. by default incorrect padding, insets are being taken into account on iPhone 14 pro etc.), so I was wondering if this is something you plan on working on already or you're looking for community contributions for it.

@@ -50,7 +50,7 @@
"semantic-release": "^17.1.2"
},
"peerDependencies": {
"@react-native-community/datetimepicker": ">=3.0.0",
"@react-native-community/datetimepicker": ">=6.7.0",
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks :)

@mmazzarolo
Copy link
Owner

Side question: do you have any plans/roadmap on making tweaks to this library in general in the near future? I saw it could use some love (e.g. by default incorrect padding, insets are being taken into account on iPhone 14 pro etc.), so I was wondering if this is something you plan on working on already or you're looking for community contributions for it.

I don't — hard for me to focus on improving it nowadays. Contributions are warmly welcome! If the contributions become more than occasional I'm also open to share the ownership officially and/or move it to a shared org.

@mmazzarolo mmazzarolo merged commit 8733f83 into mmazzarolo:master Apr 8, 2023
github-actions bot pushed a commit that referenced this pull request Apr 8, 2023
# [15.0.0](v14.0.1...v15.0.0) (2023-04-08)

### Bug Fixes

* resolve occasional styling bug with inline `display` in `datetime` mode on iOS ([#697](#697)) ([8733f83](8733f83))

### BREAKING CHANGES

* This is a light breaking change since it might break custom patches people applied to fix this issue in other way + we're bumping the `@react-native-community/datetimepicker` peer-dependency version
@github-actions
Copy link

github-actions bot commented Apr 8, 2023

🎉 This PR is included in version 15.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mmazzarolo
Copy link
Owner

Released @fobos531 , thanks so much for contributing 👍

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.

2 participants