diff --git a/CHANGELOG.md b/CHANGELOG.md index e96f9f57403..98ff12fc14a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,78 +1,76 @@ # [2.0.0-rc.0](https://github.com/driftyco/ionic/compare/v2.0.0-beta.11...v2.0.0-rc.0) (2016-09-28) +RC0 requires changes to the structure of your app. To get started updating your app see the [upgrade steps](#steps-to-upgrade-to-rc0) section below. + +### New Features +* Ionic 2 API finalized for `2.0.0` release +* Angular 2.0.0 (final!) +* ionViewCanEnter / CanLeave lifecycle events +* FAB Button lists +* Ahead of Time (AoT) compiler ready +* Components can now individually set a mode, which means an app can mix and match iOS / Material Design / Windows Platform modes if that’s desired. +* Typescript 2.0 +* @types support for third-party libraries -### Bug Fixes +### BREAKING CHANGES -* **action-sheet:** add icon-left to the button if an icon exists ([a731528](https://github.com/driftyco/ionic/commit/a731528)) -* **animation:** prevent possible raf null errors ([0e8ebe5](https://github.com/driftyco/ionic/commit/0e8ebe5)) -* **app:** corrected paths to theme from app.scss ([001c1c9](https://github.com/driftyco/ionic/commit/001c1c9)) -* **changelog:** specify version of forms ([82852fb](https://github.com/driftyco/ionic/commit/82852fb)) -* **checkbox:** disabled toggle should not fire events or animate ([3324e32](https://github.com/driftyco/ionic/commit/3324e32)) -* **di:** update dependency injection and default configs ([7c05d0c](https://github.com/driftyco/ionic/commit/7c05d0c)) -* **docs:** get rid of reference to [@Page](https://github.com/Page) ([6fb848c](https://github.com/driftyco/ionic/commit/6fb848c)) -* **exports:** update module exports ([6784f5e](https://github.com/driftyco/ionic/commit/6784f5e)) -* **fab:** colors in speed dial buttons ([b70614b](https://github.com/driftyco/ionic/commit/b70614b)) -* **gestures:** fixes scroll issue with hammer config ([174efc1](https://github.com/driftyco/ionic/commit/174efc1)), closes [#6897](https://github.com/driftyco/ionic/issues/6897) -* **ion-fixed:** ion-fixed directive is not longer needed ([75d5526](https://github.com/driftyco/ionic/commit/75d5526)) -* **item:** regression in sliding item introduced by 52ada1c ([e0c2129](https://github.com/driftyco/ionic/commit/e0c2129)) -* **item:** sliding item events are zone wrapped ([47491fb](https://github.com/driftyco/ionic/commit/47491fb)), closes [#7630](https://github.com/driftyco/ionic/issues/7630) -* **item:** sliding item with icon-only buttons ([1d3d5a1](https://github.com/driftyco/ionic/commit/1d3d5a1)) -* **menu:** open/close race condition ([8585427](https://github.com/driftyco/ionic/commit/8585427)), closes [#7629](https://github.com/driftyco/ionic/issues/7629) [#8001](https://github.com/driftyco/ionic/issues/8001) -* gulp validate passes successfully ([b750e46](https://github.com/driftyco/ionic/commit/b750e46)) -* **nav:** move null assignment of _onWillDismiss ([35193c4](https://github.com/driftyco/ionic/commit/35193c4)) -* **nav:** setRoot() and setPages() should not animate ([7012734](https://github.com/driftyco/ionic/commit/7012734)) -* **navigation:** move onWillDismiss and onDidDismiss, add unit tests ([e26c425](https://github.com/driftyco/ionic/commit/e26c425)) -* **platform:** fire platform ready on app init ([963e835](https://github.com/driftyco/ionic/commit/963e835)) -* **reorder:** adjust reorder icon style for iOS and MD ([f3bb2dc](https://github.com/driftyco/ionic/commit/f3bb2dc)) -* **templates:** add template tabs [#8207](https://github.com/driftyco/ionic/issues/8207) ([#8208](https://github.com/driftyco/ionic/issues/8208)) ([0f6ce28](https://github.com/driftyco/ionic/commit/0f6ce28)) -* **urlSerializer:** improve findLinkByComponentData ([9d563f5](https://github.com/driftyco/ionic/commit/9d563f5)) +* Angular upgrade to [2.0.0](https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html) +* [Renamed Lifecycle events](#lifecycle-events-renamed). -### Code Refactoring +* Storage has been removed from ionic-angular and into a separate module, @ionic/storage. +Starters have been updated to add this, make sure to add it to your package.json if you’re using the storage system. See more [details here](#storage). -* **button:** add ion-button attribute and icon attributes to style buttons ([938864e](https://github.com/driftyco/ionic/commit/938864e)), closes [#7466](https://github.com/driftyco/ionic/issues/7466) -* **colors:** color should be added as an input instead of directly adding the color to the component ([55a0257](https://github.com/driftyco/ionic/commit/55a0257)), closes [#7087](https://github.com/driftyco/ionic/issues/7087) [#7401](https://github.com/driftyco/ionic/issues/7401) [#7523](https://github.com/driftyco/ionic/issues/7523) -* **select:** rename alertOptions to selectOptions, add ability to pass them for action-sheet ([b8285b7](https://github.com/driftyco/ionic/commit/b8285b7)), closes [#7764](https://github.com/driftyco/ionic/issues/7764) +* Nav transitions are queued. For more info on what this means for you see [this section](#nav-transitions). +* Removed Tabs `preloadTabs` ability. This is no longer needed with the Ahead of Time (AoT) compiler. -### Features +* Icons in buttons require an attribute on the parent button in order to style them. -* **action-sheet:** add ability to pass multiple classes to cssClass ([68ab261](https://github.com/driftyco/ionic/commit/68ab261)) -* **chips:** added Chip component ([421f637](https://github.com/driftyco/ionic/commit/421f637)) -* **chips:** finished Component ([0dece72](https://github.com/driftyco/ionic/commit/0dece72)) -* **fab:** update floating action buttons ([490a06d](https://github.com/driftyco/ionic/commit/490a06d)) -* **itemReorder:** animate reorder button ([1f78487](https://github.com/driftyco/ionic/commit/1f78487)) -* **loading:** add ability to pass multiple classes to cssClass ([466dea3](https://github.com/driftyco/ionic/commit/466dea3)) -* **loading:** add setContent function ([c750847](https://github.com/driftyco/ionic/commit/c750847)) -* add polyfill task ([ce78194](https://github.com/driftyco/ionic/commit/ce78194)) -* **nav:** component url navigation ([f477aa2](https://github.com/driftyco/ionic/commit/f477aa2)) -* **nav:** set default stack history on app init ([ca8cc0a](https://github.com/driftyco/ionic/commit/ca8cc0a)) -* **polyfills:** split up code and source polyfill task ([#8130](https://github.com/driftyco/ionic/issues/8130)) ([bcec66c](https://github.com/driftyco/ionic/commit/bcec66c)) -* **popover:** add ability to pass multiple classes to cssClass ([a685cdc](https://github.com/driftyco/ionic/commit/a685cdc)) -* **toast:** add ability to pass multiple classes to cssClass ([79e25a3](https://github.com/driftyco/ionic/commit/79e25a3)) +* Platform and mode CSS classes have been moved from the element to the element. +* select: Select’s `alertOptions` input has been renamed to `selectOptions`. See more [details here](#select-changes). -### Performance Improvements +* colors: Colors should be passed in the `color` input on components, not added +individually as an attribute on the component. See more [details here](#component-colors). -* **item:** apply will-change only when list is active ([4bcd815](https://github.com/driftyco/ionic/commit/4bcd815)) -* **reorder:** reorder icon is display: none by default ([26441ec](https://github.com/driftyco/ionic/commit/26441ec)) -* **ripple:** md ripple effect update to not affect layout ([14a3ea2](https://github.com/driftyco/ionic/commit/14a3ea2)) +* buttons: ` +``` + +becomes + +``` + +``` +Icon left of text in a button +``` + +``` + +becomes + +``` + +``` +Icon right of text in a button +``` + +``` + +becomes + +``` + +``` +Item option buttons - the `icon-left` attribute should still be added to the `` container and not the button itself. +`menuToggle` buttons should not get the `icon-only` attribute + +**Reason for this change:** +There was a noticeable performance decrease from us reading in each button to determine where icons were placed and how to style them. This change improves performance. +This adds styling so that the buttons and icons will be padded a certain amount, but the user is free to leave these attributes off and style the components themselves. + +#### Update CSS Link Tags + +Ionic stylesheets are no longer dynamically loaded per platform. Instead there will be one CSS file to import. Note that future build processes will slim down the CSS file even further to only include component CSS actually used. + +In the head of your `index.html` file, replace: + +``` + + + + +``` + +With: + +``` + +``` +#### Sass Import + +The default configuration will be updated, but if your existing app is using Sass and importing Ionic Sass files directly you’ll need to update the `includePaths` of Node Sass. + +``` +node_modules/ionic-angular/themes +``` + +Next, to include Ionic into your custom Sass file you’ll need to update the Ionic import to this: + +``` +@import "ionic.theme.default"; +``` + +#### Typings + +Any type definitions for third party libraries that are included via the `typings` tool and are included in the the typings.json file should +be updated to use `npm @types`. An example of how this looks is: + +``` +npm install @types/lodash --save-dev --save-exact +``` + +Delete the `typings.json` file, and the `typings` directory. + +#### Storage + +The storage utilities have been moved outside of the framework to a separate library called `@ionic/storage`. + +This library can be installed by executing the following command: + +``` +npm install @ionic/storage --save --save-exact +``` + +It must be included in the app's `NgModule` list of `providers`: + +``` +import { Storage } from '@ionic/storage'; + +... + +@NgModule({ + ... + providers: [Storage] +}) + +``` + +It can then be injected into any class that needs access to it: + +``` +import { Storage } from '@ionic/storage'; + +... + +export class MyAwesomePage { + constructor(public storage: Storage) { + } + + ionViewDidEnter() { + + this.storage.get('myKey').then( (value:any) => { + console.log('My value is:', value); + }); + } +} +``` + +### Steps to Upgrade to RC0 + +We are providing 2 ways to update your app with this release. The first way will guide you through creating a new Ionic 2 project and copying your project files to it. This is the easiest way to update your app in our opinion. The second way will step through how to update your existing project. There are a lot of steps involved with this way, and we recommend viewing our conference app for any clarification if you choose this way. This is it! We don’t plan on making any more major API changes after this version. + +Note: For details on NgModules you can read the Angular docs on them [here](https://angular.io/docs/ts/latest/guide/ngmodule.html) + +#### Copying Your Project to a New Project + +1. Install the latest Ionic CLI: + +``` +npm install -g ionic +``` +Note: if you have installed the beta cli you should run `npm uninstall -g ionic` first. + + +2. Create a new Ionic 2 RC0 app: + +``` +ionic start --v2 myApp +``` + +3. Copy/paste all of your pages from `app/pages/` of your beta.11 app to `src/pages/`, providers from `app/providers` to `src/providers` pipes from `app/pipes` to `src/pipes` and any custom components to `src/components` in the new RC0 app. + +4. Modify all `templateUrl`'s to be relative to the `.ts` file. For example in `app.component.ts` the url should change from `build/app.html` to `app.html` and in a page referencing `about.html` from `build/pages/about/about.html` to `about.html`. + +5. Import and add each of your pages to the `declarations` array and the `entryComponents` array in `src/app/app.module.ts. + +6. Import and add each of your custom components to the `declarations` array in `src/app/app.module.ts`. + +7. Import and add each of your providers to the `providers` array in `src/app/app.module.ts`. + +8. Remove any use of the `providers` entry in `@Component` from your pages. + +9. Change any uses of the `private` TypeScript keyword to `public`. + +10. Change `