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

feat(rtl): menu update side in runtime #11336

Closed
wants to merge 79 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
5ee1e8e
feat(menu-types): move functionality from constructor
AmitMY Apr 23, 2017
635832c
fix(menu): correct side storing and isRightSide
AmitMY Apr 23, 2017
e4573a0
fix(menu): update type when direction changes
AmitMY Apr 23, 2017
d7bec87
fix(lint): unused import
AmitMY May 20, 2017
fbb0713
Merge remote-tracking branch 'upstream/master'
AmitMY May 25, 2017
b6c9255
Merge branch 'master' into menu-runtime
AmitMY May 26, 2017
813e7ee
fix(menu): right should be always on the right
AmitMY May 26, 2017
1ab886a
fix(menu): abstract the MenuType class
AmitMY May 26, 2017
4be9fa1
feat(e2e-menu): add option to change dir on the fly
AmitMY May 26, 2017
26a10e4
Merge remote-tracking branch 'remotes/upstream/master' into menu-runtime
AmitMY Jun 6, 2017
1cda966
fix(test): change test to start and end
AmitMY Jun 6, 2017
95f17fe
Merge remote-tracking branch 'remotes/upstream/master' into menu-runtime
AmitMY Jun 7, 2017
5b665c4
fix(typo):
AmitMY Jun 8, 2017
4957802
Merge remote-tracking branch 'remotes/upstream/master' into menu-runtime
AmitMY Jun 9, 2017
a91a68e
style(util): remove commented out test css
brandyscarney Jun 12, 2017
47e3c70
fix(refresher): border should only show when pulled (#12015)
Manduro Jun 12, 2017
c10f72b
fix(keyboard): big keyboard/input refactor
manucorporat Jun 7, 2017
6dee17b
Merge branch 'keyboard-fixes'
manucorporat Jun 12, 2017
ef85ba6
fix(input): add correct translate3d for rtl
manucorporat Jun 12, 2017
8041eed
fix(input): use all supported attributes on both textareas and inputs…
Manduro Jun 13, 2017
9f86e10
fix(input): better handling of attributes
manucorporat Jun 13, 2017
dc958c3
fix(textarea): apply classes properly
manucorporat Jun 13, 2017
54ac2e3
fix(input): slightly longer delay for autofocus (#12037)
Manduro Jun 14, 2017
2791c40
chore(changelog): 3.4.0 release
danbucholtz Jun 15, 2017
f149c5e
chore(dependencies): update package version to 3.4.0
danbucholtz Jun 15, 2017
3564bcf
chore(github): update issue template plunkr to 3.4.0 version
danbucholtz Jun 15, 2017
7a1342c
fix(input): prevent duplicated tabIndex (#12043)
manucorporat Jun 15, 2017
2743c63
refactor(overlay): simplify focusOutActiveElement (#12023)
manucorporat Jun 15, 2017
c7645ee
feat(select): add compareWith Input for object value comparison (#11965)
zakton5 Jun 15, 2017
5a5da39
fix(highlight): selected tab might be null
manucorporat Jun 15, 2017
1a4aacf
chore(changelog): add upgrade instructions for 3.4.0
danbucholtz Jun 15, 2017
6193560
fix(sliding-item): super slow device does get correct classes
manucorporat Jun 15, 2017
63f728f
feat(item-reorder): add side support (#11642)
AmitMY Jun 15, 2017
8bd2f24
perf(item): button-effect is hidden for non buttons
manucorporat May 5, 2017
7803998
style(reorder): using const
manucorporat Jun 15, 2017
a8731df
fix(tabs): properly align tabs highlight (#11619)
dudeofawesome Jun 15, 2017
877d821
chore(changelog): fix typo, update deps to latest
danbucholtz Jun 16, 2017
1ca7df7
fix(themes): change default app-direction
brandyscarney Jun 16, 2017
5094fee
chore(ionic): release 3.4.1
brandyscarney Jun 16, 2017
70b5b6b
fix(rtl): use multi direction in order to override the default ltr
brandyscarney Jun 16, 2017
d8b65da
chore(ionic): release 3.4.2
brandyscarney Jun 16, 2017
e3a8d27
fix(select): floating label
manucorporat Jun 19, 2017
5cad965
feature(navigation): modify urls to support multiple root level navs/…
danbucholtz Jun 19, 2017
00fbded
chore(build): strictly enforce metadata
danbucholtz Jun 19, 2017
bcc85d9
chore(build): fix path issue in snapshot test
danbucholtz Jun 19, 2017
6f7acdb
docs(changelog): fix broken commit links
brandyscarney Jun 20, 2017
f39c381
fix(navigation): add isTab check to getSegmentsFromNav
danbucholtz Jun 20, 2017
0480f73
chore(nav): fix lint errors in test
danbucholtz Jun 20, 2017
58e1d79
refactor(app): refactor app slightly to maintain backwards compatibility
danbucholtz Jun 20, 2017
1beef75
refactor(navigation): refactor nav-controller-base to maintain backwa…
danbucholtz Jun 20, 2017
30f69c8
fix(navigation): fallback to name if component does not exist on segment
danbucholtz Jun 20, 2017
fba6ff0
add href for additional testing
danbucholtz Jun 20, 2017
86495e1
docs(api): angularjs to angular
janpio Jun 20, 2017
0f5c47d
feature(navigation): better browser back/forward button support
danbucholtz Jun 27, 2017
016b90d
fix(tabs): use segment if it exists even if component exists
danbucholtz Jun 27, 2017
bc7bb21
docs(menu): fix link to menucontroller
mhartington Jun 28, 2017
8dc08f9
fix(select): _inputUpdated should not be called manually
manucorporat Jun 28, 2017
a92d805
chore(changelog): 3.5.0 changelog
danbucholtz Jun 28, 2017
048af1b
chore(changelog): additional nav change details
danbucholtz Jun 28, 2017
5771543
chore(dependencies): update app-scripts to 1.3.11, add npm 5 support
danbucholtz Jun 28, 2017
a7e5fa7
chore(dependencies): lock file updated
danbucholtz Jun 28, 2017
486bff0
feat(navigation): support for named ion-nav/ion-tabs to improve url i…
danbucholtz Jun 29, 2017
48b3243
fix(navigation): mark as not transitioning on success in addition to …
danbucholtz Jun 29, 2017
04e78d8
fix(navigation): fix swipe-to-go-back
danbucholtz Jun 30, 2017
fce4422
fix(navigation): navs can have n child navs instead of just one
danbucholtz Jun 30, 2017
3f39e14
fix(tabs): have tabs behavior match nav when navigating back/forth vi…
danbucholtz Jul 3, 2017
eb830d4
chore(app): fix linting issues
danbucholtz Jul 3, 2017
efd5475
chore(lint): fix all code that doesn't pass tslint
danbucholtz Jul 5, 2017
d22d77b
fix(navigation): restore getActiveChildNav method to maintain old API…
danbucholtz Jul 6, 2017
5a4b351
chore(build): remove linting checks we do not want for dist
jgw96 Jul 6, 2017
e079f77
chore(build): use cross-spawn instead of spawn
jgw96 Jul 6, 2017
923e3b2
chore(build): import spawnSync from correct package
jgw96 Jul 6, 2017
3e3a00b
chore(lockfile): idk why this thing keeps updating
danbucholtz Jul 6, 2017
b5aa304
fix(sliding-item): ionSwipe event is fired (#12157)
manucorporat Jul 10, 2017
693c1c5
docs(content): type Sroll => Scroll (#12281)
janpio Jul 10, 2017
ad25cd1
fix(select): not activated on enter in input field
manucorporat Jul 10, 2017
08be9dc
fix(navigation): ts2.4 compatibility
RoopeHakulinen Jul 10, 2017
9ffc52b
chore(dependencies): recreate lockfile with npm 5.1
danbucholtz Jul 12, 2017
4eb5f85
merge with master
AmitMY Jul 13, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

For Ionic V1 issues - http://plnkr.co/edit/Xo1QyAUx35ny1Xf9ODHx?p=preview

For Ionic issues - http://plnkr.co/edit/z0DzVL?p=preview
For Ionic issues - http://plnkr.co/edit/cpeRJs?p=preview
-->

**Related code:**
Expand Down
124 changes: 124 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,127 @@
<a name="3.5.0"></a>
# [3.5.0](https://github.com/ionic-team/ionic/compare/v3.4.2...v3.5.0) (2017-06-28)

### Steps to Upgrade

`ionic-angular` should be set to version `3.5.0`.

```
npm install [email protected] --save --save-exact
```

### Notes
There were major improvements made to navigation in this release of `ionic-angular`. Specifically, we updated Ionic to support a concept of `n` root navigation elements, instead of just one. This will enable first-class url support for things `split-pane`. Before `3.5.0`, only one section of the screen could be represented in the URL. With these changes, multiple sections can be. Another large change was improving the behavior surrounding browser behaviors, such as the back-and-forward buttons, as well as refresh. In general, Ionic should work much more intuitively in a web browser now.

As a result of these improvements, if you're using deep linking, the urls of the application will be different with `3.5.0` than they were with previous Ionic releases. The URLs will likely change again in the near future with the next round of navigation improvements too. For now, we don't recommend using `href` attributes in the application. Using the `navPush` and `navPop` directives is a better option for now while URL support is being built-out.

### Bug Fixes

* **navigation:** add isTab check to getSegmentsFromNav ([f39c381](https://github.com/ionic-team/ionic/commit/f39c381))
* **navigation:** fallback to name if component does not exist on segment ([30f69c8](https://github.com/ionic-team/ionic/commit/30f69c8))
* **select:** _inputUpdated should not be called manually ([8dc08f9](https://github.com/ionic-team/ionic/commit/8dc08f9))
* **select:** floating label ([e3a8d27](https://github.com/ionic-team/ionic/commit/e3a8d27)), closes [#12068](https://github.com/ionic-team/ionic/issues/12068)
* **tabs:** use segment if it exists even if component exists ([016b90d](https://github.com/ionic-team/ionic/commit/016b90d))



<a name="3.4.2"></a>
## [3.4.2](https://github.com/ionic-team/ionic/compare/v3.4.1...v3.4.2) (2017-06-16)


### Bug Fixes

* **rtl:** use multi direction in order to override the default ltr ([70b5b6](https://github.com/ionic-team/ionic/commit/70b5b6))



<a name="3.4.1"></a>
## [3.4.1](https://github.com/ionic-team/ionic/compare/v3.4.0...v3.4.1) (2017-06-16)


### Bug Fixes

* **themes:** change default app-direction ([1ca7df](https://github.com/ionic-team/ionic/commit/1ca7df))



<a name="3.4.0"></a>
# [3.4.0](https://github.com/ionic-team/ionic/compare/v3.3.0...v3.4.0) (2017-06-15)

### Steps to Upgrade

`ionic-angular` should be set to version `3.4.0` in the package.json dependency list. The latest `@angular` release `4.1.3` is also supported. Feel free to update apps by updating the `package.json` dependencies to match below.

```
"dependencies": {
"@angular/common": "4.1.3",
"@angular/compiler": "4.1.3",
"@angular/compiler-cli": "4.1.3",
"@angular/core": "4.1.3",
"@angular/forms": "4.1.3",
"@angular/http": "4.1.3",
"@angular/platform-browser": "4.1.3",
"@angular/platform-browser-dynamic": "4.1.3",
"@ionic-native/core": "3.12.1",
"@ionic-native/splash-screen": "3.12.1",
"@ionic-native/status-bar": "3.12.1",
"@ionic/storage": "2.0.1",
"ionic-angular": "3.4.2",
"ionicons": "3.0.0",
"rxjs": "5.4.0",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.12"
},
"devDependencies": {
"@ionic/app-scripts": "1.3.7",
"typescript": "2.3.4"
}
```

### Bug Fixes

* **button:** rtl fix for md ripple effect ([#11842](https://github.com/ionic-team/ionic/issues/11842)) ([bb966e5](https://github.com/ionic-team/ionic/commit/bb966e5))
* **content:** scroll content should inherit background ([#11467](https://github.com/ionic-team/ionic/issues/11467)) ([6256b0f](https://github.com/ionic-team/ionic/commit/6256b0f))
* **datetime:** set datetime direction the same on ltr and rtl ([#11992](https://github.com/ionic-team/ionic/issues/11992)) ([20c9dd7](https://github.com/ionic-team/ionic/commit/20c9dd7))
* **gesture:** RTL fix for slide-gesture ([#11822](https://github.com/ionic-team/ionic/issues/11822)) ([59a1e3d](https://github.com/ionic-team/ionic/commit/59a1e3d))
* **input:** add correct translate3d for rtl ([ef85ba6](https://github.com/ionic-team/ionic/commit/ef85ba6)), closes [#11745](https://github.com/ionic-team/ionic/issues/11745) [#11211](https://github.com/ionic-team/ionic/issues/11211)
* **input:** better handling of attributes ([9f86e10](https://github.com/ionic-team/ionic/commit/9f86e10))
* **input:** slightly longer delay for autofocus ([#12037](https://github.com/ionic-team/ionic/issues/12037)) ([54ac2e3](https://github.com/ionic-team/ionic/commit/54ac2e3))
* **input:** use all supported attributes on both textareas and inputs ([#12028](https://github.com/ionic-team/ionic/issues/12028)) ([8041eed](https://github.com/ionic-team/ionic/commit/8041eed))
* **item-sliding:** RTL fix for item sliding ([#11825](https://github.com/ionic-team/ionic/issues/11825)) ([10f4df4](https://github.com/ionic-team/ionic/commit/10f4df4))
* **keyboard:** big keyboard/input refactor ([c10f72b](https://github.com/ionic-team/ionic/commit/c10f72b)), closes [#9699](https://github.com/ionic-team/ionic/issues/9699) [#11484](https://github.com/ionic-team/ionic/issues/11484) [#11389](https://github.com/ionic-team/ionic/issues/11389) [#11325](https://github.com/ionic-team/ionic/issues/11325) [#11291](https://github.com/ionic-team/ionic/issues/11291) [#10828](https://github.com/ionic-team/ionic/issues/10828) [#11291](https://github.com/ionic-team/ionic/issues/11291) [#10393](https://github.com/ionic-team/ionic/issues/10393) [#10257](https://github.com/ionic-team/ionic/issues/10257) [#9434](https://github.com/ionic-team/ionic/issues/9434) [#8933](https://github.com/ionic-team/ionic/issues/8933) [#7178](https://github.com/ionic-team/ionic/issues/7178) [#7047](https://github.com/ionic-team/ionic/issues/7047) [#10552](https://github.com/ionic-team/ionic/issues/10552) [#10393](https://github.com/ionic-team/ionic/issues/10393) [#10183](https://github.com/ionic-team/ionic/issues/10183) [#10187](https://github.com/ionic-team/ionic/issues/10187) [#10852](https://github.com/ionic-team/ionic/issues/10852) [#11578](https://github.com/ionic-team/ionic/issues/11578)
* **menu:** rtl gesture for menu ([#11830](https://github.com/ionic-team/ionic/issues/11830)) ([30047f0](https://github.com/ionic-team/ionic/commit/30047f0))
* **refresher:** border should only show when pulled ([#12015](https://github.com/ionic-team/ionic/issues/12015)) ([47e3c70](https://github.com/ionic-team/ionic/commit/47e3c70)), closes [#10994](https://github.com/ionic-team/ionic/issues/10994)
* **rtl:** add icon-start and icon-end attributes ([#11737](https://github.com/ionic-team/ionic/issues/11737)) ([a40b872](https://github.com/ionic-team/ionic/commit/a40b872))
* **sass:** add default flag to variables ([#11779](https://github.com/ionic-team/ionic/issues/11779)) ([f14d7d6](https://github.com/ionic-team/ionic/commit/f14d7d6))
* **searchbar:** caret moving to the end when typing ([261bc4d](https://github.com/ionic-team/ionic/commit/261bc4d))
* **segment:** fix border-radius logic for RTL ([#11981](https://github.com/ionic-team/ionic/issues/11981)) ([6db8c14](https://github.com/ionic-team/ionic/commit/6db8c14))
* **select:** add cssClass for popover interface ([#11769](https://github.com/ionic-team/ionic/issues/11769)) ([1c25acb](https://github.com/ionic-team/ionic/commit/1c25acb))
* **select:** return undefined when there are no options ([#11968](https://github.com/ionic-team/ionic/issues/11968)) ([dc6c586](https://github.com/ionic-team/ionic/commit/dc6c586)), closes [#10435](https://github.com/ionic-team/ionic/issues/10435)
* **split-pane:** correct split-pane menu side order ([30dc247](https://github.com/ionic-team/ionic/commit/30dc247))
* **textarea:** apply classes properly ([dc958c3](https://github.com/ionic-team/ionic/commit/dc958c3))
* **toggle:** RTL fix for toggle ([2afb936](https://github.com/ionic-team/ionic/commit/2afb936))
* **toolbar:** get the correct contrast color for md mode ([0f4ed1c](https://github.com/ionic-team/ionic/commit/0f4ed1c)), closes [#11848](https://github.com/ionic-team/ionic/issues/11848)
* **toolbar:** use the correct contrast color for MD toolbar ([041689b](https://github.com/ionic-team/ionic/commit/041689b)), closes [#11848](https://github.com/ionic-team/ionic/issues/11848)
* **transition:** RTL fix for transition on ios ([#11820](https://github.com/ionic-team/ionic/issues/11820)) ([6322134](https://github.com/ionic-team/ionic/commit/6322134))


### Features

* **background-position:** add background position support for rtl ([#11946](https://github.com/ionic-team/ionic/issues/11946)) ([305c306](https://github.com/ionic-team/ionic/commit/305c306))
* **loading:** add enableBackdropDismiss to Loading ([#11937](https://github.com/ionic-team/ionic/issues/11937)) ([d0ae810](https://github.com/ionic-team/ionic/commit/d0ae810)), closes [#7975](https://github.com/ionic-team/ionic/issues/7975)
* **loading:** add margin start variable ([#11980](https://github.com/ionic-team/ionic/issues/11980)) ([3e0d43e](https://github.com/ionic-team/ionic/commit/3e0d43e))
* **rtl:** add transform and transform-origin support for rtl ([#11649](https://github.com/ionic-team/ionic/issues/11649)) ([2273fb5](https://github.com/ionic-team/ionic/commit/2273fb5))
* **rtl:** optimize the new mixins for smaller bundle, ltr separation ([#11635](https://github.com/ionic-team/ionic/issues/11635)) ([f0c6948](https://github.com/ionic-team/ionic/commit/f0c6948))
* **rtl:** support flipped svg background images on rtl ([#11945](https://github.com/ionic-team/ionic/issues/11945)) ([f4452b5](https://github.com/ionic-team/ionic/commit/f4452b5))
* **slides:** support centering slides and using decimal numbers ([e3c60c5](https://github.com/ionic-team/ionic/commit/e3c60c5)), closes [#10361](https://github.com/ionic-team/ionic/issues/10361)


### Performance Improvements

* **item-sliding:** remove duplicate class ([#11829](https://github.com/ionic-team/ionic/issues/11829)) ([c9cb9ae](https://github.com/ionic-team/ionic/commit/c9cb9ae))



<a name="3.3.0"></a>
# [3.3.0](https://github.com/ionic-team/ionic/compare/v3.2.1...v3.3.0) (2017-05-24)

Expand Down
4 changes: 2 additions & 2 deletions demos/src/alert/pages/page-one/page-one.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ export class PageOne {
buttons: [
{
text: 'Cancel',
handler: (data) => {
handler: () => {
console.log('Cancel clicked');
}
},
{
text: 'Save',
handler: (data) => {
handler: () => {
console.log('Saved clicked');
}
}
Expand Down
2 changes: 1 addition & 1 deletion demos/src/events/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class AppComponent {
this.listenToLoginEvents();
}

openPage(menu: any, page: any) {
openPage(_: any, page: any) {
// find the nav component and set what the root page should be
// reset the nav to remove previous pages and only have this page
// we wouldn't want the back button to show in this scenario
Expand Down
2 changes: 1 addition & 1 deletion demos/src/item-sliding/pages/page-one/page-one.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class PageOne {
this.expandAction(item, 'downloading', 'Login was downloaded.');
}

expandAction(item: ItemSliding, action: string, text: string) {
expandAction(item: ItemSliding, _: any, text: string) {
// TODO item.setElementClass(action, true);

setTimeout(() => {
Expand Down
14 changes: 14 additions & 0 deletions demos/src/select/pages/page-one/page-one.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
</ion-select>
</ion-item>

<ion-item>
<ion-label>Hair Color</ion-label>
<ion-select [(ngModel)]="hairColor" okText="Okay" cancelText="Dismiss" [compareWith]="compareFn">
<ion-option *ngFor="let o of hairColorData" [value]="o">{{o.text}}</ion-option>
</ion-select>
</ion-item>

<ion-item>
<ion-label>Gaming</ion-label>
<ion-select [(ngModel)]="gaming" okText="Okay" cancelText="Dismiss">
Expand Down Expand Up @@ -147,6 +154,13 @@
</ion-select>
</ion-item>

<ion-item>
<ion-label>Skittles</ion-label>
<ion-select [(ngModel)]="skittles" multiple="true" okText="Okay" cancelText="Dismiss" [compareWith]="compareFn">
<ion-option *ngFor="let o of skittlesData" [value]="o">{{o.text}}</ion-option>
</ion-select>
</ion-item>

<ion-item>
<ion-label>Disabled</ion-label>
<ion-select multiple disabled="true">
Expand Down
32 changes: 32 additions & 0 deletions demos/src/select/pages/page-one/page-one.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export class PageOne {
petAlertOpts: any;
petData: any;
pets: Array<string>;
hairColorData: any;
hairColor: any;
skittlesData: any;
skittles: Array<any>;
notifications: string = 'mute_1';
rating: number = 2;

Expand All @@ -31,9 +35,37 @@ export class PageOne {
{ text: 'Honey Badger', value: 'honeybadger' },
];

this.hairColorData = [
{ text: 'Brown', value: 'brown' },
{ text: 'Blonde', value: 'blonde' },
{ text: 'Black', value: 'black' },
{ text: 'Red', value: 'red' }
];

// Pre-selected object with different object reference
this.hairColor = { text: 'Brown', value: 'brown' };

this.skittlesData = [
{ text: 'Red', value: 'red' },
{ text: 'Orange', value: 'orange' },
{ text: 'Yellow', value: 'yellow' },
{ text: 'Green', value: 'green' },
{ text: 'Purple', value: 'purple' }
];

// Pre-selected object with different object reference
this.skittles = [
{ text: 'Red', value: 'red' },
{ text: 'Purple', value: 'purple' }
];

this.pets = ['cat', 'dog'];
}

compareFn(option1: any, option2: any) {
return option1.value === option2.value;
}

monthChange(val: any) {
console.log('Month Change:', val);
}
Expand Down
Loading