Skip to content

Commit

Permalink
docs(all): refactor docs and add multiple demos to api docs
Browse files Browse the repository at this point in the history
* docs(navctrl): move content from api doc to top-level nav doc

* docs(action sheet): edit and clarify docs

* docs(action sheet): expose ActionSheet and edit docs

* docs(action sheet): make link path relative and refine docs

* docs(action sheet): fix typo

* docs(action sheet): clean up table formatting

* docs(alert): refactor, add examples, and edit API doc

* docs(alert): fix typos

* docs(alert, action sheet): move page transition doc under advanced

* docs(avatar): add usage example and edit doc

* docs(button): refactor docs and add content from component doc

* docs(card): refactor and incorporate samples from component doc

* docs(checkbox): minor edit

* docs(chip): Add note about MD

* docs(icon): refactor and integrate examples from component doc

* docs(app): fix typo

* docs(config): refactor and edit

* docs(datetime): edit

* docs(gesture): add gesture docs

* docs(gesture): further edit doc

* docs(button, datetime, icon): standardize use of attribute vs input property

* docs(button): change wording from attribute to directive

* docs(input): edit docs and move label examples to Label api doc

* docs(input): add ion-item to code sample

* docs(input): add inset iunput sample

* docs(label): edit doc

* docs(label): add descrition of attributes

* docs(list): refactor and edit doc

* docs(list): add basic usage example

* docs(toolbar, header, footer): refactor and edit docs

* docs(tabs): edit and incorporate examples from old component doc

* docs(navctrl): migrate majority of content to top-level navigation controller doc

* chore(img): fix typos

* docs(virtual scroll): remove instance members

* docs(virtual scroll): increase header sizes

* docs(menu): add related links to all menu docs

* docs(nav): update related docs for all nav docs

* docs(navbar): edit and hide some private instance members

* docs(content): add no-bounce to doc

* docs(fab): fix fab demo

closes ionic-team/ionic-site#947

* docs(note): edit

* fix(list): add border to last item in MD list (#9679)

* fix(list): fixes #9619

* chore(list): make my sass legit

* chore(list): remove from ios and wp css

* fix(scroll): handle low duration in scrollTo

* fix(input): only add padding right if it has clear input

fixes #9865

* docs(nav-controller): fix escape char in Lifecycle table

the pipe before `Promise` adds a new column to the table which makes it push the description to a narrow column. Tried to fix it with replacing the pipe by the HTML ASCII pipe char.

* docs(menu-toggle): fix broken link

path correction in description 
old -> nav/NavBar
new -> navbar/Navbar

* docs(demos): add demos from old component docs

* refactor(package.json, demo template, gulp): Update demo build for new multi-demo api docs

* refactor(demos): update demos for new multi-demo api docs

* docs(api): update api docs for new demo file structure

* refactor: improve tree shaking abilities

Internal refactor completed in order to improve tree shaking and dead
code removal. The public API, with an exception to ion-slides, has
stayed the same. However, internally many changes were required so
bundlers could better exclude modules which should not be bundled.
Ultimately most changes resorted to removing references to `window` or
`document`, or a module that referenced one of those.

BREAKING CHANGES

ion-slides was refactored to remove the external dependencies, and
rewritten in TypeScript/ES6 modules to again improve tree shaking
abilities.

* chore(build): run a 'clean' before running 'validate'

run a 'clean' before running 'validate'

* docs(menu): fix typos in menu-controller.ts (#9923)

Typo errors.

* docs(slides): fix docs

* fix(clickblock): add NavOptions.minClickBlockDuration

* feat(clickblock): ability to set a minimum duration for click block

* fix(clickblock): add NavOptions.minClickBlockDuration

* chore(clickblock): comment out test css

* test(app): fix failing clickblock tests (#9938)

* doc(navParams): update links to push and nav
Closes ionic-team/ionic-site#957

* test(clickblock): add new tests for minDuration

* docs(slides): deprecation notice typo's (#9932)

* fix(platform): only set isPortrait when the width/height is set

* test(tabs): fix ngc error in advanced test

* docs(input): add example for ion-textarea

* docs(hide-when): add hide-when demo back

* docs(demos): update colors for API demos

* chore(ionic): release rc.5

* docs(menu): update menu docs
Closes ionic-team/ionic-site#951

* docs(changelog): unsmarten quotes on sw-toolbox dep (#9966)

* docs(avatar): fix typo (#9965)

place to placed

* docs(nav): fix typos in comments for NavControllerBase and ViewController (#9953)

* docs(nav): fix typo

* docs(view): fix typo

* docs(slides): update slides docs (#9968)

Change the `pager` description.
Change the `paginationType` input type.

* chore: add void return value for some callback signatures (#9967)

* chore(noImplicitAny): add noImplicitAny to tsconfig

* feat(slides): expose more options (#9992)

* feat(slides): expose more options
Closes #9988
Exposes slidesPerView and spaceBetween. Also documents how to change
unexposed options

* docs(slides): update advanced usage

* chore: fix incorrect execution of node binaries (#9962)

* chore: fix incorrect execution of node binaries

* Currently gulp runs the `ngc` by manually calling the `./node_modules/.bin/ngc` file (by assuming it's a node script)
  This is not always correct, because often package managers like (npm or yarn) create bash files for the package binaries.

* Using `resolve-bin` to properly determine the path to the *real* node script and then we can assume it's a node file.

Fixes #8341

* Remove extra newline

* feat(slides): add swiper controller (#9983)

* chore(slides): fix errors with noImplicitAny

* fix(checkbox): set disabled state from FormControl

* fix(datetime): set disabled state from FormControl

* fix(range): set disabled state from FormControl

* fix(select): set disabled state from FormControl

* fix(toggle): set disabled state from FormControl

* feat(radio): add disabled to radio-group and support disabled formcontrol

fixes #9998

* feat(slides): add option for paginationBulletRender

Closes #10002

* fix(input): pass disabled down to input when it is set from form

- test modified to disable username and comments on `input/form-inputs`
and then toggle them via a button

see: http://g.recordit.co/RkN510TcHk.gif

fixes #9834

* fix(item-sliding): don't error or allow swipes with no options

Added items with the following use cases:

1. Sliding item without options
2. Sliding item with one set of dynamic options that toggle
3. Sliding item with two options, one dynamic

Removing my code will cause errors in all of the above examples.

Fixes #9914

* fix(nav): fixes #9558 (#9767)

* chore(e2e): rename app-module.ts to app.module.ts for consistency

references #10023

* fix(tap): allow document to be tap polyfilled

Closes #9726

* docs(slides): document spaceBetween and slidesPerView

* Update README.md

* Fix url is not correct after selecting tabs

Update deeplinker's updateNav after tabSwitchEnd so deeplinker gets the
right active navchild.

* fix(slides): allow auto to be passed
Closes #10000. Closes #10037

* docs(tabs): fix description of tabsHideOnSubPages
Closes #10061

* docs(popover): add import to example code
Closes #10053

* docs(nav-controller): fix param name and type

* fix(tabs): ionChange event is dispatched after the switch

* docs(popover): expose popover docs and reconcile with PopoverController

* docs(modal): expose modal docs and reconcile with ModalController

* docs(toast): expose toast docs and reconcile with ToastController

* docs(demos): add missing demos - copied from preview app

* docs(demos): include demos in docs that didn't have one

* fix(alert): input missing id attribute from input options

fixes #9457

* fix(modal): overlay-zindex is not changed in back direction

fixes #9409

* fix(content): unsubscribe from viewCtrl observables after content ins… (#10050)

* fix(content): unsubscribe from observables on destroy

* fix(content): scroll is initialized before subscribing

fixes #9593
fixes #10045

* fix(content): unset viewCtrl subscribers on destroy

* test(icon): app module was being ignored by my global gitignore

* chore(scripts): update e2e prod build to work with ionic-app-scripts (#10083)

* chore(e2e): WIP to add files needed for app-scripts

* chore(e2e): WIP one e2e test building but with errors

* chore(e2e): move e2e.prod to working with app-scripts

move shared functions into util, add support for debug flag when
running e2e.prod / demos.prod which gets passed to app-scripts

* chore(build): fix app-scripts build for all e2e and demos

* chore(e2e): update ionic-angular import path

* chore(build): update dev paths to work with prod

* chore(e2e): get watch working with e2e prod

* docs(scripts): update README for running e2e and demos

closes #8411
closes #10023

* docs(config): fix demo for config page not updating. #9413 (#9418)

* docs(config): update demo for config, add more logs for app-scripts

closes #9413

* docs(demos): fix bugs and integrate multiple demos on api docs

* chore(virtual-scroll): set IterableDiffer to any

Adding this to avoid an angular version issue.

* chore(swiper): fix reference for closure advanced

* chore(scripts): update app-scripts to run via node, remove snapshot clean

* refactor(package.json): remove unneeded script
  • Loading branch information
amuramoto authored and mhartington committed Jan 20, 2017
1 parent d636fc9 commit dde9b5d
Show file tree
Hide file tree
Showing 611 changed files with 16,379 additions and 15,879 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*~
*.sw[mnpcod]
*.log
*.lock
*.tmp
*.tmp.*
log.txt
Expand Down
71 changes: 71 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,74 @@
<a name="2.0.0-rc.5"></a>
# [2.0.0-rc.5](https://github.com/driftyco/ionic/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2017-01-11)

### Updating to 2.0.0-rc.5

1. Update to the latest version of the Ionic CLI:

```
npm uninstall -g ionic
npm install -g ionic
```

2. Update your `package.json` to match the following dependencies, remove existing `node_modules` directory, and then run `npm install`:

```
"dependencies": {
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/compiler-cli": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/platform-server": "2.2.1",
"@ionic/storage": "1.1.7",
"ionic-angular": "2.0.0-rc.5",
"ionic-native": "2.2.11",
"ionicons": "3.0.0",
"rxjs": "5.0.0-beta.12",
"zone.js": "0.6.26",
"sw-toolbox": "3.4.0"
},
"devDependencies": {
"@ionic/app-scripts": "1.0.0",
"typescript": "2.0.9"
}
```

Note: please ensure you are using the exact TypeScript and Angular versions listed above. There have been issues with the latest versions.


### What’s changed?
Internal refactor completed in order to improve tree shaking and dead code removal. The public API, with the exception of the slides component, has stayed the same. However, internally many changes were required so bundlers could better exclude modules which should not be bundled. Ultimately most changes resorted to removing references to `window` or `document`, or a module that referenced one of those.

### What’s new?
Service Worker Toolbox ([sw-toolbox](https://googlechrome.github.io/sw-toolbox/docs/releases/v3.2.0/)) is now built in to the starters and conference app. This allows you to customize your service worker using a high level API instead of using the raw service worker API. Our out of the box configuration will give your app a good, network independent experience but you can easily customize this to fit your app’s unique use cases.


### BREAKING CHANGES

#### Slides

ion-slides was refactored to remove the external dependencies, and rewritten in TypeScript/ES6 modules to again improve tree shaking abilities. In order to work with tree shaking, the `options` attribute had to be removed. See the [Slides API Documentation](http://ionicframework.com/docs/v2/api/components/slides/Slides/) for usage information.


### Bug Fixes

* **clickblock:** add NavOptions.minClickBlockDuration ([8ca9797](https://github.com/driftyco/ionic/commit/8ca9797))
* **datetime:** enable custom day values ([#9708](https://github.com/driftyco/ionic/issues/9708)) ([acba3c0](https://github.com/driftyco/ionic/commit/acba3c0)), closes [#7190](https://github.com/driftyco/ionic/issues/7190) [#7190](https://github.com/driftyco/ionic/issues/7190)
* **input:** fix the text jumping for stacked/floating inputs on iOS ([877fcf1](https://github.com/driftyco/ionic/commit/877fcf1)), closes [#9605](https://github.com/driftyco/ionic/issues/9605)
* **input:** only add padding right if it has clear input ([717cada](https://github.com/driftyco/ionic/commit/717cada)), closes [#9865](https://github.com/driftyco/ionic/issues/9865)
* **input:** remove click events from disabled inputs ([#9676](https://github.com/driftyco/ionic/issues/9676)) ([22ba043](https://github.com/driftyco/ionic/commit/22ba043)), closes [#9070](https://github.com/driftyco/ionic/issues/9070)
* **list:** add border to last item in MD list ([#9679](https://github.com/driftyco/ionic/issues/9679)) ([64346bd](https://github.com/driftyco/ionic/commit/64346bd)), closes [#9619](https://github.com/driftyco/ionic/issues/9619)
* **overlay:** don't call to dismiss pages if the view is an overlay ([8b25798](https://github.com/driftyco/ionic/commit/8b25798))
* **platform:** only set isPortrait when the width/height is set ([e9adab0](https://github.com/driftyco/ionic/commit/e9adab0))
* **scroll:** handle low duration in scrollTo ([14eb2fd](https://github.com/driftyco/ionic/commit/14eb2fd))
* **show-hide-when:** remove whitespaces from conditions before check phase ([#9573](https://github.com/driftyco/ionic/issues/9573)) ([cd342c2](https://github.com/driftyco/ionic/commit/cd342c2))
* **tabs:** current tab still active if selected tab does not have a root ([f09c300](https://github.com/driftyco/ionic/commit/f09c300)), closes [#9392](https://github.com/driftyco/ionic/issues/9392) [#9811](https://github.com/driftyco/ionic/issues/9811) [#9392](https://github.com/driftyco/ionic/issues/9392)


<a name="2.0.0-rc.4"></a>
# [2.0.0-rc.4](https://github.com/driftyco/ionic/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2016-12-15)

Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ See [CONTRIBUTING.md](https://github.com/driftyco/ionic/blob/master/.github/CONT

### Ionic 2 Examples

The [Ionic Conference App](https://github.com/driftyco/ionic-conference-app) is a full featured Ionic 2 app. It is the perfect starting point for learning and building your own app.
The [Ionic Conference App](https://github.com/driftyco/ionic-conference-app) is a full featured Ionic 2 app. It is the perfect starting point for learning and building your own app.

### Ionic 1.x

The source code for Ionic 1.x has been moved to [driftyco/ionic-v1](https://github.com/driftyco/ionic-v1). Please file issues and pull requests related to Ionic 1.x at that repo. 1.x issues and PRs on this repo will be closed.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, NgModule } from '@angular/core';
import { ActionSheetController, IonicApp, IonicModule, Platform } from '../../ionic-angular';
import { ActionSheetController, IonicApp, IonicModule, Platform } from '../../../ionic-angular';


@Component({
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, NgModule } from '@angular/core';
import { AlertController, IonicApp, IonicModule } from '../../ionic-angular';
import { AlertController, IonicApp, IonicModule } from '../../../ionic-angular';


@Component({
Expand Down
File renamed without changes.
108 changes: 108 additions & 0 deletions demos/src/alert/checkbox/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
import { Component, NgModule } from '@angular/core';
import { AlertController, IonicApp, IonicModule } from '../../../ionic-angular';


@Component({
templateUrl: 'page.html'
})
export class ApiDemoPage {
testCheckboxOpen: boolean;
testCheckboxResult;

constructor(public alertCtrl: AlertController) { }

doCheckbox() {
let alert = this.alertCtrl.create();
alert.setTitle('Which planets have you visited?');

alert.addInput({
type: 'checkbox',
label: 'Alderaan',
value: 'value1',
checked: true
});

alert.addInput({
type: 'checkbox',
label: 'Bespin',
value: 'value2'
});

alert.addInput({
type: 'checkbox',
label: 'Coruscant',
value: 'value3'
});

alert.addInput({
type: 'checkbox',
label: 'Endor',
value: 'value4'
});

alert.addInput({
type: 'checkbox',
label: 'Hoth',
value: 'value5'
});

alert.addInput({
type: 'checkbox',
label: 'Jakku',
value: 'value6'
});

alert.addInput({
type: 'checkbox',
label: 'Naboo',
value: 'value6'
});

alert.addInput({
type: 'checkbox',
label: 'Takodana',
value: 'value6'
});

alert.addInput({
type: 'checkbox',
label: 'Tatooine',
value: 'value6'
});

alert.addButton('Cancel');
alert.addButton({
text: 'Okay',
handler: data => {
console.log('Checkbox data:', data);
this.testCheckboxOpen = false;
this.testCheckboxResult = data;
}
});
alert.present().then(() => {
this.testCheckboxOpen = true;
});
}
}

@Component({
template: `<ion-nav [root]="root"></ion-nav>`
})
export class ApiDemoApp {
root = ApiDemoPage;
}

@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}
10 changes: 10 additions & 0 deletions demos/src/alert/checkbox/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

<ion-header>
<ion-navbar>
<ion-title>Checkbox</ion-title>
</ion-navbar>
</ion-header>

<ion-content padding>
<button ion-button block color="danger" (click)="doCheckbox()">Show Checkbox Alert</button>
</ion-content>
56 changes: 56 additions & 0 deletions demos/src/alert/confirm/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { Component, NgModule } from '@angular/core';
import { AlertController, IonicApp, IonicModule } from '../../../ionic-angular';


@Component({
templateUrl: 'page.html'
})
export class ApiDemoPage {

constructor(public alerCtrl: AlertController) { }

doConfirm() {
let confirm = this.alerCtrl.create({
title: 'Use this lightsaber?',
message: 'Do you agree to use this lightsaber to do good across the intergalactic galaxy?',
buttons: [
{
text: 'Disagree',
handler: () => {
console.log('Disagree clicked');
}
},
{
text: 'Agree',
handler: () => {
console.log('Agree clicked');
}
}
]
});
confirm.present()
}

}

@Component({
template: `<ion-nav [root]="root"></ion-nav>`
})
export class ApiDemoApp {
root = ApiDemoPage;
}

@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}
10 changes: 10 additions & 0 deletions demos/src/alert/confirm/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

<ion-header>
<ion-navbar>
<ion-title>Confirm</ion-title>
</ion-navbar>
</ion-header>

<ion-content padding>
<button ion-button color="primary" block (click)="doConfirm()">Show Confirm Alert</button>
</ion-content>
61 changes: 61 additions & 0 deletions demos/src/alert/prompt/app.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { Component, NgModule } from '@angular/core';
import { AlertController, IonicApp, IonicModule } from '../../../ionic-angular';


@Component({
templateUrl: 'page.html'
})
export class ApiDemoPage {

constructor(public alertCtrl: AlertController) { }

doPrompt() {
let prompt = this.alertCtrl.create({
title: 'Login',
message: "Enter a name for this new album you're so keen on adding",
inputs: [
{
name: 'title',
placeholder: 'Title'
},
],
buttons: [
{
text: 'Cancel',
handler: data => {
console.log('Cancel clicked');
}
},
{
text: 'Save',
handler: data => {
console.log('Saved clicked');
}
}
]
});
prompt.present();
}
}

@Component({
template: `<ion-nav [root]="root"></ion-nav>`
})
export class ApiDemoApp {
root = ApiDemoPage;
}

@NgModule({
declarations: [
ApiDemoApp,
ApiDemoPage
],
imports: [
IonicModule.forRoot(ApiDemoApp)
],
bootstrap: [IonicApp],
entryComponents: [
ApiDemoPage
]
})
export class AppModule {}
10 changes: 10 additions & 0 deletions demos/src/alert/prompt/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

<ion-header>
<ion-navbar>
<ion-title>Prompt</ion-title>
</ion-navbar>
</ion-header>

<ion-content padding>
<button ion-button color="secondary" block (click)="doPrompt()">Show Prompt Alert</button>
</ion-content>
Loading

0 comments on commit dde9b5d

Please sign in to comment.