From 574c346d4580893dc75294d1e0eba780ac1aeb32 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Thu, 22 Mar 2018 17:03:03 -0400 Subject: [PATCH] revert(toolbar): revert to use old button attributes references #14172 --- BREAKING.md | 64 ++++++++----------- .../components/button/test/toolbar/index.html | 38 ++++------- .../components/toolbar/test/basic/index.html | 16 +---- .../toolbar/test/preview/index.html | 16 +---- .../toolbar/test/scenarios/index.html | 46 +++++-------- core/src/components/toolbar/toolbar.ios.scss | 18 ++++-- .../components/toolbar/toolbar.ios.vars.scss | 10 +-- core/src/components/toolbar/toolbar.md.scss | 28 ++++---- .../components/toolbar/toolbar.md.vars.scss | 8 ++- core/src/components/toolbar/toolbar.tsx | 4 +- 10 files changed, 96 insertions(+), 152 deletions(-) diff --git a/BREAKING.md b/BREAKING.md index 28ffed4f4b..608a454019 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -941,7 +941,7 @@ Previously if a `menuToggle` directive was added to an Ionic `button` in a toolb ```html - + @@ -954,39 +954,37 @@ Previously if a `menuToggle` directive was added to an Ionic `button` in a toolb ### Attributes Renamed -The attributes to position an `ion-buttons` element inside of a toolbar have been either removed or renamed, as well as the behavior of the attributes. We noticed there was some confusion behind the behavior of the `start` and `end` attributes, and with the new support for RTL we wanted to make these match RTL. In order to do this we have removed the old functionality behind the `start`/`end` attributes and renamed the `left`/`right` attributes. +Previously to positions buttons inside of a toolbar the following attributes were used: `start`, `left`, `right`, `end`. -**Old Properties:** - -| Old Property | Old Behavior | -|--------------|------------------------------------------------------------------------------------------------------------------| -| `start` | Positions element to the `left` of the content in `ios` mode, and directly to the `right` in `md` and `wp` mode. | -| `end` | Positions element to the `right` of the content in `ios` mode, and to the far `right` in `md` and `wp` mode. | -| `left` | Positions element to the `left` of all other elements. | -| `right` | Positions element to the `right` of all other elements. | - -**New Properties:** - -| New Property | New Behavior | -|------------------|--------------------------------------------------------------------------------------------------------------| -| `slot="start"` | Positions element to the `left` of all other elements in `LTR`, and to the `right` in `RTL`. | -| `slot="end"` | Positions element to the `right` of all other elements in `LTR`, and to the `left` in `RTL`. | +These have been renamed to the following: +| Old Property | New Property | Property Behavior | +|--------------|----------------|------------------------------------------------------------------------------------------------------------------| +| `start` | `slot="start"` | Positions element to the `left` of the content in `ios` mode, and directly to the `right` in `md` and `wp` mode. | +| `end` | `slot="end"` | Positions element to the `right` of the content in `ios` mode, and to the far `right` in `md` and `wp` mode. | +| `left` | `slot="left"` | Positions element to the `left` of all other elements. | +| `right` | `slot="right"` | Positions element to the `right` of all other elements. | **Old Usage Example:** ```html - + + + + - Filter Sessions + Title + + + - + ``` @@ -995,30 +993,22 @@ The attributes to position an `ion-buttons` element inside of a toolbar have bee ```html + + Left + - Cancel + Start - Filter Sessions + Title - Done + End + + + Right ``` - -If you need to position buttons based on the mode, we recommend something like the following: - -```html - - - Cancel - - - - Filter Sessions - - -``` diff --git a/core/src/components/button/test/toolbar/index.html b/core/src/components/button/test/toolbar/index.html index c0475527dd..e6ae77bfae 100644 --- a/core/src/components/button/test/toolbar/index.html +++ b/core/src/components/button/test/toolbar/index.html @@ -6,7 +6,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -42,7 +42,7 @@ - + Close @@ -59,7 +59,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -93,7 +93,7 @@ - + @@ -112,7 +112,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -149,7 +149,7 @@ - + @@ -167,7 +167,7 @@ - + Clear @@ -183,7 +183,7 @@ - + Go Back @@ -200,7 +200,7 @@ - + @@ -253,19 +253,5 @@ - diff --git a/core/src/components/toolbar/test/basic/index.html b/core/src/components/toolbar/test/basic/index.html index 7511a166f3..5398bdbc1e 100644 --- a/core/src/components/toolbar/test/basic/index.html +++ b/core/src/components/toolbar/test/basic/index.html @@ -6,7 +6,7 @@ - + @@ -14,7 +14,7 @@ - + @@ -120,18 +120,6 @@ - + @@ -14,7 +14,7 @@ - + @@ -120,18 +120,6 @@ - + @@ -18,7 +18,7 @@ - + @@ -35,7 +35,7 @@ - + @@ -52,7 +52,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -88,7 +88,7 @@ - + @@ -107,7 +107,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -143,7 +143,7 @@ - + Clear @@ -159,7 +159,7 @@ - + Go Back @@ -173,14 +173,14 @@ - - + + - + - + @@ -195,10 +195,10 @@ Right side menu toggle - - + + - + @@ -237,18 +237,6 @@