Skip to content

Commit

Permalink
feature/native-transitions — Removed that plugin. It is a good plugin…
Browse files Browse the repository at this point in the history
… but I don't like to use it with an ionic wrapper. I think it may be more useful when handling it yourself. If I have time I will retry it without the ionic wrapper. I prefer to keep it simpler and focus on better web performance.

I removed also some classes in layout that should be setted by ionic directly and configured the provider accordingly.
jeandat committed Feb 25, 2016

Verified

This commit was signed with the committer’s verified signature.
Doctor-wu Doctor Wu
1 parent 80a50eb commit 3675c9f
Showing 10 changed files with 18 additions and 73 deletions.
35 changes: 4 additions & 31 deletions app/app.config.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
.config(routeConfig)
.config(localStorageConfig)
.config(ionicConfig)
.config(ionicNativeTransitions)
.config(httpInterceptors)
.config(imgCache);

@@ -38,19 +37,13 @@
.state('app', {
url: '/app',
abstract: true,
nativeTransitions: {
'type': 'fade'
},
templateUrl: 'common/layout/layout.jade'
})

// Each app has its own nav history stack:

.state('app.characters', {
url: '/characters',
nativeTransitions: {
'type': 'fade'
},
views: {
'app-characters': {
templateUrl: 'character/character-list.jade',
@@ -60,10 +53,6 @@
})
.state('app.character-detail', {
url: '/characters',
nativeTransitions: {
'type': 'slide',
'direction': 'up'
},
params: {
character: {}
},
@@ -77,9 +66,6 @@

.state('app.comics', {
url: '/comics',
nativeTransitions: {
'type': 'fade'
},
views: {
'app-comics': {
templateUrl: 'comic/comic-list.jade',
@@ -89,10 +75,6 @@
})
.state('app.comic-detail', {
url: '/comics',
nativeTransitions: {
'type': 'slide',
'direction': 'up'
},
params: {
comic: {}
},
@@ -106,9 +88,6 @@

.state('app.favourites', {
url: '/favourites',
nativeTransitions: {
'type': 'fade'
},
views: {
'app-favourites': {
templateUrl: 'favourite/favourite-list.jade',
@@ -119,9 +98,6 @@

.state('app.settings', {
url: '/settings',
nativeTransitions: {
'type': 'fade'
},
views: {
'app-settings': {
templateUrl: 'setting/setting-list.jade',
@@ -142,13 +118,10 @@
// Ionic defaults
function ionicConfig($ionicConfigProvider) {
$ionicConfigProvider.spinner.icon('dots');
$ionicConfigProvider.views.swipeBackEnabled(false);
}

function ionicNativeTransitions($ionicNativeTransitionsProvider){
$ionicNativeTransitionsProvider.setDefaultOptions({
backInOppositeDirection: true
});
$ionicConfigProvider.backButton.previousTitleText(false);
$ionicConfigProvider.tabs.position('top');
$ionicConfigProvider.views.maxCache(3);
//$ionicConfigProvider.views.transition('none');
}

// ! NOT USED FOR THE MOMENT !
7 changes: 3 additions & 4 deletions app/app.jade
Original file line number Diff line number Diff line change
@@ -22,6 +22,9 @@ html

scroll-top

// cordova script (this will be a 404 during development)
script(src='cordova.js')

// I'm not concatenating vendors to ease debugging without source maps.
// In a cordova app, we can afford it.
script(src='js/jquery.js')
@@ -39,15 +42,11 @@ html
script(src='js/imgcache.js')
script(src='js/angular-imgcache.js')
script(src='@@ngCordovaScript')
script(src='js/ionic-native-transitions.js')


script(src='js/templates.js')
script(src='js/app.js')

// cordova script (this will be a 404 during development)
script(src='cordova.js' async)


script(type='text/javascript').
document.addEventListener('deviceready', function () {
3 changes: 1 addition & 2 deletions app/app.module.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@
'LocalStorageModule',
'angular-cache',
'restangular',
'ImgCache',
'ionic-native-transitions'
'ImgCache'
]);
})();
6 changes: 3 additions & 3 deletions app/app.run.js
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

angular
.module('app')
.run(configureCordova)
.run(configureCordovaPlugins)
.run(setCustomLogs)
.run(addGlobals)
.run(setHttpDefaultCache)
@@ -13,7 +13,7 @@

//////////////////////

function configureCordova($cordovaStatusbar) {
function configureCordovaPlugins($cordovaStatusbar) {

// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard for form inputs)
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
@@ -115,7 +115,7 @@
// is to appears on top and do not resize webview; i.e only for android with
// `windowSoftInputMode="adjustPan"`.
function handleAdjustPanKeyboardMode($ionicScrollDelegate) {
if(!ionic.Platform.isAndroid()) return;
if (!ionic.Platform.isAndroid()) return;

var $artificialItem;

12 changes: 1 addition & 11 deletions app/character/character-detail.controller.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
.module('app')
.controller('CharacterDetailController', CharacterDetailController);

function CharacterDetailController($log, $stateParams, $scope, $ionicTabsDelegate) {
function CharacterDetailController($log, $stateParams) {

var vm = this;
vm.title = 'CharacterDetailController';
@@ -18,16 +18,6 @@

function activate() {
$log.debug(vm.title + ' instantiated');
$scope.$on('$ionicView.beforeEnter', hideTabs);
$scope.$on('$ionicView.beforeLeave', showTabs);
}

function showTabs() {
$ionicTabsDelegate.showBar(true);
}

function hideTabs() {
$ionicTabsDelegate.showBar(false);
}

function openDetailPage(){
12 changes: 1 addition & 11 deletions app/comic/comic-detail.controller.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
.module('app')
.controller('ComicDetailController', ComicDetailController);

function ComicDetailController($log, $stateParams, $scope, $ionicTabsDelegate) {
function ComicDetailController($log, $stateParams) {

var vm = this;
vm.title = 'ComicDetailController';
@@ -17,16 +17,6 @@

function activate() {
$log.debug(vm.title + ' instantiated');
$scope.$on('$ionicView.beforeEnter', hideTabs);
$scope.$on('$ionicView.beforeLeave', showTabs);
}

function showTabs() {
$ionicTabsDelegate.showBar(true);
}

function hideTabs() {
$ionicTabsDelegate.showBar(false);
}

}
2 changes: 1 addition & 1 deletion app/common/layout/layout.jade
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
Create apps with an icon and label, using the apps-positive style.
Each app's child <ion-nav-view> directive will have its own
navigation history that also transitions its views in and out.
ion-tabs.tabs-icon-top.tabs-striped.tabs-background-assertive.tabs-color-light.tabs-top
ion-tabs.tabs-icon-top.tabs-background-assertive.tabs-color-light
// Dashboard Tab
ion-tab(title='Characters', icon-off='ion-android-star-outline', icon-on='ion-android-star', href='#/app/characters')
ion-nav-view(name='app-characters')
3 changes: 1 addition & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -12,8 +12,7 @@
"karma-read-json": "^1.1.0",
"restangular": "^1.5.1",
"angular-imgcache": "angular-imgcache.js#^0.1.0",
"imgcache.js": "^1.0.0",
"ionic-native-transitions": "shprink/ionic-native-transitions#^1.0.0"
"imgcache.js": "^1.0.0"
},
"resolutions": {
"angular": "^1.5.0"
3 changes: 1 addition & 2 deletions grunt/script.js
Original file line number Diff line number Diff line change
@@ -25,8 +25,7 @@ module.exports = function () {
'angular-cache/dist/angular-cache.js',
'restangular/dist/restangular.js',
'imgcache.js/js/imgcache.js',
'angular-imgcache/angular-imgcache.js',
'ionic-native-transitions/dist/ionic-native-transitions.js'
'angular-imgcache/angular-imgcache.js'
],
expand: true,
cwd: 'vendor',
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
"grunt-bump": "^0.7.0",
"grunt-chokidar": "^1.0.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-concat": "^1.0.0",
"grunt-contrib-copy": "^0.8.2",
"grunt-contrib-jade": "^0.15.0",
"grunt-contrib-jshint": "^1.0.0",
@@ -28,7 +28,7 @@
"grunt-sass-compile-imports": "^0.2.1",
"grunt-shell": "^1.1.2",
"jasmine-core": "^2.4.1",
"jit-grunt": "^0.9.1",
"jit-grunt": "^0.10.0",
"js-yaml": "^3.5.2",
"jscs-stylish": "^0.3.1",
"jshint-stylish": "^2.1.0",
@@ -61,10 +61,6 @@
"cordova-plugin-file-transfer",
"cordova-plugin-file",
"cordova-plugin-inappbrowser",
{
"locator": "https://github.com/Telerik-Verified-Plugins/NativePageTransitions",
"id": "com.telerik.plugins.nativepagetransitions"
},
"cordova-plugin-wkwebview-engine"
],
"cordovaPlatforms": [

0 comments on commit 3675c9f

Please sign in to comment.