Skip to content

Commit

Permalink
Merge pull request #84 from graphefruit/performance-tweaks
Browse files Browse the repository at this point in the history
Features + Tests + Fixes
  • Loading branch information
graphefruit authored Mar 30, 2020
2 parents fc96f7e + 6fac4a3 commit 86d5dc0
Show file tree
Hide file tree
Showing 72 changed files with 3,621 additions and 2,420 deletions.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,18 @@ ionic cordova build android

## Issues with iOS
```
1. pod install
-> this needs to be done in the ios platform
if this doesn't help:
2.
sudo chmod go-w /YourPath/Beanconqueror
pod repo update
```


##Debug analytics on firebase
## Debug analytics on firebase
```adb shell setprop debug.firebase.analytics.app Beanconqueror
adb shell setprop debug.firebase.analytics.app com.beanconqueror.app
```
Expand All @@ -52,3 +58,9 @@ adb shell setprop debug.firebase.analytics.app .none.
```


### Check outdated dependencies
````
npm outdated
``
6 changes: 5 additions & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.beanconqueror.app" version="3.5.0" xmlns="http://www.w3.org/ns/widgets">
<widget id="com.beanconqueror.app" version="3.6.0" xmlns="http://www.w3.org/ns/widgets">
<name>Beanconqueror</name>
<description />
<author email="[email protected]" href="https://github.com/graphefruit/beanconqueror">Lars Saalbach</author>
Expand Down Expand Up @@ -49,6 +49,10 @@
</platform>
<platform name="ios">
<preference name="WKWebViewOnly" value="true"/>
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine"/>
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine"/>
<edit-config file="*-Info.plist" mode="merge" target="UIApplicationShortcutItems">
<array>
<dict>
Expand Down
3,901 changes: 2,047 additions & 1,854 deletions package-lock.json

Large diffs are not rendered by default.

123 changes: 68 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "^8.2.14",
"@ionic-native/android-permissions": "^5.19.1",
"@ionic-native/app-minimize": "^5.19.1",
"@ionic-native/app-version": "^5.20.0",
"@ionic-native/camera": "^5.19.1",
"@ionic-native/core": "^5.19.1",
"@ionic-native/file": "^5.19.1",
"@ionic-native/file-chooser": "^5.19.1",
"@ionic-native/file-path": "^5.19.1",
"@ionic-native/file-picker": "^5.19.1",
"@ionic-native/firebase-x": "^5.22.0",
"@ionic-native/globalization": "^5.19.1",
"@ionic-native/image-picker": "^5.19.1",
"@ionic-native/in-app-browser": "^5.19.1",
"@ionic-native/keyboard": "^5.19.1",
"@ionic-native/social-sharing": "^5.19.1",
"@ionic-native/splash-screen": "^5.19.1",
"@ionic-native/status-bar": "^5.19.1",
"@ionic-native/three-dee-touch": "^5.19.1",
"@ionic/angular": "^5.0.0",
"@ionic/cli": "^6.1.0",
"@ionic-native/android-permissions": "^5.23.0",
"@ionic-native/app-minimize": "^5.23.0",
"@ionic-native/app-version": "^5.23.0",
"@ionic-native/camera": "^5.23.0",
"@ionic-native/core": "^5.23.0",
"@ionic-native/file": "^5.23.0",
"@ionic-native/file-chooser": "^5.23.0",
"@ionic-native/file-path": "^5.23.0",
"@ionic-native/file-picker": "^5.23.0",
"@ionic-native/firebase-x": "^5.23.0",
"@ionic-native/globalization": "^5.23.0",
"@ionic-native/image-picker": "^5.23.0",
"@ionic-native/in-app-browser": "^5.23.0",
"@ionic-native/keyboard": "^5.23.0",
"@ionic-native/social-sharing": "^5.23.0",
"@ionic-native/splash-screen": "^5.23.0",
"@ionic-native/status-bar": "^5.23.0",
"@ionic-native/three-dee-touch": "^5.23.0",
"@ionic/angular": "^5.0.6",
"@ionic/cli": "^6.3.0",
"@ionic/storage": "^2.2.0",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"chart.js": "^2.8.0",
"chart.js": "^2.9.3",
"cordova-android": "^8.1.0",
"cordova-android-support-gradle-release": "^3.0.1",
"cordova-ios": "^5.1.1",
"cordova-plugin-3dtouch": "^1.3.7",
"cordova-plugin-android-permissions": "^1.0.0",
"cordova-plugin-3dtouch": "^1.3.8",
"cordova-plugin-android-permissions": "^1.0.2",
"cordova-plugin-androidx": "^1.0.2",
"cordova-plugin-androidx-adapter": "^1.1.0",
"cordova-plugin-app-version": "^0.1.9",
Expand All @@ -59,48 +59,48 @@
"cordova-plugin-enable-multidex": "^0.2.0",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-filechooser": "^1.2.0",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-filepath": "^1.5.8",
"cordova-plugin-filepicker": "^1.1.6",
"cordova-plugin-firebasex": "^8.1.1",
"cordova-plugin-firebasex": "^9.0.1-cli",
"cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^3.2.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.1",
"cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-splashscreen": "^5.0.3",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-telerik-imagepicker": "^2.3.3",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-plugin-x-socialsharing": "^5.6.0",
"cordova-sqlite-storage": "^3.3.0",
"core-js": "^2.5.4",
"cordova-plugin-x-socialsharing": "^5.6.4",
"cordova-sqlite-storage": "^3.4.1",
"core-js": "^2.6.11",
"es6-promise-plugin": "^4.2.2",
"ionic": "^5.4.13",
"ionic": "^5.4.16",
"moment": "^2.24.0",
"rxjs": "^6.5.3",
"tslib": "^1.9.0",
"rxjs": "^6.5.4",
"tslib": "^1.11.1",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/architect": "^0.900.1",
"@angular-devkit/build-angular": "^0.803.24",
"@angular-devkit/core": "^9.0.1",
"@angular-devkit/schematics": "^9.0.1",
"@angular-devkit/architect": "^0.900.7",
"@angular-devkit/build-angular": "^0.803.25",
"@angular-devkit/core": "^9.1.0",
"@angular-devkit/schematics": "^9.1.0",
"@angular/cli": "~8.3.23",
"@angular/compiler": "~8.2.14",
"@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.14",
"@ionic/angular-toolkit": "^2.1.2",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.6.9",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"@ionic/angular-toolkit": "^2.2.0",
"@types/jasmine": "~3.5.10",
"@types/jasminewd2": "~2.0.8",
"@types/node": "^12.12.31",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.1",
"karma": "~4.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.0.6",
"karma-jasmine": "~3.1.1",
"karma-jasmine-html-reporter": "^1.5.3",
"protractor": "~5.4.3",
"ts-node": "~8.3.0",
"tslint": "~5.17.0",
"typescript": "~3.4.3"
Expand Down Expand Up @@ -129,18 +129,31 @@
"ANDROID_SUPPORT_V4_VERSION": "24.1.1+"
},
"cordova-plugin-appminimize": {},
"cordova-android-support-gradle-release": {},
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "27.+"
},
"cordova-plugin-3dtouch": {},
"cordova-plugin-globalization": {},
"cordova-plugin-app-version": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-firebasex": {
"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "false",
"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "false",
"FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "false"
},
"cordova-plugin-enable-multidex": {},
"cordova-plugin-ionic-keyboard": {}
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-firebasex": {
"FIREBASE_ANALYTICS_COLLECTION_ENABLED": "true",
"FIREBASE_PERFORMANCE_COLLECTION_ENABLED": "true",
"FIREBASE_CRASHLYTICS_COLLECTION_ENABLED": "true",
"ANDROID_ICON_ACCENT": "#FF00FFFF",
"ANDROID_PLAY_SERVICES_AUTH_VERSION": "17.0.0",
"ANDROID_FIREBASE_ANALYTICS_VERSION": "17.2.1",
"ANDROID_FIREBASE_MESSAGING_VERSION": "20.0.0",
"ANDROID_FIREBASE_CONFIG_VERSION": "19.0.3",
"ANDROID_FIREBASE_PERF_VERSION": "19.0.1",
"ANDROID_FIREBASE_AUTH_VERSION": "19.1.0",
"ANDROID_FIREBASE_FIRESTORE_VERSION": "21.4.0",
"ANDROID_CRASHLYTICS_VERSION": "2.10.1",
"ANDROID_CRASHLYTICS_NDK_VERSION": "2.1.1",
"ANDROID_GSON_VERSION": "2.8.6"
}
},
"platforms": [
"ios",
Expand Down
42 changes: 30 additions & 12 deletions src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { TestBed, async } from '@angular/core/testing';
import {CUSTOM_ELEMENTS_SCHEMA} from '@angular/core';
import {async, TestBed} from '@angular/core/testing';

import { Platform } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';
import { RouterTestingModule } from '@angular/router/testing';
import {ModalController, Platform} from '@ionic/angular';
import {SplashScreen} from '@ionic-native/splash-screen/ngx';
import {StatusBar} from '@ionic-native/status-bar/ngx';
import {RouterTestingModule} from '@angular/router/testing';

import { AppComponent } from './app.component';
import {AppComponent} from './app.component';
import {TranslateModule} from '@ngx-translate/core';
import {Storage} from '@ionic/storage';
import {InAppBrowser} from '@ionic-native/in-app-browser/ngx';
import {File} from '@ionic-native/file/ngx';
import {AppMinimize} from '@ionic-native/app-minimize/ngx';
import {Keyboard} from '@ionic-native/keyboard/ngx';
import {ThreeDeeTouch} from '@ionic-native/three-dee-touch/ngx';
import {Globalization} from '@ionic-native/globalization/ngx';
import {FirebaseX} from '@ionic-native/firebase-x/ngx';

describe('AppComponent', () => {

Expand All @@ -25,8 +34,17 @@ describe('AppComponent', () => {
{ provide: StatusBar, useValue: statusBarSpy },
{ provide: SplashScreen, useValue: splashScreenSpy },
{ provide: Platform, useValue: platformSpy },
{provide: Storage},
{provide: InAppBrowser},
{provide: File},
{provide: AppMinimize},
{provide: Keyboard},
{provide: ThreeDeeTouch},
{provide: ModalController},
{provide: Globalization},
{provide: FirebaseX},
],
imports: [ RouterTestingModule.withRoutes([])],
imports: [RouterTestingModule.withRoutes([]), TranslateModule.forRoot()],
}).compileComponents();
}));

Expand All @@ -36,15 +54,15 @@ describe('AppComponent', () => {
expect(app).toBeTruthy();
});

it('should initialize the app', async () => {
/**it('should initialize the app', async () => {
TestBed.createComponent(AppComponent);
expect(platformSpy.ready).toHaveBeenCalled();
await platformReadySpy;
expect(statusBarSpy.styleDefault).toHaveBeenCalled();
expect(splashScreenSpy.hide).toHaveBeenCalled();
});
});**/

it('should have menu labels', async () => {
/** it('should have menu labels', async () => {
const fixture = await TestBed.createComponent(AppComponent);
await fixture.detectChanges();
const app = fixture.nativeElement;
Expand All @@ -62,6 +80,6 @@ describe('AppComponent', () => {
expect(menuItems.length).toEqual(2);
expect(menuItems[0].getAttribute('ng-reflect-router-link')).toEqual('/home');
expect(menuItems[1].getAttribute('ng-reflect-router-link')).toEqual('/list');
});
});**/

});
19 changes: 11 additions & 8 deletions src/app/beans/beans-add/beans-add.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<ion-item>
<ion-label floating>{{"BEAN_DATA_NAME" | translate}}*</ion-label>
<ion-input [(ngModel)]="data.name" name="name" type="text" #name="ngModel" spellcheck="false"
autocapitalize="off" required>
autocapitalize="sentences" required>
</ion-input>
</ion-item>
<ion-item>
Expand All @@ -36,19 +36,19 @@
<ion-item>
<ion-label floating>{{"BEAN_DATA_ROASTER" | translate}}</ion-label>
<ion-input [(ngModel)]="data.roaster" name="roaster" type="text" #roaster="ngModel" spellcheck="false"
autocapitalize="off" required>
autocapitalize="sentences" required>
</ion-input>
</ion-item>
<ion-item>
<ion-label floating>{{"BEAN_DATA_VARIETY" | translate}}</ion-label>
<ion-input [(ngModel)]="data.variety" name="variety" type="text" #variety="ngModel" spellcheck="false"
autocapitalize="off" required>
autocapitalize="sentences" required>
</ion-input>
</ion-item>
<ion-item>
<ion-label floating>{{"BEAN_DATA_COUNTRY" | translate}}</ion-label>
<ion-input [(ngModel)]="data.country" name="country" type="text" #country="ngModel" spellcheck="false"
autocapitalize="off" required>
autocapitalize="sentences" required>
</ion-input>
</ion-item>
<ion-item>
Expand All @@ -60,24 +60,27 @@
<ion-item>
<ion-label floating>{{"BEAN_DATA_AROMATICS" | translate}}</ion-label>
<ion-input [(ngModel)]="data.aromatics" name="aromatics" type="text" #aromatics="ngModel" spellcheck="false"
autocapitalize="off" required>
autocapitalize="sentences" required>
</ion-input>
</ion-item>
<ion-item>
<ion-label floating>{{"BEAN_DATA_WEIGHT" | translate}}</ion-label>
<ion-input [(ngModel)]="data.weight" name="weight" remove-empty-number prevent-characters type="text" #weight="ngModel" spellcheck="false"
<ion-input #weight="ngModel" [(ngModel)]="data.weight" inputmode="decimal" name="weight" prevent-characters
remove-empty-number spellcheck="false" type="text"
autocapitalize="off" required>
</ion-input>
</ion-item>
<ion-item>
<ion-label floating>{{"BEAN_DATA_COST" | translate}}</ion-label>
<ion-input [(ngModel)]="data.cost" name="cost" remove-empty-number prevent-characters type="text" #cost="ngModel" spellcheck="false"
<ion-input #cost="ngModel" [(ngModel)]="data.cost" inputmode="decimal" name="cost" prevent-characters
remove-empty-number spellcheck="false" type="text"
autocapitalize="off" required>
</ion-input>
</ion-item>
<ion-item>
<ion-label floating>{{"NOTES" | translate}}</ion-label>
<ion-textarea autocomplete="true" spellcheck="true" autocorrect="true" name="note" #note="ngModel" rows="5" [(ngModel)]="data.note"></ion-textarea>
<ion-textarea #note="ngModel" [(ngModel)]="data.note" autocapitalize="sentences" autocomplete="true"
autocorrect="true" name="note" rows="5" spellcheck="true"></ion-textarea>
</ion-item>
<ion-item button (click)="addImage()">
{{"ADD_PHOTO" | translate}}
Expand Down
Loading

0 comments on commit 86d5dc0

Please sign in to comment.