react-native-onyx icon indicating copy to clipboard operation
react-native-onyx copied to clipboard

[HOLD] keyChange update key/connectionID for faster lookup

Open gedu opened this issue 1 year ago • 5 comments

Details

Following proposal: https://github.com/Expensify/App/issues/35809

Related Issues

Manual Tests

https://github.com/Expensify/App/pull/36226#issuecomment-1938661752

Author Checklist

  • [X] I linked the correct issue in the ### Related Issues section above
  • [X] I wrote clear testing steps that cover the changes made in this PR
    • [X] I added steps for local testing in the Tests section
    • [X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • [X] I included screenshots or videos for tests on all platforms
  • [X] I ran the tests on all platforms & verified they passed on:
    • [X] Android / native
    • [X] Android / Chrome
    • [X] iOS / native
    • [X] iOS / Safari
    • [X] MacOS / Chrome / Safari
    • [X] MacOS / Desktop
  • [X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • [X] I followed proper code patterns (see Reviewing the code)
    • [X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • [X] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • [X] I verified that comments were added to code that is not self explanatory
    • [X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • [X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • [X] I verified the JSDocs style guidelines (in STYLE.md) were followed
  • [X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • [X] I followed the guidelines as stated in the Review Guidelines
  • [X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • [X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • [X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • [X] I verified that if a function's arguments changed that all usages have also been updated correctly
  • [X] If a new component is created I verified that:
    • [X] A similar component doesn't exist in the codebase
    • [X] All props are defined accurately and each prop has a /** comment above it */
    • [X] The file is named correctly
    • [X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • [X] The only data being stored in the state is data necessary for rendering and nothing else
    • [X] If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
    • [X] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • [X] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • [X] All JSX used for rendering exists in the render method
    • [X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • [X] If any new file was added I verified that:
    • [X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • [X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • [X] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • [X] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

gedu avatar Mar 26 '24 11:03 gedu

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

github-actions[bot] avatar Mar 26 '24 11:03 github-actions[bot]

I'm placing this on HOLD right now in order for QA to be done on the latest version of Onyx without more un-QAed PRs from being merged.

tgolen avatar Mar 28 '24 14:03 tgolen

I have read the CLA Document and I hereby sign the CLA

gedu avatar Apr 02 '24 05:04 gedu

gedu requested a review from https://github.com/orgs/Expensify/teams/pullerbear as a code owner 6 hours ago

Is this off HOLD?

cc @mountiny who is assigned to the linked issue

Julesssss avatar Apr 02 '24 11:04 Julesssss

It is not off hold until we merge the onyx bump and deploy it, but we can review in the meantime

mountiny avatar Apr 02 '24 20:04 mountiny

It is not off hold until we merge the onyx bump and deploy it, but we can review in the meantime

I think we've likely bumped Onyx by now?

Julesssss avatar Apr 29 '24 13:04 Julesssss

Conflicts fixed

gedu avatar Apr 30 '24 09:04 gedu

@mountiny can we keep reviewing this PR? Will be more improvements: https://callstack-hq.slack.com/archives/C05LX9D6E07/p1715178705054759

gedu avatar May 09 '24 10:05 gedu

@mountiny should I check something more?

gedu avatar May 10 '24 13:05 gedu

I have tested the web and the desktop doesn't find any issues, but I am still unable to run the iOS and Android with Onyx installed from the local path.

Simulator Screenshot - iPhone 15 Pro 17 2 - 2024-05-11 at 01 26 52

mollfpr avatar May 10 '24 18:05 mollfpr

@mollfpr thank you! that is helpful, I think we are good with web testing on this change for now and full testing would be done in the App bump.

@gedu what is your ETA for addressing the test failures?

mountiny avatar May 13 '24 10:05 mountiny

We have couples of failing test case https://github.com/Expensify/react-native-onyx/actions/runs/9034415824/job/24828280471?pr=520

mollfpr avatar May 13 '24 14:05 mollfpr

@mountiny I just pushed a fix

gedu avatar May 13 '24 16:05 gedu

The test is pass now!

Screenshot 2024-05-14 at 02 40 15

mollfpr avatar May 13 '24 19:05 mollfpr

Re running

mountiny avatar May 14 '24 04:05 mountiny

@mountiny is it all good?

gedu avatar May 15 '24 17:05 gedu

We are handling an onyx update in this PR https://github.com/Expensify/App/pull/42057 Lets wait for that to be in staging before merging this change

mountiny avatar May 20 '24 19:05 mountiny

Cool, will update, fix the comment and check if this makes sense

gedu avatar Jun 17 '24 13:06 gedu

All good from my side, this is still valid, just need to double check @chrispader comment about JSDoc

gedu avatar Jun 20 '24 09:06 gedu

Bumped for a review from @chrispader

mountiny avatar Jun 20 '24 12:06 mountiny

@chrispader updated JSDoc

gedu avatar Jun 21 '24 10:06 gedu

I think we're ready to go here, are we waiting on any final reviews?

Julesssss avatar Jun 28 '24 13:06 Julesssss

Any news? @mountiny @Julesssss

gedu avatar Jul 02 '24 09:07 gedu

Any news? @mountiny @Julesssss

Sorry, I missed this one. Can you please create an onyx bump PR and assign me please?

Julesssss avatar Jul 02 '24 10:07 Julesssss

Ah shit. Your first two commits weren't signed. Could you please raise another PR against this issue? Please tag us again for another review.

Julesssss avatar Jul 02 '24 10:07 Julesssss

Ohhh maan, ok on my way, sorry for that

gedu avatar Jul 02 '24 11:07 gedu

@Julesssss new PR created: https://github.com/Expensify/react-native-onyx/pull/565

gedu avatar Jul 02 '24 12:07 gedu