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

Remove mode-start and mode-end slots from toolbar #14172

Closed
brandyscarney opened this issue Mar 15, 2018 · 3 comments
Closed

Remove mode-start and mode-end slots from toolbar #14172

brandyscarney opened this issue Mar 15, 2018 · 3 comments
Assignees

Comments

@brandyscarney
Copy link
Member

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[ ] 3.x
[x] 4.x

Right now we have mode-start and mode-end to recreate the functionality that start and end used to have.

For example:

v3

<ion-toolbar>
  <ion-buttons start>
    <button ion-button (click)="dismiss()">Cancel</button>
  </ion-buttons>

  <ion-title>
    Filter Sessions
  </ion-title>

  <ion-buttons end>
    <button ion-button (click)="applyFilters()" strong>Done</button>
  </ion-buttons>
</ion-toolbar>

v4

<ion-toolbar>
  <ion-buttons slot="mode-start">
    <ion-button (click)="dismiss()">Cancel</ion-button>
  </ion-buttons>

  <ion-title>
    Filter Sessions
  </ion-title>

  <ion-buttons slot="mode-end">
    <ion-button (click)="applyFilters()" strong>Done</ion-button>
  </ion-buttons>
</ion-toolbar>

I'd like to remove these and instead just use start and end, but first I need to verify that this functionality can still easily be added. The old functionality caused a lot of confusion and wasn't intuitive.

More info here: https://github.com/ionic-team/ionic/blob/master/BREAKING.md#attributes-renamed-4

Useful comments:

@brandyscarney brandyscarney added this to the @ionic/core 0.0.4 milestone Mar 15, 2018
@brandyscarney brandyscarney self-assigned this Mar 15, 2018
@ionitron-bot ionitron-bot bot added the triage label Mar 15, 2018
@ionitron-bot ionitron-bot bot removed the triage label Mar 15, 2018
brandyscarney added a commit to ionic-team/ionic-stencil-conference-app that referenced this issue Mar 15, 2018
@brandyscarney
Copy link
Member Author

Revert

@brandyscarney
Copy link
Member Author

After some further discussion on this we decided to move forward with the following change in naming:

Old Property New Property Property Behavior
start slot="secondary" Positions element to the left of the content in ios mode, and directly to the right in md mode.
end slot="primary" Positions element to the right of the content in ios mode, and to the far right in md mode.
left slot="start" Positions to the left of the content in LTR, and to the right in RTL.
right slot="end" Positions to the right of the content in LTR, and to the left in RTL.

This table can also be found in the breaking changes document for v4

Here is a diagram to further explain why we went with this naming convention:

action diagram

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant