ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Feat: split pane

Open brandyscarney opened this issue 10 years ago • 46 comments

Add the option to expose the menu on larger screens, example: settings app on an iphone vs ipad.

Same thing as expose-aside-when in v1: http://ionicframework.com/docs/api/directive/exposeAsideWhen/

brandyscarney avatar Jun 07 '16 15:06 brandyscarney

@tadeussenf I tried it like so little while ago but my problem was that right edge of main content area was pushed of the screen. Does your CSS handle that ? (Sorry do not have access to a computer at the moment to test it out)

okonon avatar Dec 10 '16 16:12 okonon

I guess it does: padding-right. When you click on anything on the main view does the menu close and you left with white area on the left?

okonon avatar Dec 10 '16 16:12 okonon

@okonon I experienced both situations you described, but they should be handled with "position: relative;" and "padding-right: 304px".

Altough I am not entirely sure that the posted CSS has no unexpected side-effects in how Ionic behaves. I would strongly prefer an upstream supported solution on this :)

EDIT: I already found one issue and updated my CSS.

tadeussenf avatar Dec 10 '16 20:12 tadeussenf

Understood thanks I agree with you and upstream

okonon avatar Dec 10 '16 21:12 okonon

+1

swiftyone avatar Dec 19 '16 12:12 swiftyone

So sad to see this "feature" removed and this issue not be solved .

fantasizer avatar Dec 20 '16 00:12 fantasizer

I think the Ionic team is doing a huge amount of work fixing bugs and making everything stable so I can and will happily wait for a subsequent Ionic release if it's not for 1.0.

Bouzmine avatar Dec 20 '16 01:12 Bouzmine

Ionic team announced a code freeze a couple weeks ago in their meeting notes (https://docs.google.com/document/d/1LrPDUkfXpqPIsghaSCxHyN1GIZ0TK2bwFxOZx2GKWtI/edit) and is doing a lot to stabilize and reduce bundle sizes while targeting final release in January.

Ionic seems committed to PWA's so I'm guessing this feature is only temporarily on hold. Hopefully we'll see it in early 2017.

growthclick avatar Dec 20 '16 01:12 growthclick

Now that 2.0.0 final is out (Congrats !) i was wondering if this feature will be on the road map for 2.0.1? @brandyscarney

@mlynch : are there plans to add exposeWhenAside feature to sidemenu?

mlynch commented on Oct 5, 2016 This isn't a side menu feature, it's part of the NavController where previous pages are rendered in a menu style side-by-side.

okonon avatar Jan 26 '17 18:01 okonon

Hi @jgw96 and Ionic team!

Congrats for Ionic 2.0 release! I'm particulary interested by this thread. I would LOVE to see more features for tablets like this one.

Could you please check out my post on the forum? I never got your thoughts: https://forum.ionicframework.com/t/single-app-for-smartphone-and-tablet/53772/6

I agree with @julianmountford remarks. In our case, the best functionning would be something like the first mockup of this page: http://blog.scottlogic.com/2015/10/02/ionic-master-detail.html and be able to use a side menu independently.

Thanks a lot!

CheetahDev avatar Feb 16 '17 09:02 CheetahDev

Seems like this feature is coming to Ionic 2 soon. https://twitter.com/maxlynch/status/829388117752868865

unamix avatar Feb 16 '17 23:02 unamix

Hey everyone, we're currently working on this implementation. Please read the following blog post if you'd like to help us test: http://blog.ionic.io/testing-split-pane-support/

Thanks!

brandyscarney avatar Feb 17 '17 16:02 brandyscarney

@brandyscarney @jgw96 I am facing the below issue: screen shot 2017-02-23 at 12 42 53 pm

Steps to replicate:

  1. generate new fresh app by ionic start SplitViewTest sidemenu --v2
  2. Update ionic-angular by running : npm install --save [email protected]
  3. ionic serve
  4. Observe issues

Here is the html code that was changed to wrap menu in ion-split-panel:

<ion-split-panel>
  <ion-menu [content]="content">
    <ion-header>
      <ion-toolbar>
        <ion-title>Menu</ion-title>
      </ion-toolbar>
    </ion-header>

    <ion-content>
      <ion-list>
        <button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
          {{p.title}}
        </button>
      </ion-list>
    </ion-content>

  </ion-menu>

  <!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
  <ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
</ion-split-panel>

okonon avatar Feb 23 '17 17:02 okonon

@okonon you need to add the main attribute to <ion-nav>.

seiyria avatar Feb 23 '17 18:02 seiyria

Been waiting for this component Thanks. However we wish to implement in just one part of our app, ie push on a page that contains the split view and then be able to press back and return. But it seems to always act as root page. Am I missing something?

sjdrew avatar Feb 26 '17 17:02 sjdrew

Can anyone explain how to make panel 1 trigger a navigation in panel 2? I tried using ViewChilds in my app.component to grab both child navs and store them in a service. But that seems real shady, and there doesn't seem to be a good way to wait until the page is loaded to store them.

roblouie avatar Feb 28 '17 06:02 roblouie

Just to update on this issue, I've released a new nightly version with the latest split pane: [email protected]

Important: we decided to rename it from split-panel to split-pane, so if you have been using the old nightly version please make sure you update this to use the new nightly.

We're hoping to get this merged into master after some more testing. 🙂

brandyscarney avatar Feb 28 '17 17:02 brandyscarney

Great work guys.

I'm using it on https://minireceitas.com.br/

My only issue is related to the position of the menu. As you can see, the resultant layout doesn't match with the one in the blog post, but, in my case, seems better as it is. I think this happens because I'm not using the split-pane component with the ion-nav.

My code is something like:

<ion-split-pane>
  <ion-header>
    <ion-navbar>...</ion-navbar>
    <ion-toolbar><ion-searchbar /></ion-toolbar>
  </ion-header>
  <ion-menu side="left" [content]="content"></ion-menu>
  <ion-content #content class="main-content" main></ion-content>
</ion-split-pane>

jlcarvalho avatar Mar 02 '17 13:03 jlcarvalho

With the current split pane (2.1.0 nightly) is there a way to have a left and right menu? Right now it does this if there's a right menu:

(chat is the "right" menu).

I want it to be on the right side and toggleable with a button.

seiyria avatar Mar 02 '17 13:03 seiyria

I figured this out after a bit of trial and error - my solution was to put the menu in the ion-content of the pane to the right. This made it unique to just that view. No need to mess with toggling a menu on and off.

seiyria avatar Mar 03 '17 07:03 seiyria