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

@brandyscarney Excited to see split-pane support in Ionic 2. Is there any plan to enable split pane on two different views similar to the iPad Mail experience (i.e. fully featured left-side view for navigation that targets the right-side "content" view, and still leaves room for a separate side menu)?

For progressive desktop-friendly web apps, it would be ideal if there were a way to enhance nav.push / navPush to target the current view / nav stack when in phone mode and to target an adjacent content view / nav stack when in tablet/desktop mode.

As background here is an example of a split pane workaround in V1 https://github.com/alamusi/ionic1splitview

growthclick avatar Jun 13 '16 22:06 growthclick

@brandyscarney please add an option to add the angular-variables/expressions in expose-aside-when selectors.

<ion-side-menu expose-aside-when="myData.settings.tabletMode ? true : false">
</ion-side-menu>

lordgreg avatar Jun 29 '16 14:06 lordgreg

@brandyscarney The ability for a side menu to have its own NavController as well as a reference to the content NavController would be ideal.

As @growthclick states above, this would give us an implementation of the iPad Mail type experience, where the user can navigate in the side menu through accounts, folders, messages, etc... Then display the message in the content pane.

julianmountford avatar Jul 04 '16 08:07 julianmountford

quick question when is this issue planned? We will see this in the RC? Or do we have to wait longer ?

hackfrag avatar Aug 12 '16 09:08 hackfrag

I'm also interested by this feature. :+1:

Gp2mv3 avatar Aug 25 '16 15:08 Gp2mv3

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.

mlynch avatar Oct 05 '16 18:10 mlynch

@mlynch I'm not sure I get what you're saying. Why are we showing previous pages in the side "menu style" pane? It's basically an always-open side menu isn't it?

pascalwhoop avatar Oct 06 '16 12:10 pascalwhoop

To me a split pane is more than just an always open side menu. My understanding is that it is a pane which hosts its own NavController and with access to its sibling pane's NavController. That way it can control both its own view hierarchy and the sibling pane view hierarchy.

The side menu is relevant because when in portrait orientation, a side menu is the best place to host this NavController. When in landscape orientation, switching the side menu to be always open would be ideal.

Having this functionality would assist greatly in developing tablet sized apps with Ionic.

julianmountford avatar Oct 06 '16 12:10 julianmountford

Guys, do you have any idea if this feature will be added before the final release?

marcelgoya avatar Oct 14 '16 19:10 marcelgoya

@marcelgoya The goal is to get this in prior to the final release. I've added it to the rc.2 milestone but I am not guaranteeing it will be in this release, just want to keep track of it. :)

brandyscarney avatar Oct 14 '16 20:10 brandyscarney

@brandyscarney Awesome, thanks a lot for the quick reply! :) Btw, you guys are doing an amazing job with the new version! I'm using it to build a real-time translation communication platform (LinguSocial) and the performance, especially after the last two releases has been nothing but amazing. I'm developing the platform all by myself and the amount of time I've saved so far by using the new Ionic version is nothing but awesome. Really well done guys! :)

marcelgoya avatar Oct 14 '16 20:10 marcelgoya

Hey Ionic team! Thanks for all the good work! I know other stuff seems a lot more important than the split-pane. But what is your position on it? I think a lot of people run a tablet and phone combined apps. Those can't pick up Ionic 2 until this feature is addressed.

Is it something which is on the bottom of your priority list? Should we try to develop our own solutions?

Wouter33 avatar Nov 04 '16 23:11 Wouter33

@Wouter33 It's been added to RC 4, so it will be included before the official release.

marcelgoya avatar Nov 04 '16 23:11 marcelgoya

@marcelgoya It was assigned to RC1 and pushed forward since then. That's why i posted the question. If it's something which doesn't have priority i rather know so we can try to find our own solutions in order to be able to switch to Ionic 2.

Wouter33 avatar Nov 04 '16 23:11 Wouter33

@Wouter33 I guess it depends on how long you're willing to wait. Brandy already mentioned that the split-pane feature will be added before the final release and that their focus is on fixing bugs for now, which is completely understandable given the amount of bugs that have been submitted.

marcelgoya avatar Nov 04 '16 23:11 marcelgoya

@Wouter33 According to the first post in this thread, the split pane feature was originally assigned to beta 9. If you need a speedy solution I think you'd be safer developing your own. Maybe you could share it ;)

julianmountford avatar Nov 07 '16 07:11 julianmountford

I am also waiting for this feature. Tried to implement my own but it is not that easy.

okonon avatar Nov 07 '16 22:11 okonon

@okonon @julianmountford Poor mans side-by-side. I'm using this for now until this feature is coded in.

https://forum.ionicframework.com/t/does-ionic-2-support-side-by-side-layout-in-landscape/67913/2 http://plnkr.co/edit/9uOTTtEBgW97mFojioqi?p=preview

mtycholaz avatar Nov 24 '16 00:11 mtycholaz

I keep thinking that a variation on the tabs setup could be used to achieve this. Where in tabs it's just the tab bar that is controlled by the master and then the rest of the view is a child (so to speak). This could simply have a whole left panel that is controlled by the master and a right panel that is a child.

so your list view sits on the left and your detail view shows on the right for example.

In a landscape view this would mean that you just have 2x standard phone size panels next to each other which would be quite nice and give good reuse for a lot of apps without much extra work.

An option to have the side menu always open would be an additional option on top of this setup and could be set programmatically based on available screen real estate.

ghenry22 avatar Dec 06 '16 14:12 ghenry22

To simply display the menu in open-state on larger displays you can use this CSS as a starting point:

@media(min-width: 1200px) {
  ion-menu, ion-menu[type=reveal] {
    z-index: 80;
    display: block;
    right: inherit;
  }

  button[menutoggle] {
    display: none;
  }

  .fixed-content {
    bottom: 56px;
  }

  .scroll-content {
    overflow-y: auto;
    margin-top: 0 !important;
  }

  .menu-inner {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    transform: translateX(0) !important;

    > ion-header {
      position: relative;
    }

    > ion-content {
      position: relative;
    }
  }

  .ion-page {
    left: 304px;
    padding-right: 304px;
    > ion-header {
      position: relative;
    }

    > ion-content {
      position: relative;
    }
  }
}

tadeussenf avatar Dec 10 '16 10:12 tadeussenf