Skip to content

Commit

Permalink
Merge pull request #30 from ionic-team/master
Browse files Browse the repository at this point in the history
pull `master`
  • Loading branch information
abennouna authored Jan 17, 2019
2 parents 294abf3 + ceae5d2 commit bcc306a
Show file tree
Hide file tree
Showing 16 changed files with 142 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const Listr = require('listr');
async function main() {
const tasks = [];
common.packages.forEach(package => {
common.preparePackage(tasks, package);
common.preparePackage(tasks, package, false, false);
});

const listr = new Listr(tasks, { showSubtasks: true });
Expand Down
18 changes: 10 additions & 8 deletions .scripts/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function checkGit(tasks) {
const isValidVersion = input => Boolean(semver.valid(input));


function preparePackage(tasks, package, version) {
function preparePackage(tasks, package, version, install) {
const projectRoot = projectPath(package);
const pkg = readPkg(package);

Expand All @@ -78,13 +78,15 @@ function preparePackage(tasks, package, version) {
}
}
});
projectTasks.push({
title: `${pkg.name}: install npm dependencies`,
task: async () => {
await fs.remove(path.join(projectRoot, 'node_modules'))
await execa('npm', ['i'], { cwd: projectRoot });
}
});
if (install) {
projectTasks.push({
title: `${pkg.name}: install npm dependencies`,
task: async () => {
await fs.remove(path.join(projectRoot, 'node_modules'))
await execa('npm', ['i'], { cwd: projectRoot });
}
});
}
}

if (package !== 'docs') {
Expand Down
3 changes: 2 additions & 1 deletion .scripts/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ async function main() {
}

const version = await askVersion();
const install = process.argv.indexOf('--no-install') < 0;

// compile and verify packages
await preparePackages(common.packages, version);
await preparePackages(common.packages, version, install);

console.log(`\nionic ${version} prepared 🤖\n`);
console.log(`Next steps:`);
Expand Down
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
# [4.0.0-rc.2](https://github.com/ionic-team/ionic/compare/v4.0.0-rc.1...v4.0.0-rc.2) (2019-01-16)


### Bug Fixes

* **action-sheet:** remove the height shift on press and update iOS design ([#16862](https://github.com/ionic-team/ionic/issues/16862)) ([82457d8](https://github.com/ionic-team/ionic/commit/82457d8)), closes [#16715](https://github.com/ionic-team/ionic/issues/16715) [#16790](https://github.com/ionic-team/ionic/issues/16790)
* **angular:** fix slides ([#17085](https://github.com/ionic-team/ionic/issues/17085)) ([8357e5c](https://github.com/ionic-team/ionic/commit/8357e5c))
* **angular:** hide some internal methods ([#17121](https://github.com/ionic-team/ionic/issues/17121)) ([4d5dcd4](https://github.com/ionic-team/ionic/commit/4d5dcd4))
* **angular:** NavController methods return a promise ([#17106](https://github.com/ionic-team/ionic/issues/17106)) ([3aaf87a](https://github.com/ionic-team/ionic/commit/3aaf87a)), closes [#17103](https://github.com/ionic-team/ionic/issues/17103)
* **angular:** ViewChild() fix ([#17037](https://github.com/ionic-team/ionic/issues/17037)) ([27a4709](https://github.com/ionic-team/ionic/commit/27a4709)), closes [#17034](https://github.com/ionic-team/ionic/issues/17034)
* **datetime:** do no change order of formatted dates w/ rtl ([#17024](https://github.com/ionic-team/ionic/issues/17024)) ([169da37](https://github.com/ionic-team/ionic/commit/169da37))
* **fab-button:** add default padding for fab-button ([#17050](https://github.com/ionic-team/ionic/issues/17050)) ([418052f](https://github.com/ionic-team/ionic/commit/418052f))
* **icon:** fix rtl detail icon for ios ([#17016](https://github.com/ionic-team/ionic/issues/17016)) ([b4f3405](https://github.com/ionic-team/ionic/commit/b4f3405)), closes [#14958](https://github.com/ionic-team/ionic/issues/14958)
* **input:** disable shadow-dom for text inputs ([#17043](https://github.com/ionic-team/ionic/issues/17043)) ([63e0501](https://github.com/ionic-team/ionic/commit/63e0501)), closes [#17020](https://github.com/ionic-team/ionic/issues/17020)
* **input:** fix display of ion-input in narrow ion-item in Firefox ([#16978](https://github.com/ionic-team/ionic/issues/16978)) ([1099dc3](https://github.com/ionic-team/ionic/commit/1099dc3))
* **inputs:** fix styles in firefox ([#17066](https://github.com/ionic-team/ionic/issues/17066)) ([0120eee](https://github.com/ionic-team/ionic/commit/0120eee))
* **inputs:** keyboard focus improvements ([#16838](https://github.com/ionic-team/ionic/issues/16838)) ([6364e4e](https://github.com/ionic-team/ionic/commit/6364e4e)), closes [#16815](https://github.com/ionic-team/ionic/issues/16815) [#16872](https://github.com/ionic-team/ionic/issues/16872) [#13978](https://github.com/ionic-team/ionic/issues/13978) [#16610](https://github.com/ionic-team/ionic/issues/16610)
* **item:** no lines on item should take precedence over list lines ([#17049](https://github.com/ionic-team/ionic/issues/17049)) ([d2fa946](https://github.com/ionic-team/ionic/commit/d2fa946)), closes [#16900](https://github.com/ionic-team/ionic/issues/16900)
* **picker:** do not change datetime/picker column order in RTL ([#17018](https://github.com/ionic-team/ionic/issues/17018)) ([1338d71](https://github.com/ionic-team/ionic/commit/1338d71)), closes [#16294](https://github.com/ionic-team/ionic/issues/16294)
* **rtl:** fix rtl back button default ([#17109](https://github.com/ionic-team/ionic/issues/17109)) ([a9a23af](https://github.com/ionic-team/ionic/commit/a9a23af)), closes [#15357](https://github.com/ionic-team/ionic/issues/15357)
* **utils:** remove console log ([#17116](https://github.com/ionic-team/ionic/issues/17116)) ([b0f51d4](https://github.com/ionic-team/ionic/commit/b0f51d4))


### Features

* **angular:** add tabs events ([#17125](https://github.com/ionic-team/ionic/issues/17125)) ([6929bb8](https://github.com/ionic-team/ionic/commit/6929bb8))
* **angular:** expose getSelected() ([#17079](https://github.com/ionic-team/ionic/issues/17079)) ([3c801db](https://github.com/ionic-team/ionic/commit/3c801db)), closes [#17068](https://github.com/ionic-team/ionic/issues/17068)


### Reverts

* **test:** update avatar index.html ([9e80b73](https://github.com/ionic-team/ionic/commit/9e80b73))

### BREAKING CHANGES

#### ionChange removed from ion-tabs

- `(ionChange)` becomes `(ionTabsDidChange)`

#### ion-tabs getSelected() returns a string

Previously the `getSelected()` method of `ion-tabs` returned a reference to the selected
`ion-tab`, now it returns the name of tab as string.



# [4.0.0-rc.1](https://github.com/ionic-team/ionic/compare/v4.0.0-rc.0...v4.0.0-rc.1) (2019-01-09)


Expand Down
4 changes: 2 additions & 2 deletions angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/angular",
"version": "4.0.0-rc.1",
"version": "4.0.0-rc.2",
"description": "Angular specific wrappers for @ionic/core",
"keywords": [
"ionic",
Expand Down Expand Up @@ -45,7 +45,7 @@
"css/"
],
"dependencies": {
"@ionic/core": "4.0.0-rc.1",
"@ionic/core": "4.0.0-rc.2",
"tslib": "^1.9.3"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ The Ionic Core package contains the Web Components that make up the reusable UI
Easiest way to start using Ionic Core is by adding a script tag to the CDN:

```html
<link href="https://unpkg.com/@ionic/[email protected].1/css/ionic.bundle.css" rel="stylesheet">
<script src="https://unpkg.com/@ionic/[email protected].1/dist/ionic.js"></script>
<link href="https://unpkg.com/@ionic/[email protected].2/css/ionic.bundle.css" rel="stylesheet">
<script src="https://unpkg.com/@ionic/[email protected].2/dist/ionic.js"></script>
```

Any Ionic component added to the webpage will automatically load. This includes writing the component tag directly in HTML, or using JavaScript such as `document.createElement('ion-toggle')`.
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/core",
"version": "4.0.0-rc.1",
"version": "4.0.0-rc.2",
"description": "Base components for Ionic",
"keywords": [
"ionic",
Expand Down
10 changes: 10 additions & 0 deletions core/src/components/alert/alert.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,17 @@
overflow: hidden;
}

.alert-button:first-child {
@include rtl() {
border-right: 0;
}
}

.alert-button:last-child {
@include rtl() {
border-right: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color;
}

border-right: 0;

font-weight: $alert-ios-button-main-font-weight;
Expand Down
2 changes: 2 additions & 0 deletions core/src/components/alert/alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
overscroll-behavior-y: contain;
}

.alert-checkbox-group::-webkit-scrollbar,
.alert-radio-group::-webkit-scrollbar,
.alert-message::-webkit-scrollbar {
display: none;
}
Expand Down
46 changes: 43 additions & 3 deletions core/src/components/alert/test/basic/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { newE2EPage } from '@stencil/core/testing';

async function openAlert(selector: string) {
async function openAlert(selector: string, rtl = false) {
const pageUrl = rtl
? '/src/components/alert/test/basic?ionic:_testing=true&rtl=true'
: '/src/components/alert/test/basic?ionic:_testing=true';
const page = await newE2EPage({
url: '/src/components/alert/test/basic?ionic:_testing=true'
url: pageUrl
});

await page.click(selector);
Expand All @@ -12,7 +15,9 @@ async function openAlert(selector: string) {
await alert.waitForVisible();
await page.waitFor(250);

const compare = await page.compareScreenshot();
const compare = rtl
? await page.compareScreenshot('rtl')
: await page.compareScreenshot();
expect(compare).toMatchScreenshot();

await alert.callMethod('dismiss');
Expand Down Expand Up @@ -53,3 +58,38 @@ test(`alert: basic, radio`, async () => {
test(`alert: basic, checkbox`, async () => {
await openAlert('#checkbox');
});

// Right to Left tests
// ------------------------------------------------------

test(`alert: basic`, async () => {
await openAlert('#basic', true);
});

test(`alert: basic, long message`, async () => {
await openAlert('#longMessage', true);
});

test(`alert: basic, multiple buttons`, async () => {
await openAlert('#multipleButtons', true);
});

test(`alert: basic, no message`, async () => {
await openAlert('#noMessage', true);
});

test(`alert: basic, confirm`, async () => {
await openAlert('#confirm', true);
});

test(`alert: basic, prompt`, async () => {
await openAlert('#prompt', true);
});

test(`alert: basic, radio`, async () => {
await openAlert('#radio', true);
});

test(`alert: basic, checkbox`, async () => {
await openAlert('#checkbox', true);
});
6 changes: 3 additions & 3 deletions core/src/components/avatar/test/preview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@

<ion-content fullscreen padding>
<ion-avatar>
<img src="/src/components/avatar/avatar.svg">
<img src="/src/components/avatar/test/avatar.svg">
</ion-avatar>

<ion-chip>
<ion-avatar>
<img src="/src/components/avatar/avatar.svg">
<img src="/src/components/avatar/test/avatar.svg">
</ion-avatar>
<ion-label>Chip Avatar</ion-label>
</ion-chip>

<ion-item>
<ion-avatar slot="start">
<img src="/src/components/avatar/avatar.svg">
<img src="/src/components/avatar/test/avatar.svg">
</ion-avatar>
<ion-label>Item Avatar</ion-label>
</ion-item>
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/nav/test/basic/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { newE2EPage } from '@stencil/core/testing';

const navChanged = () => new Promise(resolve => window.addEventListener('ionNavDidChange', resolve));

test('nav: basic', async () => {
test.skip('nav: basic', async () => {

const page = await newE2EPage({
url: '/src/components/nav/test/basic?ionic:_testing=true'
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/nav/test/routing/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { newE2EPage } from '@stencil/core/testing';

const navChanged = () => new Promise(resolve => window.addEventListener('ionRouteDidChange', resolve));

test('nav: routing', async () => {
test.skip('nav: routing', async () => {

const page = await newE2EPage({
url: '/src/components/nav/test/routing?ionic:_testing=true'
Expand Down
3 changes: 2 additions & 1 deletion core/src/themes/ionic.functions.string.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@
$list: append($list, ":host(#{$addHostSelector}) #{$selector}", comma);

} @else {
$list: append($list, "#{$addHostSelector} #{$selector}", comma);
// TODO host-context should be for scoped only
$list: append($list, ":host-context(#{$addHostSelector}) #{$selector}", comma);
}
}

Expand Down
42 changes: 15 additions & 27 deletions core/src/themes/ionic.mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,42 +142,30 @@
// ----------------------------------------------------------

@mixin multi-dir() {
@if $app-direction == multi {
$root: #{&};
@at-root [dir] {
#{$root} {
@content;
}
}
} @else {
@content;
}
@content;

// @if $app-direction == multi {
// $root: #{&};
// @at-root [dir] {
// #{$root} {
// @content;
// }
// }
// } @else {
// @content;
// }
}

@mixin rtl() {
@if $app-direction == multi or $app-direction == null {
$root: #{&};

@at-root #{add-root-selector($root, "[dir=rtl]")} {
@content;
}
$root: #{&};

} @else if $app-direction == rtl {
@at-root #{add-root-selector($root, "[dir=rtl]")} {
@content;
}
}

@mixin ltr() {
@if $app-direction == multi {
$root: #{&};
@at-root [dir="ltr"] {
#{$root} {
@content;
}
}
} @else if $app-direction == ltr or $app-direction == null {
@content;
}
@content;
}


Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ionic/docs",
"version": "4.0.0-rc.1",
"version": "4.0.0-rc.2",
"description": "Pre-packaged API documentation for the Ionic docs.",
"main": "core.json",
"files": [
Expand Down

0 comments on commit bcc306a

Please sign in to comment.