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

Ionic v4: Tabs - tabbarLayout options are not shown as expected #14611

Closed
FdezRomero opened this issue Jun 12, 2018 · 6 comments · Fixed by #15113
Closed

Ionic v4: Tabs - tabbarLayout options are not shown as expected #14611

FdezRomero opened this issue Jun 12, 2018 · 6 comments · Fixed by #15113
Assignees

Comments

@FdezRomero
Copy link
Contributor

FdezRomero commented Jun 12, 2018

Bug Report

Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.

cli packages: (/usr/local/lib/node_modules)

   @ionic/cli-utils  : 2.0.0-rc.6
   ionic (Ionic CLI) : 4.0.0-rc.6

local packages:

   @angular-devkit/core       : 0.6.8
   @angular-devkit/schematics : 0.6.8
   @angular/cli               : 6.0.8
   @ionic/schematics-angular  : 1.0.0-rc.6
   Ionic Framework            : @ionic/angular 4.0.0-alpha.7

System:

   NodeJS : v8.11.1
   npm    : 6.1.0
   OS     : macOS High Sierra

Describe the Bug
When using <ion-tabs tabbarLayout="icon-start">, the tab button icons are still shown on top of the labels:

icon-start:
image

Other options like icon-end, icon-bottom, icon-hide and title-hide also have layout problems.

title-hide:
image

Steps to Reproduce
Steps to reproduce the behavior:

  1. Create a @ionic/[email protected] project with the CLI, select the tabs starter: ionic start tabs-layout tabs --type angular
  2. Open src/app/pages/tabs/tabs.page.html
  3. Add tabbarLayout="icon-start" to the <ion-tabs>
  4. Run in the browser with npm run start

Related Code

<ion-tabs tabbarLayout="icon-start">
  <ion-tab label="Home" icon="home" href="/tabs/(home:home)">
    <ion-router-outlet name="home"></ion-router-outlet>
  </ion-tab>
  <ion-tab label="About" icon="information-circle" href="/tabs/(about:about)">
    <ion-router-outlet name="about"></ion-router-outlet>
  </ion-tab>
  <ion-tab label="Contact" icon="contacts" href="/tabs/(contact:contact)">
    <ion-router-outlet name="contact"></ion-router-outlet>
  </ion-tab>
</ion-tabs>

Expected Behavior
Tab button icons should be placed at the side of their labels. Other layout options should be positioned correctly.

Additional Context
List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, screenshots, OS if applicable, etc.

@ionitron-bot ionitron-bot bot added the triage label Jun 12, 2018
@cptflammin
Copy link

4.0.0-alpha.9

Same issue, tabbarLayout seems to have no effect whatever the value as per comment in tabs.d.ts
/**
* Set the tabbar layout: icon-top, icon-start, icon-end, icon-bottom, icon-hide, title-hide.
*/

Cannot make https://blog.ionicframework.com/tips-tricks-for-ionic-on-desktop/
working despite ionic 4 indications (https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md#tabs)

On the other side, tabbarPlacement is working as expected, top is working and bottom as well

@brandyscarney
Copy link
Member

Thanks for the issue! Confirmed this is an issue in latest.

@ionitron-bot ionitron-bot bot removed the triage label Jul 23, 2018
@brandyscarney
Copy link
Member

Note to team: I started on this issue but I need to discuss the implementation with @manucorporat

@Mobiletainment
Copy link
Contributor

Thank you @brandyscarney!
Is there any progress on this issue? Looking forward to placing the icons next to the title.

@brandyscarney
Copy link
Member

@Mobiletainment I haven't gotten back to finishing it yet. I submitted a PR for it so you can see where it's at: #15113

I have fixed the layout itself but there are still some issues with padding and margin between elements.

brandyscarney added a commit that referenced this issue Aug 9, 2018
@brandyscarney brandyscarney self-assigned this Aug 10, 2018
brandyscarney added a commit that referenced this issue Aug 10, 2018
- gets the `tabbarLayout` property working
- update badge position based on tabs layout
- fix the transforms for icon/text and icon size

fixes #14611
@brandyscarney
Copy link
Member

This has been fixed and will be in the beta.3 release, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants