-
Notifications
You must be signed in to change notification settings - Fork 2
fix apply patch to fork #1
fix apply patch to fork #1
Conversation
@DylanDylann please use @Expensify/pullerbear to assign a C+ when the PR is ready |
Sorry, I cannot do this, can you help me, please |
ah I completely forgot that this is a new repository. thank you for reminding me of that 😅 I gonna ask some C+ to review this PR 👍 |
@allroundexperts just removed all the dist files. Please help check. |
if (!handle) { | ||
if (process.env.NODE_ENV !== 'production') { | ||
invariant(false, 'Touch sensor unable to find drag handle'); | ||
} else { | ||
invariant(false); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invariant(false, process.env.NODE_ENV !== 'production' ? 'Touch sensor unable to find drag handle' : undefined)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, what do you mean here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@allroundexperts updated PR based on your suggestion code
function startPendingDrag( | ||
actions: PreDragActions, | ||
point: Position, | ||
target, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm... we should type target
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, to type it you can check the original PR, which was used to create the patch file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kosmydel. @allroundexperts Just add type to the event, handle params. Let`s review it. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@allroundexperts friendly bump in case you miss it
@@ -437,7 +439,12 @@ export default function useSensorMarshal({ | |||
}), | |||
[contextId, lockAPI, registry, store], | |||
); | |||
|
|||
const findClosestDragHandle = useCallback( | |||
function (event: Event): ?DraggableId { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not how typing works I think. It should be: function (event: Event): DraggableId {}
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because I found a lot of parts in this repo that use this. or example:
react-beautiful-dnd/src/view/use-sensor-marshal/use-sensor-marshal.js
Lines 441 to 445 in 013bfce
const findClosestDraggableId = useCallback( | |
(event: Event): ?DraggableId => | |
findClosestDraggableIdFromEvent(contextId, event), | |
[contextId], | |
); |
So what do you think about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this and can confirm that this works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. When creating this fork PR, I tried creating dist files and adding use it in Expensify node_modules, then testing it in the distance request feature, there was no error occurs
Screencast.from.18-10-2023.23.15.31.webm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can double-check to confirm it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of manually changing the node_modules
you can just add it in Expensify by using npm i <local path to the packed library>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kosmydel thanks for your information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested this and can confirm that this works?
@allroundexperts Just to confirm that it works well from my side. If you tested and did not encounter any error, please go to next step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
is this ready for another round of review @DylanDylann ? |
@hayata-suenaga yeah. I ve requested C+ to review |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2023-11-02.at.8.51.21.AM.movAndroid: mWeb ChromeScreen.Recording.2023-11-02.at.8.53.15.AM.moviOS: NativeScreen.Recording.2023-11-02.at.8.55.44.AM.moviOS: mWeb SafariScreen.Recording.2023-11-02.at.8.57.34.AM.movMacOS: Chrome / SafariScreen.Recording.2023-11-02.at.8.40.21.AM.movMacOS: DesktopScreen.Recording.2023-11-02.at.8.48.59.AM.mov |
@DylanDylann Getting this crash. Screen.Recording.2023-10-30.at.9.58.13.AM.mov |
@allroundexperts how did you install the package? please help check if you have the dist folder in node_modules/react-beautiful-dnd |
@DylanDylann I cloned the package locally and did a |
what about this one? @allroundexperts |
@DylanDylann I did and attached is the |
On my side, after create run webpack to create dist files, here is the result: How do you create the dist files? @allroundexperts |
|
Here are steps to create dist files from my side @allroundexperts :
|
@allroundexperts do you still have crashes? |
@hayata-suenaga Yes. But I'll try again tonight. |
@allroundexperts if you encounter any issue, feel free to ask me |
@allroundexperts do you have any stuck with this one? |
@DylanDylann The crash is still happening. |
I'm following the exact steps that you mentioned here |
@allroundexperts please give me your dist folder`s structure after folow these steps? #1 (comment). Here is mine: |
@allroundexperts yeah. But just need to move only the dist result to the main repo, like below: |
Doing an |
Also, after copying over, have you removed the patch? |
I think currently, we just need to test if the change works properly or not. After PR is merged, we will follow this one #1 (comment)
Yes, I removed |
@kosmydel Can you please check if the crash is happening on your side? |
I've quickly checked, and the crash doesn't affect me. Did you pack the library, @allroundexperts? You should:
|
I was missing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Thanks @allroundexperts and @kosmydel. |
@hayata-suenaga can you help publish this fork package? |
Details
Fixed Issues
$ Expensify/App#28797
PROPOSAL: Expensify/App#28797 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
android-chrome-money.mp4
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screencast.from.18-10-2023.23.15.31.webm
MacOS: Desktop