From 1338d71dff1ede62c39e6f72cab428c72dc2a249 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 9 Jan 2019 12:06:13 -0600 Subject: [PATCH] fix(picker): do not change datetime/picker column order in RTL (#17018) Closes #16294 --- core/.stylelintrc.yml | 2 +- core/src/components/datetime/test/basic/e2e.ts | 16 ++++++++++++++++ .../components/datetime/test/basic/index.html | 2 +- core/src/components/picker/picker.scss | 6 +----- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/core/.stylelintrc.yml b/core/.stylelintrc.yml index 47cd0e4e0e..556ee7d5fb 100644 --- a/core/.stylelintrc.yml +++ b/core/.stylelintrc.yml @@ -239,6 +239,7 @@ rules: - contain - content - cursor + - direction - empty-cells - object-fit - opacity @@ -254,7 +255,6 @@ rules: property-blacklist: - background-position - - direction - right - left - float diff --git a/core/src/components/datetime/test/basic/e2e.ts b/core/src/components/datetime/test/basic/e2e.ts index f0ce389dae..dc85a43cfa 100644 --- a/core/src/components/datetime/test/basic/e2e.ts +++ b/core/src/components/datetime/test/basic/e2e.ts @@ -18,3 +18,19 @@ test('datetime: basic', async () => { compare = await page.compareScreenshot('should open custom picker'); expect(compare).toMatchScreenshot(); }); + +test('datetime: basic-rtl', async () => { + const page = await newE2EPage({ + url: '/src/components/datetime/test/basic?ionic:_testing=true&rtl=true' + }); + + const datetime = await page.find('#customPickerOptions'); + await datetime.click(); + + const picker = await page.find('ion-picker'); + await picker.waitForVisible(); + await page.waitFor(250); + + const compare = await page.compareScreenshot('should open custom picker'); + expect(compare).toMatchScreenshot(); +}); diff --git a/core/src/components/datetime/test/basic/index.html b/core/src/components/datetime/test/basic/index.html index a8ea7bc041..cbbaa87efc 100644 --- a/core/src/components/datetime/test/basic/index.html +++ b/core/src/components/datetime/test/basic/index.html @@ -101,7 +101,7 @@ h:mm a - + diff --git a/core/src/components/picker/picker.scss b/core/src/components/picker/picker.scss index 52873843fb..66ddcb0ac0 100644 --- a/core/src/components/picker/picker.scss +++ b/core/src/components/picker/picker.scss @@ -108,11 +108,6 @@ // -------------------------------------------------- .picker-columns { - @include rtl() { - // Date is the same format in both directions - flex-direction: row-reverse; - } - display: flex; position: relative; @@ -121,6 +116,7 @@ margin-bottom: var(--ion-safe-area-bottom, 0); contain: strict; + direction: ltr; overflow: hidden; }