Remove SetNameValuePair#16396
Conversation
|
Looks like you modified Instead, all new API commands should use API.js, and follow our guidelines for writing new API commands. Unsure if your change is okay? Drop a note in #expensify-open-source! |
|
@joelbettner Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Holding on a Web-E deploy, but can be reviewed. |
|
@techievivek maybe you would like to review this one as well since you got puller beared on https://github.com/Expensify/Web-Expensify/pull/36868 ? |
| * @param {String} [onyxKeyName] | ||
| */ | ||
| function set(name, value, onyxKeyName) { | ||
| DeprecatedAPI.SetNameValuePair({name, value: _.isObject(value) ? JSON.stringify(value) : value}); |
There was a problem hiding this comment.
Was this really ONLY used to remove the CONST.NVP.IS_FIRST_TIME_NEW_EXPENSIFY_USER nvp??
There was a problem hiding this comment.
at this point, yes. It had many usages that were gradually removed over the course of the API refactors.
| }, | ||
| NVP: { | ||
| IS_FIRST_TIME_NEW_EXPENSIFY_USER: 'isFirstTimeNewExpensifyUser', | ||
| BLOCKED_FROM_CONCIERGE: 'private_blockedFromConcierge', |
There was a problem hiding this comment.
Were/are these set with something other than NameValuePair.set?
There was a problem hiding this comment.
If you are asking about BLOCKED_FROM_CONCIERGE it's a private NVP that is read-only from the front end.
There was a problem hiding this comment.
I see that all other deprecated NVP constants keep remaining. Should we also keep IS_FIRST_TIME_NEW_EXPENSIFY_USER here? or remove entire NVP: {}?
Just asking for consistency.
There was a problem hiding this comment.
I'm not sure which ones you're referring to exactly. But several are still in use - we just do not set them directly via a single API command like we have done in the past.
There was a problem hiding this comment.
I am referring to this one:
Lines 545 to 560 in 4efde84
I confirmed that these are not used anywhere.
IS_FIRST_TIME_NEW_EXPENSIFY_USER was only the last one used here:
App/src/libs/actions/Welcome.js
Line 110 in 4efde84
There was a problem hiding this comment.
Oh! Nice, I will get rid of it then. Nice catch!
|
Tagging in @0xmiroslav to help with a review and testing. The linked API PR is still not made it to production. |
There was a problem hiding this comment.
- Close the app or refresh the page
- Verify the welcome action does not appear again
@marcaaron this is failing to me. Still shows even after logout and login. This doesn't happen on main
Edit: Sorry I forgot to enable "Use Staging Server".
Screen.Recording.2023-04-03.at.12.52.26.PM.mov
|
@marcaaron also please pull latest main |
|
Updated. |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Safarimsafari.mp4Desktopdesktop.movdesktop2.mov |
0xmiroslav
left a comment
There was a problem hiding this comment.
Looks good, tests well!
#16396 (comment) is just for cleanup, not a blocker.
|
This is off hold now @joelbettner can you please final review this? |
|
Sorry, I've been OOO. Reviewing now. |
|
Actually @rushatgabhane was not assigned for a review so I am merging this. Thanks everyone! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/marcaaron in version: 1.2.97-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.2.97-2 🚀
|



Details
This has to be tested together with https://github.com/Expensify/Web-Expensify/pull/36868 and we must wait until it is deployed to merge this PR
Fixed Issues (Related To)
https://github.com/Expensify/Expensify/issues/208281
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android