profile
viewpoint
Sergey Gavrilyuk gavrix Shopify Toronto, ON

gavrix/ifuga 31

iOS component for displaying a fullscreen image gallery

gavrix/Individ 12

ObjectiveC runtime extensions which allows particular objects to have individual method implementations (instead of class-defined)

gavrix/AnyAnimation 8

Type-safe animations abstraction in swift

gavrix/AFHTTPRequestOperationLogger 2

AFNetworking Extension for HTTP Request Logging

gavrix/AFNetworking 1

A delightful iOS and OS X networking framework

gavrix/ImageViewModel 1

swift-based Micro ViewModel for managing images loading and resizing. Alternative to SDWebImageView

gavrix/AFOAuth2Client 0

AFNetworking Extension for OAuth 2 Authentication

issue commentCovidShield/mobile

Exposed status is never checked properly

The fix should be: instead of storing timestamp of last check store the last period we got keys for successfully.

henrytao-me

comment created time in 4 days

create barnchCovidShield/mobile

branch : bugfix/background-scheduling

created branch time in 6 days

Pull request review commentCovidShield/mobile

Add broadcast receiver to Android for e2e test on 2 devices

 export class ExposureNotificationService {   }    async updateExposureStatus(): Promise<ExposureStatus> {-    if (this.exposureStatusUpdatePromise) return this.exposureStatusUpdatePromise;+    if (!TEST_MODE && this.exposureStatusUpdatePromise) return this.exposureStatusUpdatePromise;

This is to make updateExposureStatus transactional (so that when invoked twice in a row there won't be 2 competing processes to fetch and match keys). How does it make efficient to test? it makes it broken, basically.

henrytao-me

comment created time in 7 days

PR opened CovidShield/mobile

Reviewers
Fix crash on attempt to use translate in ExposureNotificationService

they way to stripped translate out of i18n made it unusable, attempt to call that translate later caused runtime crash (complaining about undefined this.onError.

+10 -10

0 comment

2 changed files

pr created time in 7 days

create barnchCovidShield/mobile

branch : bugfix/background-check-crashfix

created branch time in 7 days

pull request commentCovidShield/mobile

Patch Android for release

I believe only location-related code would have been enough

henrytao-me

comment created time in 9 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 660d2e3f2484105d5a3d086cc2d15587c48b23dc

Patch system-setting to not reference CLLocationManager

view details

Sergey Gavrilyuk

commit sha 8faa0175e9792fae96707d1c0192b23160d9e604

remove commented out code

view details

Sergey Gavrilyuk

commit sha 944cb32d0dbed0c4e1d91be4661285de85b03b6d

Merge pull request #164 from CovidShield/bugfix/exclude-location-api Patch system-setting to not reference CLLocationManager

view details

push time in 9 days

PR merged CovidShield/mobile

Reviewers
Patch system-setting to not reference CLLocationManager

system-setting library checks many different APIs for if it's enabled or not, including CLLocationManager. Although there is never an attempt to ENABLE location services, apple may statically check any references to CLLocationManager symbol and flag this activity.

Solved to excluding this API reference (and statically returning NO instead of [CLLocationManager isEnabled]. Since this requires modification of a library code, patched it using patch-package.

+80 -1

0 comment

3 changed files

gavrix

pr closed time in 9 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 8faa0175e9792fae96707d1c0192b23160d9e604

remove commented out code

view details

push time in 9 days

Pull request review commentCovidShield/mobile

Patch system-setting to not reference CLLocationManager

+diff --git a/node_modules/react-native-system-setting/ios/RTCSystemSetting.m b/node_modules/react-native-system-setting/ios/RTCSystemSetting.m+index c94aaad..e2f44a7 100644+--- a/node_modules/react-native-system-setting/ios/RTCSystemSetting.m++++ b/node_modules/react-native-system-setting/ios/RTCSystemSetting.m+@@ -8,7 +8,7 @@+ + #import "RTCSystemSetting.h"+ #import <SystemConfiguration/CaptiveNetwork.h>+-#import <CoreLocation/CoreLocation.h>++//#import <CoreLocation/CoreLocation.h>

since it's a patch it doesn't really matter. I can delete comments.

gavrix

comment created time in 9 days

Pull request review commentCovidShield/mobile

Patch system-setting to not reference CLLocationManager

+diff --git a/node_modules/react-native-system-setting/ios/RTCSystemSetting.m b/node_modules/react-native-system-setting/ios/RTCSystemSetting.m+index c94aaad..e2f44a7 100644+--- a/node_modules/react-native-system-setting/ios/RTCSystemSetting.m++++ b/node_modules/react-native-system-setting/ios/RTCSystemSetting.m+@@ -8,7 +8,7 @@+ + #import "RTCSystemSetting.h"+ #import <SystemConfiguration/CaptiveNetwork.h>+-#import <CoreLocation/CoreLocation.h>++//#import <CoreLocation/CoreLocation.h>+ #import <CoreTelephony/CTTelephonyNetworkInfo.h>+ #import <ifaddrs.h>+ #import <net/if.h>+@@ -122,7 +122,8 @@ +(BOOL)requiresMainQueueSetup{+ }+ + RCT_EXPORT_METHOD(isLocationEnabled:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject){+-    resolve([NSNumber numberWithBool:[CLLocationManager locationServicesEnabled]]);++    resolve(@NO);++//    resolve([NSNumber numberWithBool:[CLLocationManager locationServicesEnabled]]);+ }+ + RCT_EXPORT_METHOD(switchBluetooth){

This is library code change in question.

gavrix

comment created time in 9 days

PR opened CovidShield/mobile

Reviewers
Patch system-setting to not reference CLLocationManager

system-setting library checks many different APIs for if it's enabled or not, including CLLocationManager. Although there is never an attempt to ENABLE location services, apple may statically check any references to CLLocationManager symbol and flag this activity.

Solved to excluding this API reference (and statically returning NO instead of [CLLocationManager isEnabled]. Since this requires modification of a library code, patched it using patch-package.

+82 -1

0 comment

3 changed files

pr created time in 9 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 660d2e3f2484105d5a3d086cc2d15587c48b23dc

Patch system-setting to not reference CLLocationManager

view details

push time in 9 days

create barnchCovidShield/mobile

branch : bugfix/exclude-location-api

created branch time in 9 days

delete branch CovidShield/mobile

delete branch : bugfix/unzip-files-ios

delete time in 11 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 94848cdb08221404446cd72a805a046c79757b26

unzip downloaded files before feeding into EN on iOS

view details

Sergey Gavrilyuk

commit sha 5b6f572abb366e3d04c3a0b6cb3701af01c7834a

some bugs fixed

view details

Sergey Gavrilyuk

commit sha c27f9686f5d768b2089b38021500a509da7920b6

Fix tests

view details

Sergey Gavrilyuk

commit sha e9b70bd0eec370fb0743351754e282e3c6732dc0

Fix typo

view details

Sergey Gavrilyuk

commit sha 9538341644c2930859837f4aa91feadb84d22708

Don't use full exposure information

view details

Sergey Gavrilyuk

commit sha 92bde1f15c25b27ba0e0481c15f970b85f864458

Report download error to console

view details

Sergey Gavrilyuk

commit sha 5bfb3d8a821800a775c67bda0eefde7cbb40fb6d

Better handling of multiple files urls provided to detectExposure

view details

Sergey Gavrilyuk

commit sha b98844f6aebb57a5105c3c3e033f808dd6fe04be

Merge pull request #157 from CovidShield/bugfix/unzip-files-ios Refactor: add unzipping downloaded key data files but only for iOS.

view details

push time in 11 days

PR merged CovidShield/mobile

Refactor: add unzipping downloaded key data files but only for iOS.

I added adapter around ExposureNotification bridge so that it adds additional platform-specific behaviour (and unzipping downloaded files is such a behaviour on iOS)

+171 -79

4 comments

9 changed files

gavrix

pr closed time in 11 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha f4d8c909e4b7751939c5587de108c605d6d1904b

Fix exposure configuration serialization for iOS

view details

Sergey Gavrilyuk

commit sha ed6e6b51060eb77b34cee8997f8b964c7917d88a

Merge pull request #158 from CovidShield/bugfix/ios-serialize-configuration-fix Fix exposure configuration serialization for iOS

view details

Aaron Olson

commit sha 27fa763003ab79366f869633f1e113bbacb5b009

Remove potential location indicator

view details

Aaron Olson

commit sha de21a7a66dd0ef37b3a89e058bd7ed0ba92a7aa2

Remove tvOS build files

view details

Aaron Olson

commit sha 6fe2c2bfe54adfbe8aa229ed34b666aaf2f4426d

Remove stale references

view details

Aaron Olson

commit sha 71731ed8d8f482ba01c8b4fafd5213f03f6acaf3

Merge pull request #162 from CovidShield/remove-cruft Remove cruft

view details

Sergey Gavrilyuk

commit sha 94848cdb08221404446cd72a805a046c79757b26

unzip downloaded files before feeding into EN on iOS

view details

Sergey Gavrilyuk

commit sha 5b6f572abb366e3d04c3a0b6cb3701af01c7834a

some bugs fixed

view details

Sergey Gavrilyuk

commit sha c27f9686f5d768b2089b38021500a509da7920b6

Fix tests

view details

Sergey Gavrilyuk

commit sha e9b70bd0eec370fb0743351754e282e3c6732dc0

Fix typo

view details

Sergey Gavrilyuk

commit sha 9538341644c2930859837f4aa91feadb84d22708

Don't use full exposure information

view details

Sergey Gavrilyuk

commit sha 92bde1f15c25b27ba0e0481c15f970b85f864458

Report download error to console

view details

Sergey Gavrilyuk

commit sha 5bfb3d8a821800a775c67bda0eefde7cbb40fb6d

Better handling of multiple files urls provided to detectExposure

view details

push time in 11 days

pull request commentCovidShield/mobile

Remove cruft

Double checked — permission library is only pulling in Notification-related stuff, no location APIs referenced. Should be good.

honkfestival

comment created time in 11 days

pull request commentCovidShield/mobile

Remove cruft

I think we still need project.pbxproj Also, I'm not 100% sure that removing location description string from plist is enough 🤔 we may also need to check if we link CoreLocation library.

honkfestival

comment created time in 11 days

pull request commentCovidShield/mobile

Refactor: add unzipping downloaded key data files but only for iOS.

@henrytao-me Screen Shot 2020-06-25 at 11 59 46 AM

gavrix

comment created time in 11 days

delete branch CovidShield/mobile

delete branch : bugfix/ios-serialize-configuration-fix

delete time in 11 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha f4d8c909e4b7751939c5587de108c605d6d1904b

Fix exposure configuration serialization for iOS

view details

Sergey Gavrilyuk

commit sha ed6e6b51060eb77b34cee8997f8b964c7917d88a

Merge pull request #158 from CovidShield/bugfix/ios-serialize-configuration-fix Fix exposure configuration serialization for iOS

view details

push time in 11 days

PR merged CovidShield/mobile

Fix exposure configuration serialization for iOS

Turned out EN framework on iOS doesn't like configuration with NSNumbers in array wrapping double values vs int values. So picky.

Fixed by re-packing NSNumbers with statically typed int values.

+48 -39

0 comment

1 changed file

gavrix

pr closed time in 11 days

PR opened CovidShield/mobile

Reviewers
Fix exposure configuration serialization for iOS

Turned out EN framework on iOS doesn't like configuration with NSNumbers in array wrapping double values vs int values. So picky.

Fixed by re-packing NSNumbers with statically typed int values.

+48 -39

0 comment

1 changed file

pr created time in 11 days

create barnchCovidShield/mobile

branch : bugfix/ios-serialize-configuration-fix

created branch time in 11 days

pull request commentCovidShield/mobile

Refactor: add unzipping downloaded key data files but only for iOS.

@honkfestival addressed all your comments, I believe.

gavrix

comment created time in 12 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha d2e5bbbb158c56aa9e0fa396ec701035cd783a79

Report download error to console

view details

Sergey Gavrilyuk

commit sha f12a76dc65ba8e6a1f2ee5ca7e65b8dcd91f140f

Better handling of multiple files urls provided to detectExposure

view details

push time in 12 days

pull request commentCovidShield/mobile

Refactor: add unzipping downloaded key data files but only for iOS.

@henrytao-me this will affect android I believe, please take a look when you have a moment. I won't merge until you give a 👍

gavrix

comment created time in 12 days

Pull request review commentCovidShield/mobile

Refactor: add unzipping downloaded key data files but only for iOS.

 export class ExposureNotificationService {       if (done) break;       if (!keysFilesUrl) continue;       try {-        const summary = await this.exposureNotification.detectExposure(exposureConfiguration, [`${keysFilesUrl}`]);+        const summary = await this.exposureNotification.detectExposure(exposureConfiguration, [keysFilesUrl]);+         if (summary.matchedKeyCount > 0) {-          const exposures = await this.exposureNotification.getExposureInformation(summary);+          const exposures = await this.exposureNotification.getExposureInformation(summary, 'User explanation');

I took that out.

gavrix

comment created time in 12 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha e28cbcfbd56aaaa2498876f514bdc0b952f0b1ce

Fix typo

view details

Sergey Gavrilyuk

commit sha 5a70690dc975730798f55a2938d543d682b7e70c

Don't use full exposure information

view details

push time in 12 days

Pull request review commentCovidShield/mobile

Refactor: add unzipping downloaded key data files but only for iOS.

 export class ExposureNotificationService {     const runningDate = new Date();      const lastCheckPeriod = periodSinceEpoch(lastFetchDate || addDays(runningDate, -14), hoursPerPeriod);-    let runningPeriod = periodSinceEpoch(runningDate, hoursPerPeriod);+    let runningPeriod = periodSinceEpoch(runningDate, hoursPerPeriod) - 1;      while (runningPeriod > lastCheckPeriod) {-      yield await this.backendInterface.retrieveDiagnosisKeys(runningPeriod).catch(() => null);+      try {+        yield await this.backendInterface.retrieveDiagnosisKeys(runningPeriod);+        // eslint-disable-next-line no-empty+      } catch {}

Basically I just want to skip entries which generated error, but I want to keep going. This happens inside generator, it looks like for..in loop but the result is actually generator with .next and I want to not emit any errors. We can add logs, I guess, but in prod it won't have any meaningful effect

gavrix

comment created time in 12 days

Pull request review commentCovidShield/mobile

Refactor: add unzipping downloaded key data files but only for iOS.

+import {unzip} from 'react-native-zip-archive';++import {ExposureNotification, ExposureConfiguration, ExposureSummary} from './ExposureNotificationAPI';++export default function ExposureNotificationAdapter(+  exposureNotificationAPI: ExposureNotification,+): ExposureNotification {+  return {+    ...exposureNotificationAPI,+    detectExposure: async (+      configuration: ExposureConfiguration,+      diagnosisKeysURLs: string[],+    ): Promise<ExposureSummary> => {+      if (diagnosisKeysURLs.length === 0) {+        throw new Error('Attempt to call detectExposure with empty list if downloaded files');+      }+      const keysZipUrl = diagnosisKeysURLs[0];

As it is now, the rest will be ignored. I guess, the best thing we can do is to change type signature, to take string instead of string[]. Native APIs concern me a little though, both iOS and Android leave the room for interpretation. iOS takes array of at least to files (bin and sig) whereas android needs just one file (but is typed such that it can take several files at once).

I'm not sure whats the best way to handle this

gavrix

comment created time in 12 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 16569f22a45c39f7104036d15fdf3f9a3fd6f222

Fix tests

view details

push time in 12 days

PR opened CovidShield/mobile

Reviewers
Refactor: add unzipping downloaded key data files but only for iOS.

I added adapter around ExposureNotification bridge so that it adds additional platform-specific behaviour (and unzipping downloaded files is such a behaviour on iOS)

+178 -78

0 comment

9 changed files

pr created time in 12 days

create barnchCovidShield/mobile

branch : bugfix/unzip-files-ios

created branch time in 12 days

delete branch CovidShield/mobile

delete branch : bugfix/ios-bridge-debug

delete time in 12 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha ab363e35339b0b8dd6d67c3a828ea1d9314aa537

Debug and fix some issues of iOS bridge

view details

Sergey Gavrilyuk

commit sha bc88afc9c6162c3a051cc5798f10c9066c9a8f6e

Merge pull request #155 from CovidShield/bugfix/ios-bridge-debug Debug and test several issues in iOS bridge.

view details

push time in 12 days

delete branch CovidShield/mobile

delete branch : feature/ios-entitlements-file

delete time in 12 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha e18805f6b43dbcc30b4edca14bc8954d267f72cb

Add required entitlements for testing EN on iOS

view details

Sergey Gavrilyuk

commit sha 32dc20b005df22eaae7eef8a8c966f0d9b157e3f

Merge pull request #156 from CovidShield/feature/ios-entitlements-file Add required entitlements for testing EN on iOS

view details

push time in 12 days

push eventCovidShield/mobile

Jordan Good

commit sha a6780a8f7aad8f43a4e69665593c169e276d6327

git ignore translations file and run on commans instead

view details

Kyle Peatt

commit sha dbb32aa3fe3b888607695cb06d9a5ba583456720

Remove homescreen animations

view details

Henry Tao

commit sha 59d73ad1dfbc7800aeef46761703cc05d46516cb

Fix default locale Fix systemLocale Fix systemLocale (2)

view details

Henry Tao

commit sha c17ee2e5cd5d2d3ac7aae46e2a4818db1ac2d0ab

Fix keyboard blocks button onclick

view details

Jordan Good

commit sha d55032f2be22a36fadd524ed2114da4d7f06b7f4

git ignore translations file and run on commans instead

view details

Henry Tao

commit sha dabbd0d3135da481b51a3878398fde95539d4ea2

Fix text alignment

view details

Sergey Gavrilyuk

commit sha 9af3506941522e692d3e31fe7a571615b8626e10

Refactor bottom sheet to support dynamic content

view details

Sergey Gavrilyuk

commit sha 2792e13c31eadddf5451b14284455f788c66fee2

Fix tsc error

view details

Sergey Gavrilyuk

commit sha 530fb4c79547b537dc159e21212a956ec2fa1d4f

Fix flashing issue inside bottom sheet content

view details

Sergey Gavrilyuk

commit sha 190c7145a1ef9107e7cd7fb2bc13675fab6b02db

Merge pull request #113 from CovidShield/remove-homescreen-anims Remove homescreen animations

view details

Henry Tao

commit sha cc6506d8924e195defe82d2ac38366651d360ccf

Merge pull request #151 from CovidShield/issue/112/text-alignment Fix text alignment

view details

Henry Tao

commit sha c32151761d17bae92aee088821a02dbb7cd66c5e

Merge pull request #150 from CovidShield/issue/141/keyboard-on-submit Fix keyboard blocks button onClick

view details

Henry Tao

commit sha e4dc663721fb66c5e4b4495fd610e6d54e584ed5

Merge pull request #148 from CovidShield/issue/111/device-locale Use system locale as default locale

view details

Jordan Good

commit sha 77f596e538b481b3671d4b14c44f735990bd5366

Merge branch 'translations-build-step' of https://github.com/CovidShield/mobile into translations-build-step

view details

Jordan Good

commit sha 4b02a627aefbf1dd9067cf24efcec090e6f848e1

add to start command

view details

Jordan Good

commit sha daa967ea8eae80a889553441a61bbbe293391123

Merge pull request #97 from CovidShield/translations-build-step git ignore translations file and run on commands instead

view details

Jordan Good

commit sha 87486ce846212db69e47908ee06c874bc4dcac48

Fix ci missing translations

view details

Sergey Gavrilyuk

commit sha 2d76e512fa86902085be55deb793ec7d7335a418

Merge pull request #152 from CovidShield/bugfix/bottom-sheet-content Refactor bottom sheet to support dynamic content

view details

Sergey Gavrilyuk

commit sha edce8dd8e83684b3c22e27c330fcc600ea8444b3

Merge pull request #153 from CovidShield/bugfix/system-unknown-status Fix SystemStatus indication when EN framework cannot start

view details

Sergey Gavrilyuk

commit sha ab363e35339b0b8dd6d67c3a828ea1d9314aa537

Debug and fix some issues of iOS bridge

view details

push time in 12 days

create barnchCovidShield/mobile

branch : feature/ios-entitlements-file

created branch time in 12 days

delete branch CovidShield/mobile

delete branch : bugfix/system-unknown-status

delete time in 12 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 1a4035063d4e9d26bebfb958e7e447d28dbe0046

Use explicit Undefined status for ExposureNotoficationService initialization

view details

Sergey Gavrilyuk

commit sha edce8dd8e83684b3c22e27c330fcc600ea8444b3

Merge pull request #153 from CovidShield/bugfix/system-unknown-status Fix SystemStatus indication when EN framework cannot start

view details

push time in 12 days

PR merged CovidShield/mobile

Reviewers
Fix SystemStatus indication when EN framework cannot start

This is relevant for simulator mostly, but also when app is run on devices without entitlements or provisioning.

The way it's done is by using explicit Undefined status to differentiate between 'unknown' status (reported by EN when it can't start for some reason) and between initial system status before framework returned anything.

+7 -4

0 comment

3 changed files

gavrix

pr closed time in 12 days

Pull request review commentCovidShield/mobile

Debug and test several issues in iOS bridge.

 export enum RiskLevel { }  export enum Status {+  // .Undefined is made up status to indicate js client that status hasn't been received from EN framework+  Undefined = 'undefined',

yep, I'll need to rebase once #153 is merged.

gavrix

comment created time in 12 days

Pull request review commentCovidShield/mobile

Debug and test several issues in iOS bridge.

 #import <React/RCTConvert.h>  -@interface ENManagerMock : ENManager--@end---@implementation ENManagerMock--- (void)getDiagnosisKeysWithCompletionHandler:(ENGetDiagnosisKeysHandler)completionHandler {-  ENTemporaryExposureKey *key = ENTemporaryExposureKey.new;-  key.keyData = [@"1234567812345678" dataUsingEncoding:NSUTF8StringEncoding];-  key.rollingStartNumber = 123;-  key.transmissionRiskLevel = 5;-  -  NSArray *keys = @[key];-  completionHandler(keys, nil);-}--@end---typedef ENManagerMock ENManagerImplementation ;

yeah but mock data I tried to come up with doesn't make sense and causes errors when attempt to use by both framework AND backend.

gavrix

comment created time in 12 days

create barnchCovidShield/mobile

branch : bugfix/ios-bridge-debug

created branch time in 12 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 9af3506941522e692d3e31fe7a571615b8626e10

Refactor bottom sheet to support dynamic content

view details

Sergey Gavrilyuk

commit sha 2792e13c31eadddf5451b14284455f788c66fee2

Fix tsc error

view details

Sergey Gavrilyuk

commit sha 530fb4c79547b537dc159e21212a956ec2fa1d4f

Fix flashing issue inside bottom sheet content

view details

Sergey Gavrilyuk

commit sha 2d76e512fa86902085be55deb793ec7d7335a418

Merge pull request #152 from CovidShield/bugfix/bottom-sheet-content Refactor bottom sheet to support dynamic content

view details

push time in 12 days

PR merged CovidShield/mobile

Refactor bottom sheet to support dynamic content

BottomSheet we use take renderContent function, it's used for rendering content on demand. We used to give it statically rendered ReactElement, and when that element needs to change we would re-render the whole bottom sheet, which isn'r right: bottom sheet has animation and transitions side effects which clash with re-rendering. Instead, I give ComponentType to which will be used by bottom sheet to render content. Since it's component with no props, whenever it needs to update itself (based on system status change) it will only re-render itself, and bottom sheet structure will remain intact.

+35 -34

4 comments

3 changed files

gavrix

pr closed time in 12 days

PR opened CovidShield/mobile

Reviewers
Fix SystemStatus indication when EN framework cannot start

This is relevant for simulator mostly, but also when app is run on devices without entitlements or provisioning.

The way it's done is by using explicit Undefined status to differentiate between 'unknown' status (reported by EN when it can't start for some reason) and between initial system status before framework returned anything.

+7 -4

0 comment

3 changed files

pr created time in 12 days

create barnchCovidShield/mobile

branch : bugfix/system-unknown-status

created branch time in 12 days

pull request commentCovidShield/mobile

Refactor bottom sheet to support dynamic content

I think this empty state issue is because unknown system status is used for different situations. It's not technically concern of this PR, I'll create a separate PR.

gavrix

comment created time in 12 days

pull request commentCovidShield/mobile

Refactor bottom sheet to support dynamic content

@henrytao-me this is ExposureNotificationService broken 🤦‍♂️

gavrix

comment created time in 12 days

delete branch CovidShield/mobile

delete branch : remove-homescreen-anims

delete time in 12 days

push eventCovidShield/mobile

Kyle Peatt

commit sha dbb32aa3fe3b888607695cb06d9a5ba583456720

Remove homescreen animations

view details

Sergey Gavrilyuk

commit sha 190c7145a1ef9107e7cd7fb2bc13675fab6b02db

Merge pull request #113 from CovidShield/remove-homescreen-anims Remove homescreen animations

view details

push time in 12 days

PR merged CovidShield/mobile

Reviewers
Remove homescreen animations

This PR removes the homescreen animations from the app. The animations were being misinterpreted to mean that the app was using location data. Ideally, we can replace these with icons or something else but in the meantime removing them is the best course of action.

+4 -7

0 comment

7 changed files

kpeatt

pr closed time in 12 days

pull request commentCovidShield/mobile

Refactor bottom sheet to support dynamic content

I also included fix to bottom sheet content re-rendering causing flashing. RPReplay_Final1592972429

gavrix

comment created time in 13 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 530fb4c79547b537dc159e21212a956ec2fa1d4f

Fix flashing issue inside bottom sheet content

view details

push time in 13 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 2792e13c31eadddf5451b14284455f788c66fee2

Fix tsc error

view details

push time in 13 days

PR opened CovidShield/mobile

Reviewers
Refactor bottom sheet to support dynamic content

BottomSheet we use take renderContent function, it's used for rendering content on demand. We used to give it statically rendered ReactElement, and when that element needs to change we would re-render the whole bottom sheet, which isn'r right: bottom sheet has animation and transitions side effects which clash with re-rendering. Instead, I give ComponentType to which will be used by bottom sheet to render content. Since it's component with no props, whenever it needs to update itself (based on system status change) it will only re-render itself, and bottom sheet structure will remain intact.

+8 -11

0 comment

2 changed files

pr created time in 13 days

create barnchCovidShield/mobile

branch : bugfix/bottom-sheet-content

created branch time in 13 days

Pull request review commentCovidShield/mobile

Fix system status initial state

 const Content = () => {         case SystemStatus.BluetoothOff:           return <BluetoothDisabledView />;         case SystemStatus.Active:-        case SystemStatus.Unknown:           return <NoExposureView />;+        default:+          return null;       }

empty bottom sheet contents is a separate problem not related to this.

henrytao-me

comment created time in 13 days

Pull request review commentCovidShield/mobile

Fix system status initial state

 const Content = () => {         case SystemStatus.BluetoothOff:           return <BluetoothDisabledView />;         case SystemStatus.Active:-        case SystemStatus.Unknown:           return <NoExposureView />;+        default:+          return null;       }

this content is only rendering text inside home, not overlay. That content for unknown state is, well, unknown. if not rendering nothing, we could literally show "Status known" or show activity indicator.

henrytao-me

comment created time in 13 days

Pull request review commentCovidShield/mobile

Fix system status initial state

 export const HomeScreen = () => {         collapsedContent={collapsedContent}         extraContent={showNotificationWarning}       >-        <OverlayView-          status={systemStatus}-          notificationWarning={showNotificationWarning}-          turnNotificationsOn={turnNotificationsOn}-          maxWidth={maxWidth}-        />+        <BottomSheetContent />

this is not exactly what I meant. Lets merge it and I follow up in separate PR.

henrytao-me

comment created time in 13 days

PR opened CovidShield/mobile

Reviewers
Check if initial status is correct

Per https://github.com/react-native-community/react-native-netinfo/issues/295 initial network status is wrongly false which causes screen flickering:

RPReplay_Final1592884789

+1 -1

0 comment

1 changed file

pr created time in 14 days

create barnchCovidShield/mobile

branch : bugfix/initial-network-status

created branch time in 14 days

PR opened CovidShield/mobile

Reviewers
Designated initial exposure system status

Should be 'unknown'.

+1 -1

0 comment

1 changed file

pr created time in 14 days

create barnchCovidShield/mobile

branch : bugfix/initial-system-status

created branch time in 14 days

Pull request review commentCovidShield/mobile

Fix flashing issue for Exposure Notification System Status and Bluetooth flow

 AppRegistry.registerComponent(appName, () => App); BackgroundScheduler.registerAndroidHeadlessPeriodicTask(async () => {   const backendService = new BackendService(RETRIEVE_URL, SUBMIT_URL, HMAC_KEY, REGION);   const i18n = await getBackgroundI18n();-  const exposureNotificationService = new ExposureNotificationService(-    backendService,-    i18n.translate,-    AsyncStorage,-    SecureStorage,-    ExposureNotification,+  const exposureNotificationService = await new Promise<ExposureNotificationService>(+    resolve =>+      new ExposureNotificationService(+        backendService,+        i18n.translate,+        AsyncStorage,+        SecureStorage,+        ExposureNotification,+        resolve,+      ),

This whole thing seems super awkward. Can you explain what's going on?

henrytao-me

comment created time in 14 days

Pull request review commentCovidShield/mobile

Show EN dialog at the end of onboarding flow

 export class ExposureNotificationService {     this.backendInterface = backendInterface;     this.storage = storage;     this.secureStorage = secureStorage;+    // initialize+    this.updateSystemStatus();   }    async start(): Promise<void> {-    this.started = true;

removing this makes this method not atomically stable. It would be possible to call it twice and it would perform side effects twice. I used this flag specifically to prevent that.

henrytao-me

comment created time in 21 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 588604c40eb505a0fb3f681502853be934c3da38

Fix typo leading to crash

view details

push time in 24 days

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 9b9cc891d13d5804ba942d9110a794155cbc4356

Fix accidentral code duplication

view details

push time in a month

Pull request review commentCovidShield/mobile

A set of updates to conform to backend protocol

 - (void)invalidate   if (configDict[@"transmissionRiskWeight"]) {     configuration.transmissionRiskWeight = [configDict[@"transmissionRiskWeight"] doubleValue];   }+  return configuration;+}++RCT_REMAP_METHOD(detectExposure, detectExposureWithConfiguration:(NSDictionary *)configDict diagnosisKeysURLs:(NSArray*)urls withResolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)+{+//  ENExposureConfiguration *configuration = [self configurationFromDictionary:configDict];+  ENExposureConfiguration *configuration = [ENExposureConfiguration new];++  configuration.minimumRiskScore = 0;+  configuration.attenuationLevelValues = @[@1, @2, @3, @4, @5, @6, @7, @8];+  configuration.daysSinceLastExposureLevelValues = @[@1, @2, @3, @4, @5, @6, @7, @8];+  configuration.durationLevelValues = @[@1, @2, @3, @4, @5, @6, @7, @8];+  configuration.transmissionRiskLevelValues = @[@1, @2, @3, @4, @5, @6, @7, @8];++  NSMutableArray *arr = [NSMutableArray new];+  for (NSString *urlStr in urls) {+    [arr addObject: [NSURL fileURLWithPath:urlStr]];+  }++  [self.enManager detectExposuresWithConfiguration:configuration+                                  diagnosisKeyURLs:arr+                                 completionHandler:^(ENExposureDetectionSummary * _Nullable summary, NSError * _Nullable error) {+    if (error) {+      reject([NSString stringWithFormat:@"%ld", (long)error.code], error.localizedDescription ,error);+      return;+    }+    NSNumber *idx = @(self.reportedSummaries.count);+    [self.reportedSummaries addObject:summary];+    resolve(@{+      @"daysSinceLastExposure": @(summary.daysSinceLastExposure),+      @"matchedKeyCount": @(summary.matchedKeyCount),+      @"maximumRiskScore": @(summary.maximumRiskScore),+      @"_summaryIdx": idx+    });++  }];+} +RCT_REMAP_METHOD(detectExposure, detectExposureWithConfiguration:(NSDictionary *)configDict diagnosisKeysURLs:(NSArray*)urls withResolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)

no idea how this happened. it's exact duplicate 🤦‍♂️

gavrix

comment created time in a month

Pull request review commentCovidShield/mobile

A set of updates to conform to backend protocol

 export class ExposureNotificationService {     await this.recordKeySubmission();   } -  private async *keysSinceLastFetch(lastFetchDate?: Date): AsyncGenerator<string> {+  private async *keysSinceLastFetch(lastFetchDate?: Date): AsyncGenerator<string | null> {     const runningDate = new Date(); -    const lastCheckPeriod = periodSinceEpoch(lastFetchDate || addDays(runningDate, -14));-    let runningPeriod = periodSinceEpoch(runningDate);+    const lastCheckPeriod = periodSinceEpoch(lastFetchDate || addDays(runningDate, -14), hoursPerPeriod);+    let runningPeriod = periodSinceEpoch(runningDate, hoursPerPeriod) - hoursPerPeriod;      while (runningPeriod > lastCheckPeriod) {-      yield await this.backendInterface.retrieveDiagnosisKeys(runningPeriod);-      runningPeriod -= 2;+      const zipFile = await this.backendInterface.retrieveDiagnosisKeys(runningPeriod);+      if (zipFile) {+        const components = zipFile.split('/');+        components.pop();+        components.push('keys-export');+        const targetDir = components.join('/');++        try {+          const unzipResult = await unzip(zipFile, targetDir);+          yield unzipResult;+        } catch (err) {

this appears to be issue with decoding ExposureConfiguration from the server. I pushed change where it uses hardcoded configuration. it would still return an error from EN framework, what that error is I'm trying to figure out with apple engineer as we speak.

sorry it takes this many iterations, I'm testing it in other branch and the copying changes over here. It's a very error prone process

gavrix

comment created time in a month

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 3bab6f945e5fde9e56ff7d6cfbe4ef84b37ee29f

Attempt to use hard coded configuration

view details

push time in a month

Pull request review commentCovidShield/mobile

A set of updates to conform to backend protocol

 export class ExposureNotificationService {     await this.recordKeySubmission();   } -  private async *keysSinceLastFetch(lastFetchDate?: Date): AsyncGenerator<string> {+  private async *keysSinceLastFetch(lastFetchDate?: Date): AsyncGenerator<string | null> {     const runningDate = new Date(); -    const lastCheckPeriod = periodSinceEpoch(lastFetchDate || addDays(runningDate, -14));-    let runningPeriod = periodSinceEpoch(runningDate);+    const lastCheckPeriod = periodSinceEpoch(lastFetchDate || addDays(runningDate, -14), hoursPerPeriod);+    let runningPeriod = periodSinceEpoch(runningDate, hoursPerPeriod) - hoursPerPeriod;      while (runningPeriod > lastCheckPeriod) {-      yield await this.backendInterface.retrieveDiagnosisKeys(runningPeriod);-      runningPeriod -= 2;+      const zipFile = await this.backendInterface.retrieveDiagnosisKeys(runningPeriod);+      if (zipFile) {+        const components = zipFile.split('/');+        components.pop();+        components.push('keys-export');+        const targetDir = components.join('/');++        try {+          const unzipResult = await unzip(zipFile, targetDir);+          yield unzipResult;+        } catch (err) {

I updated PR

gavrix

comment created time in a month

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha dda0a618e089c3ed2fec7eec58c49482d2da9caf

Update and fix tests

view details

push time in a month

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 0c6736fdb34a7b3ca67f890ee97752cd46ee7098

fix typo

view details

Sergey Gavrilyuk

commit sha aee5ec7fac0067f6e376657f456512f473ba44b8

remove logs and extract REGION

view details

Sergey Gavrilyuk

commit sha 1f01423c303f862f8d06ba11001114289073b6d9

Fix unzipping error

view details

push time in a month

Pull request review commentCovidShield/mobile

A set of updates to conform to backend protocol

 export class ExposureNotificationService {     await this.recordKeySubmission();   } -  private async *keysSinceLastFetch(lastFetchDate?: Date): AsyncGenerator<string> {+  private async *keysSinceLastFetch(lastFetchDate?: Date): AsyncGenerator<string | null> {     const runningDate = new Date(); -    const lastCheckPeriod = periodSinceEpoch(lastFetchDate || addDays(runningDate, -14));-    let runningPeriod = periodSinceEpoch(runningDate);+    const lastCheckPeriod = periodSinceEpoch(lastFetchDate || addDays(runningDate, -14), hoursPerPeriod);+    let runningPeriod = periodSinceEpoch(runningDate, hoursPerPeriod) - hoursPerPeriod;      while (runningPeriod > lastCheckPeriod) {-      yield await this.backendInterface.retrieveDiagnosisKeys(runningPeriod);-      runningPeriod -= 2;+      const zipFile = await this.backendInterface.retrieveDiagnosisKeys(runningPeriod);+      if (zipFile) {+        const components = zipFile.split('/');+        components.pop();+        components.push('keys-export');+        const targetDir = components.join('/');++        try {+          const unzipResult = await unzip(zipFile, targetDir);+          yield unzipResult;+        } catch (err) {

No, the reason is different, I think I know what’s wrong. I’ll adjust, thanks for double checking that!

gavrix

comment created time in a month

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha 270921208aad0ced73af819a7b4addbb0d28aba8

add mock for unzip

view details

push time in a month

PR opened CovidShield/mobile

Reviewers
A set of updates to conform to backend protocol

This includes several changes discovered while end-to-end testing:

  • period is now 6 hours.
  • keys are downloaded from the server in the form of zip archive, so we need to unzip them first before feeding into EN framework
+75 -16

0 comment

6 changed files

pr created time in a month

create barnchCovidShield/mobile

branch : debug-fix-up

created branch time in a month

delete branch CovidShield/mobile

delete branch : a11y/disabled-button-state

delete time in a month

PR merged CovidShield/mobile

Indicate disabled button state in voice-over mode

fixes https://github.com/CovidShield/mobile/issues/58

+8 -2

0 comment

1 changed file

gavrix

pr closed time in a month

push eventCovidShield/mobile

Sergey Gavrilyuk

commit sha cde47d05c6157d7c88532a340b292fef9f22e698

use a11y state for button to indicate disabled state

view details

Sergey Gavrilyuk

commit sha 7a826f8a21cf94f44598ac759de80719bbedb550

Merge pull request #96 from CovidShield/a11y/disabled-button-state Indicate disabled button state in voice-over mode

view details

push time in a month

issue closedCovidShield/mobile

[Data Sharing] Disabled control does not convey state

Issue summary

The submit Button control is in a disabled state which is visually conveyed only. Screen readers do not convey the disabled state. This may cause a poor or confusing user experience for screen reader users when someone attempts to interact with a "disabled" control.

<details> <summary>Screenshots</summary>

Screen Shot 2020-05-28 at 9 43 24 AM

</details>

Current code

TSX

// Button.tsx

if (Platform.OS === 'android') {
  return (
    <Ripple
      rippleContainerBorderRadius={4}
      rippleDuration={500}
      onPress={onPressHandler}
    >
      {content}
    </Ripple>
  );
}
return (
  <TouchableOpacity
    onPress={onPressHandler}
    style={styles.stretch}
    disabled={disabled}
  >
    {content}
  </TouchableOpacity>
);

Steps to reproduce

  1. Load the app in the iOS simulator.
  2. Open the Sheet view.
  3. Activate the "Share code" control
  4. Enable VoiceOver screen reader on macOS
  5. Use the Virtual Cursor to navigate to the submit Button control

Behavior

Expected

  • Controls in a disabled state to convey this information both visually and audibly

Actual

  • Disabled state is not conveyed audibly.

Recommendation

  1. Create a new buttonState object to house the current disabled state.
  2. Add the accessibilityState prop to both Ripple and TouchableOpacity components, setting its value to the new buttonState object.

recommended code

TSX

// Button.tsx
const buttonState = {disabled: disabled};

// …

if (Platform.OS === 'android') {
  return (
    <Ripple
      rippleContainerBorderRadius={4}
      rippleDuration={500}
      onPress={onPressHandler}
      accessibilityState={buttonState}
    >
      {content}
    </Ripple>
  );
}
return (
  <TouchableOpacity
    onPress={onPressHandler}
    style={styles.stretch}
    disabled={disabled}
    accessibilityState={buttonState}
  >
    {content}
  </TouchableOpacity>
);

Specifications

  • Component: CovidShield [Data Sharing]
  • WCAG Principle: Perceivable
  • WCAG SC: 1.3.1 Info and Relationships
  • Severity: High
  • Effort: Low

closed time in a month

svinkle

Pull request review commentCovidShield/mobile

Indicate disabled button state in voice-over mode

 export const Button = ({     </Box>   ); +  const accessibilityProps = {+    accessibilityRole: 'button' as 'button',

yep, exactly that.

gavrix

comment created time in a month

PR opened CovidShield/mobile

Reviewers
Indicate disabled button state in voice-over mode

fixes https://github.com/CovidShield/mobile/issues/58

+8 -2

0 comment

1 changed file

pr created time in a month

push eventCovidShield/mobile

Janic Duplessis

commit sha 89828bb9931081d24e2ab4a4e685d560238bb197

Cleanup launch screen files on iOS

view details

Janic Duplessis

commit sha 3e9596a9b6aee96fc53292abfebfb8bebf684f1e

Fix test mode reset data

view details

Jordan Good

commit sha 48055091647fedc41d8fed0a134f28d0eac8421a

Merge pull request #91 from janicduplessis/fix-reset Fix test mode reset data

view details

Henry Tao

commit sha 6c5aa45f1e95e93be60b87ec7ac22639739897c8

Merge pull request #89 from janicduplessis/ls-cleanup Cleanup launch screen files on iOS

view details

Sergey Gavrilyuk

commit sha cde47d05c6157d7c88532a340b292fef9f22e698

use a11y state for button to indicate disabled state

view details

push time in a month

create barnchCovidShield/mobile

branch : a11y/disabled-button-state

created branch time in a month

pull request commentCovidShield/mobile

Fix button and background in onboarding and tutorial screen

@kpeatt another 👀

henrytao-me

comment created time in a month

delete branch CovidShield/mobile

delete branch : update-protobuf

delete time in a month

PR merged CovidShield/mobile

Update to latest protobuf protocol
+1425 -528

0 comment

6 changed files

gavrix

pr closed time in a month

delete branch CovidShield/mobile

delete branch : en-framework-start-fix

delete time in a month

more