Skip to content
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

Release 3.3.4-alpha #1858

Merged
merged 31 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8eeeb14
Add reset for schemas and converters
mpgxvii Dec 11, 2024
8817457
Allow task info to be hidden
mpgxvii Feb 3, 2025
3a273b1
Allow slider to be a matrix type
mpgxvii Feb 3, 2025
c1426f6
Add healthkit to QuestionType
mpgxvii Feb 14, 2025
4dc7544
Check matrix group name exists before grouping
mpgxvii Feb 6, 2025
2cfda7c
Check all questions are answered in matrix
mpgxvii Feb 6, 2025
0ec29c9
Allow yesno input to be a matrix question
mpgxvii Feb 10, 2025
d1d1d47
Update date input to use dd/mm/yyyy format
mpgxvii Feb 10, 2025
2944ebb
Update task service
mpgxvii Feb 10, 2025
49bce10
Update xcode project file
mpgxvii Feb 10, 2025
7ca0f2a
Update enrolment page change detection
mpgxvii Feb 13, 2025
6fcfde2
Ensure storage service is ready before init
mpgxvii Feb 13, 2025
e6f7b6f
Cleanup
mpgxvii Feb 14, 2025
02b69e0
Decode iat in token if not present in response
mpgxvii Dec 6, 2024
cc0a05e
Cleanup
mpgxvii Feb 14, 2025
065214f
Enrolment page improvements
mpgxvii Feb 14, 2025
ab7aedd
Add explicit check for changes in participant attributes
mpgxvii Feb 14, 2025
0b251a7
Remove unnecessary check in participant attributes
mpgxvii Feb 14, 2025
e601465
Bump versions
mpgxvii Feb 14, 2025
0d57afa
Merge pull request #1857 from RADAR-base/feat/various-updates
mpgxvii Feb 14, 2025
8dc2e68
Fix matrix radio input
mpgxvii Feb 17, 2025
5aecd14
Update ios Info.plist
mpgxvii Feb 17, 2025
265d22b
Remove unnecessary loading var update
mpgxvii Feb 18, 2025
60da91e
Bump deprecated actions
mpgxvii Feb 18, 2025
6be293a
Bump deprecated actions
mpgxvii Feb 18, 2025
a2031c9
Update Info.plist
mpgxvii Feb 18, 2025
70846f7
Add iOS privacy manifest
mpgxvii Feb 18, 2025
828f695
Update privacy manifest: remove duplicates
mpgxvii Feb 18, 2025
0627244
Update privacy manifest
mpgxvii Feb 18, 2025
2a82403
Merge pull request #1860 from RADAR-base/add-privacy-manifest
mpgxvii Feb 18, 2025
098d7bd
Bump versions and update ios files
mpgxvii Feb 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "org.phidatalab.radar_armt"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 592
versionName "3.3.3-alpha"
versionCode 593
versionName "3.3.4-alpha"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
12 changes: 6 additions & 6 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/* Begin PBXBuildFile section */
2DCC4441ECB6AE53462C7302 /* Pods_RADAR_Active_RMT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FBB3316FEBE50D0F3BCBA4C /* Pods_RADAR_Active_RMT.framework */; };
2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; };
4C4FF1572BEBFDF000B0D335 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4C4FF1562BEBFDF000B0D335 /* GoogleService-Info.plist */; };
4CAE23452D50FE9900E2E2EC /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4CAE23442D50FE9900E2E2EC /* GoogleService-Info.plist */; };
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; };
504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; };
504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
Expand All @@ -22,8 +22,8 @@
0066ED161F09C0B9FCA0716A /* Pods-RADAR Active RMT.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RADAR Active RMT.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RADAR Active RMT/Pods-RADAR Active RMT.debug.xcconfig"; sourceTree = "<group>"; };
2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = "<group>"; };
3FBB3316FEBE50D0F3BCBA4C /* Pods_RADAR_Active_RMT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RADAR_Active_RMT.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4C4FF1562BEBFDF000B0D335 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../GoogleService-Info.plist"; sourceTree = "<group>"; };
4C4FF1592BEC015000B0D335 /* RADAR Questionnaire.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "RADAR Questionnaire.entitlements"; sourceTree = "<group>"; };
4CAE23442D50FE9900E2E2EC /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../../Downloads/GoogleService-Info.plist"; sourceTree = "<group>"; };
50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = "<group>"; };
504EC3041FED79650016851F /* RADAR Active RMT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RADAR Active RMT.app"; sourceTree = BUILT_PRODUCTS_DIR; };
504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -81,10 +81,10 @@
504EC3061FED79650016851F /* App */ = {
isa = PBXGroup;
children = (
4CAE23442D50FE9900E2E2EC /* GoogleService-Info.plist */,
50379B222058CBB4000EE86E /* capacitor.config.json */,
504EC3071FED79650016851F /* AppDelegate.swift */,
504EC30B1FED79650016851F /* Main.storyboard */,
4C4FF1562BEBFDF000B0D335 /* GoogleService-Info.plist */,
504EC30E1FED79650016851F /* Assets.xcassets */,
504EC3101FED79650016851F /* LaunchScreen.storyboard */,
504EC3131FED79650016851F /* Info.plist */,
Expand Down Expand Up @@ -174,7 +174,7 @@
50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
504EC30D1FED79650016851F /* Main.storyboard in Resources */,
2FAD9763203C412B000D30F8 /* config.xml in Resources */,
4C4FF1572BEBFDF000B0D335 /* GoogleService-Info.plist in Resources */,
4CAE23452D50FE9900E2E2EC /* GoogleService-Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -366,7 +366,7 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.3.3;
MARKETING_VERSION = 3.3.4;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = "org.phidatalab.radar-armt";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -388,7 +388,7 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.3.3;
MARKETING_VERSION = 3.3.4;
PRODUCT_BUNDLE_IDENTIFIER = "org.phidatalab.radar-armt";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
Expand Down
2 changes: 1 addition & 1 deletion ios/App/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.3.3</string>
<string>3.3.4</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "radar-questionnaire",
"description": "An application that collects active data for research.",
"version": "3.3.3",
"version": "3.3.4",
"author": "RADAR Base",
"homepage": "http://www.radar-base.org/",
"scripts": {
Expand Down
24 changes: 22 additions & 2 deletions src/app/core/services/config/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,20 @@ export class ConfigService {
this.hasAppVersionChanged(),
this.hasTimezoneChanged(),
this.hasNotificationsExpired(),
this.hasNotificationMessagingTypeChanged()
this.hasNotificationMessagingTypeChanged(),
this.hasParticipantAttributesChanged()
])
.then(
([
newProtocol,
newAppVersion,
newTimezone,
newNotifications,
newMessagingType
newMessagingType,
newAttributes
]) => {
if (newAttributes)
return this.fetchConfigState(true)
if (newProtocol && newAppVersion && newTimezone)
this.subjectConfig
.getEnrolmentDate()
Expand Down Expand Up @@ -96,6 +100,22 @@ export class ConfigService {
})
}

hasParticipantAttributesChanged() {
return Promise.all([
this.subjectConfig.getParticipantAttributes(),
this.subjectConfig.pullSubjectInformation(),
])
.then(([attributes, user]) => {
const newAttributes = user.attributes
const hasChanged = JSON.stringify(attributes) !== JSON.stringify(user.attributes)
if (hasChanged) {
this.subjectConfig.setParticipantAttributes(newAttributes)
this.analytics.setUserProperties(newAttributes)
}
return hasChanged
})
}

hasProtocolChanged(force?) {
return Promise.all([
this.appConfig.getScheduleHashUrl(),
Expand Down
19 changes: 6 additions & 13 deletions src/app/core/services/config/protocol.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class ProtocolService {
private logger: LogService,
private analytics: AnalyticsService,
private util: Utility
) {}
) { }

pull(): Promise<ProtocolMetaData> {
return Promise.all([this.getProjectTree(), this.getParticipantAttributes()])
Expand Down Expand Up @@ -176,20 +176,13 @@ export class ProtocolService {
.then(cfg =>
Promise.all([
this.config.getParticipantAttributes(),
this.config.pullSubjectInformation(),
this.getParticipantAttributeOrder(cfg)
])
)
.then(([attributes, user, order]) => {
const newAttributes =
JSON.stringify(attributes) == JSON.stringify(user.attributes)
? attributes
: user.attributes
this.config.setParticipantAttributes(newAttributes)
this.analytics.setUserProperties(newAttributes)
.then(([attributes, order]) => {
return sortObject(
newAttributes,
this.formatAttributeOrder(newAttributes, order)
attributes,
this.formatAttributeOrder(attributes, order)
)
})
}
Expand All @@ -201,8 +194,8 @@ export class ProtocolService {
const orderWithoutNull = {}
Object.keys(attributes).map(
k =>
(orderWithoutNull[k] =
order[k] != null ? order[k] : this.DEFAULT_ATTRIBUTE_ORDER)
(orderWithoutNull[k] =
order[k] != null ? order[k] : this.DEFAULT_ATTRIBUTE_ORDER)
)
return orderWithoutNull
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export class ConverterFactoryService {
private completionLogConverter: CompletionLogConverterService,
private timzoneConverter: TimezoneConverterService,
private keyConverter: KeyConverterService
) {}
) { }

init() {}
init() { }

getConverter(type) {
switch (this.classify(type)) {
Expand All @@ -45,4 +45,13 @@ export class ConverterFactoryService {
if (type.includes(SchemaType.HEALTHKIT)) return SchemaType.HEALTHKIT
else return type
}

reset() {
this.healthkitConverter.reset()
this.assessmentConverter.reset()
this.completionLogConverter.reset()
this.timzoneConverter.reset()
this.appEventConverter.reset()
this.assessmentConverter.reset()
}
}
6 changes: 6 additions & 0 deletions src/app/core/services/kafka/converters/converter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,10 @@ export abstract class ConverterService {
return false
}
}

reset() {
this.BASE_URI = null
this.specifications = null
this.schemas = {}
}
}
6 changes: 5 additions & 1 deletion src/app/core/services/kafka/schema.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export class SchemaService {
constructor(
private converterFactory: ConverterFactoryService,
private subjectConfig: SubjectConfigService
) {}
) { }

getKafkaObjectKey() {
return this.subjectConfig
Expand Down Expand Up @@ -59,4 +59,8 @@ export class SchemaService {
})
)
}

reset() {
return this.converterFactory.reset()
}
}
10 changes: 5 additions & 5 deletions src/app/core/services/storage/storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export class StorageService {
) {
this.keyUpdates = new Subject<StorageKeys | null>()
this.platform.ready().then(() => {
this.prepare().then(() =>
this.getStorageState().then(() =>
this.logger.log('Global configuration', this.global)
)
})
}

getStorageState() {
return this.storage.ready()
getStorageState(): Promise<any> {
return this.storage.ready().then(() => this.prepare())
}

set(key: StorageKeys, value: any): Promise<any> {
Expand Down Expand Up @@ -107,8 +107,8 @@ export class StorageService {
const errMsg = error.message
? error.message
: error.status
? `${error.status} - ${error.statusText}`
: 'error'
? `${error.status} - ${error.statusText}`
: 'error'
return observableThrowError(errMsg)
}
}
7 changes: 6 additions & 1 deletion src/app/core/services/token/token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ export class TokenService {
.post(uri, refreshBody, { headers: headers })
.toPromise()
})
.then(res => this.setTokens(res).then(() => res))
.then((res: any) => {
if (!res.iat)
res.iat = this.jwtHelper.decodeToken(res.access_token)['iat']
this.setTokens(res)
return res
})
}

refresh(): Promise<OAuthToken> {
Expand Down
5 changes: 3 additions & 2 deletions src/app/pages/auth/components/qr-form/qr-form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ export class QRFormComponent {
@Output()
data: EventEmitter<any> = new EventEmitter<any>()

constructor(private usage: UsageService) {}
constructor(private usage: UsageService) { }

async scanQRHandler() {
this.loading = true
document.querySelector('body').classList.add('scanner-active')
// Check camera permission
// This is just a simple example, check out the better checks below
Expand All @@ -29,7 +30,7 @@ export class QRFormComponent {
async result => {
await listener.remove()
this.data.emit(result.barcode.rawValue)

this.loading = false
// Removes the class after the scan (workaround for the camera not closing)
document.querySelector('body').classList.remove('scanner-active')
}
Expand Down
5 changes: 5 additions & 0 deletions src/app/pages/auth/containers/enrolment-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
</ion-item>
</div>
</div>
<div class="initial-status">
<div id="outcome" *ngIf="showOutcomeStatus">
{{ outcomeStatus }}
</div>
</div>
<div class="bottom" *ngIf="!(loading | async)">
<ion-button ion-button class="bt bt--full" round full (click)="next()">
{{ 'BTN_START' | translate }}
Expand Down
9 changes: 9 additions & 0 deletions src/app/pages/auth/containers/enrolment-page.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@
text-align: center;
}

.initial-status {
margin-top: 48px;
padding: auto;
flex: 1 0 100%;
width: 100%;
height: auto;
text-align: center;
}

#outcome {
padding: 5px;
background-color: var(--cl-danger-40);
Expand Down
Loading
Loading