-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Remove getTransaction
#61910
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
Comments
Triggered auto assignment to Contributor-plus team member for initial proposal review - @dominictb ( |
Triggered auto assignment to @zanyrenney ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-05-13 14:11:11 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Remove getTransaction What is the root cause of that problem?Refactor What changes do you think we should make in order to solve the problem?Remove 1.
BTW, we should apply the above changes for cases we are using the transaction data to display and for other cases, especially in util .ts files, that do not need reactivity we can add an Onyx.connect to the actions file and get the transaction directly from it. The perfect example is here Line 8199 in 074a9fd
It is used in actions like pay and approve money request so no need for reactivity as the data is fetched when the action is triggered by the user and used immediately What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N / A What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.Remove getTransaction What is the root cause of that problem?Improvement What changes do you think we should make in order to solve the problem?We should remove App/src/libs/TransactionUtils/index.ts Lines 1256 to 1258 in c7d6a67
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional)ResultReminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
ProposalPlease re-state the problem that we are trying to solve in this issue.This component uses What is the root cause of that problem?The root cause is the use of a non-reactive function ( What changes do you think we should make in order to solve the problem?We should remove the use of Code Change Summary
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional) |
Thanks for proposals everyone. We should clean up all I have this specific case and wonder how you're gonna clean it up: Line 8202 in 12eb120
Also please create test branch and attach evidence that performance test won't fail. |
@dominictb This case is used for payMoneRequest and approveMoneyRequest which use the transaction data on its trigger via user's action there is no need for reactivity we can use getTransaction for these cases. There are other examples we use similar functions like here Line 9141 in 58ea580
cc @luacmartins |
I think that for actions like the one above, we can add an |
Makes Sense. So I have already mentioned all different types of cases to handle in my proposal Other details left should be handled in the PR phase WDYT @dominictb @luacmartins |
Okay I think @FitseTLT proposal is the most detailed. Let's go with them. Let's remove all App/tests/actions/EnforceActionExportRestrictions.ts Lines 67 to 72 in c36fc9d
🎀👀🎀 C+ reviewed |
Current assignee @luacmartins is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@FitseTLT Ping me once PR is ready. |
Problem
It breaks the reactivity of the application because the method itself is not subscribed to Onyx changes. So when a page uses the method to display information about the transaction, e.g. here and the transaction changes, the view is not updated with that change.
Solution
Remove getTransaction and pass transaction as argument instead
Issue Owner
Current Issue Owner: @The text was updated successfully, but these errors were encountered: