Page MenuHomePhabricator

Synchronize platform details with identity on app start
ClosedPublic

Authored by marcin on Jun 4 2024, 7:09 AM.
Tags
None
Referenced Files
F2897605: D12312.id40976.diff
Fri, Oct 4, 11:54 PM
F2897593: D12312.id41064.diff
Fri, Oct 4, 11:50 PM
F2897589: D12312.id40960.diff
Fri, Oct 4, 11:49 PM
Unknown Object (File)
Wed, Oct 2, 10:38 AM
Unknown Object (File)
Wed, Oct 2, 7:50 AM
Unknown Object (File)
Wed, Oct 2, 5:54 AM
Unknown Object (File)
Tue, Oct 1, 9:58 AM
Unknown Object (File)
Mon, Sep 30, 10:19 AM
Subscribers

Details

Summary

This differential ensures automatic platofrm details updates on both clients.

Test Plan

Repeat test plan for parent diff but but this time don't call anything from JS. It should be done automatically.

Diff Detail

Repository
rCOMM Comm
Branch
arcpatch-D12283
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin requested review of this revision.Jun 4 2024, 7:26 AM

Check against usingCommServicesAccessToken before trying to sync platform details

bartek requested changes to this revision.EditedJun 4 2024, 8:07 AM

I think we should make sure that this is being run only once, e.g. by introducing a hasRun ref, like in native/components/version-supported.react.js

By the way, do you think it makes sense to merge this with VersionSupportedChecker component? cc @varun

lib/components/platform-details-synchronizer.react.js
10 ↗(On Diff #40961)
This revision now requires changes to proceed.Jun 4 2024, 8:07 AM

By the way, do you think it makes sense to merge this with VersionSupportedChecker component?

I was thinking about this but I couldn't find any compelling arguments against neither of those solutions. What made me finally decide to use separate component was that we have two different components to check version support on native on web. However this logic is exactly the same for both platforms so putting it inside version support checkers would result in code duplication.

EDIT:
In order to both avoid duplication and additional component we could extract this logic into a hook and use the hook in version support checkers. cc @varun , @ashoat what do you think?

lib/components/platform-details-synchronizer.react.js
10 ↗(On Diff #40961)

MinVersionHandler on web (VersionSupportChecker equivalent) is also typed like this. I will patch the fix into this diff.

  1. Fix typing
  2. Use hasRun ref.
  3. Fix typing of MinVersionHandler
This revision is now accepted and ready to land.Jun 6 2024, 12:40 AM