Skip to content

Commit

Permalink
chore: readd date time picker (#11852)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This reverts commit 617185a. The
datetime library, used by the DS team, was removed, causing instability
in Storybook. This PR aims to revert the commit that removed the
library.


Passing E2E:
https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c36d7fe0-fe0b-49ba-920a-912eb5f1c0e8

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
cortisiko authored Oct 17, 2024
1 parent 0783764 commit 2ffb4aa
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
ignores:
- '@metamask/oss-attribution-generator'
- 'webpack-cli'
- '@react-native-community/datetimepicker'
- '@react-native-community/slider'
- 'patch-package'
- '@lavamoat/allow-scripts'
Expand Down
6 changes: 6 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,8 @@ PODS:
- React-Core
- RNCPicker (2.2.1):
- React-Core
- RNDateTimePicker (7.7.0):
- React-Core
- RNDefaultPreference (1.4.3):
- React
- RNDeviceInfo (9.0.2):
Expand Down Expand Up @@ -896,6 +898,7 @@ DEPENDENCIES:
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- "RNCMaskedView (from `../node_modules/@react-native-masked-view/masked-view`)"
- "RNCPicker (from `../node_modules/@react-native-picker/picker`)"
- "RNDateTimePicker (from `../node_modules/@react-native-community/datetimepicker`)"
- RNDefaultPreference (from `../node_modules/react-native-default-preference`)
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
Expand Down Expand Up @@ -1113,6 +1116,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-masked-view/masked-view"
RNCPicker:
:path: "../node_modules/@react-native-picker/picker"
RNDateTimePicker:
:path: "../node_modules/@react-native-community/datetimepicker"
RNDefaultPreference:
:path: "../node_modules/react-native-default-preference"
RNDeviceInfo:
Expand Down Expand Up @@ -1270,6 +1275,7 @@ SPEC CHECKSUMS:
RNCClipboard: ddd4d291537f1667209c9c405aaa4307297e252e
RNCMaskedView: 090213d32d8b3bb83a4dcb7d12c18f0152591906
RNCPicker: cb57c823d5ce8d2d0b5dfb45ad97b737260dc59e
RNDateTimePicker: 4f3c4dbd4f908be32ec8c93f086e8924bd4a2e07
RNDefaultPreference: 2f8d6d54230edbd78708ada8d63bb275e5a8415b
RNDeviceInfo: 1e3f62b9ec32f7754fac60bd06b8f8a27124e7f0
RNFBApp: 5f87753a8d8b37d229adf85cd0ff37709ffdf008
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
"@react-native-clipboard/clipboard": "1.8.4",
"@react-native-community/blur": "^4.4.0",
"@react-native-community/checkbox": "^0.5.17",
"@react-native-community/datetimepicker": "^7.5.0",
"@react-native-community/netinfo": "^9.5.0",
"@react-native-community/slider": "^4.4.3",
"@react-native-cookies/cookies": "^6.2.1",
Expand Down
13 changes: 13 additions & 0 deletions patches/@react-native-community+datetimepicker+7.7.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m b/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
index 4ff3362..c139440 100644
--- a/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
+++ b/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
@@ -41,7 +41,7 @@ - (void)setTimeZoneName:(NSString *)timeZoneName {
YGNodeMarkDirty(self.yogaNode);
}

-static YGSize RNDateTimePickerShadowViewMeasure(YGNodeConstRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
+static YGSize RNDateTimePickerShadowViewMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
{
RNDateTimePickerShadowView *shadowPickerView = (__bridge RNDateTimePickerShadowView *)YGNodeGetContext(node);

7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6689,6 +6689,13 @@
prompts "^2.4.0"
semver "^7.5.2"

"@react-native-community/datetimepicker@^7.5.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@react-native-community/datetimepicker/-/datetimepicker-7.7.0.tgz#0d0162b0434c7b35883f8c5af846f35e23d045ec"
integrity sha512-nYzZy4DQLRFUzKJShWzRleCaebmCJfZ1lIcFmZgMXJoiVuGJNw3OIGHSWmHhPETh3OhP1RO3to882d7WmDIyrA==
dependencies:
invariant "^2.2.4"

"@react-native-community/netinfo@^9.5.0":
version "9.5.0"
resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-9.5.0.tgz#93663bbb105feb8f729b8f0271ee06ffc009f024"
Expand Down

0 comments on commit 2ffb4aa

Please sign in to comment.