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

feat(split-panel): split panel support for ion-nav and ion-menu #10343

Merged
merged 12 commits into from
Mar 3, 2017

Conversation

manucorporat
Copy link
Contributor

@manucorporat manucorporat commented Feb 7, 2017

feb-16-2017 19-47-39

@intellix
Copy link
Contributor

intellix commented Feb 13, 2017

I know it's a WIP but just wondering if it'll support adding custom media queries instead of just small/medium/large? <ion-split-panel when="(min-width:600px)">

@manucorporat
Copy link
Contributor Author

manucorporat commented Feb 13, 2017

@intellix I like the idea, probably something like:

<ion-split-panel matches="(min-width:600px)">

thoughts?

@intellix
Copy link
Contributor

SGTM, just cause it's in the previous one :D http://ionicframework.com/docs/api/directive/exposeAsideWhen/

@manucorporat manucorporat force-pushed the split-panel branch 3 times, most recently from 06be10f to d5dfe7e Compare February 15, 2017 19:22
@manucorporat
Copy link
Contributor Author

@intellix it already does support custom media queries!

@manucorporat manucorporat force-pushed the split-panel branch 7 times, most recently from 3596c24 to d3acb15 Compare February 16, 2017 19:23
@numerized
Copy link

Hola,

is there any way to use this features from the doc already to hide menu on login page for example or to show another menu for logged-in people ?

<ion-menu id="authenticated" side="left" [content]="mycontent">...</ion-menu>
<ion-menu id="unauthenticated" side="left" [content]="mycontent">...</ion-menu>
<ion-nav #mycontent [root]="rootPage"></ion-nav>
enableAuthenticatedMenu() {
  this.menuCtrl.enable(true, 'authenticated');
  this.menuCtrl.enable(false, 'unauthenticated');
}

})
export class SplitPanel extends Ion implements RootNode {

_rmListerner: any;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_rmListener :)

@highfieldjames
Copy link

Hi @manucorporat. Great work with this! I'm currently adding the split pane to multiple pages within my app.

Would you be willing to make ionChange an Output to follow the style of other components such as Checkbox?

@brandyscarney
Copy link
Member

Found some small issues:

  1. Content is not resizing in menu when the screen starts out small, see Split panel is not sizing content in menu when starting out smaller #10518
  2. Animation for push/pop seems off

@manucorporat
Copy link
Contributor Author

@highfieldjames what do you mean?

@highfieldjames
Copy link

highfieldjames commented Feb 27, 2017

@manucorporat What I mean is, at line 86, shouldn't ionChange: EventEmitter<SplitPanel> = new EventEmitter<SplitPanel>(); be @Output ionChange: EventEmitter<SplitPanel> = new EventEmitter<SplitPanel>(); with Output added to the imports from @angular/core? It seems to be the case for other components such as Checkbox and tabs.

@manucorporat
Copy link
Contributor Author

@highfieldjames you are absolutely right!

@brandyscarney
Copy link
Member

This looks great to me, I'm releasing a new nightly with it but I think it's good to merge.

Revert some changes

adds support split-panel support for tabs

Removes .orig

removes e2e.ts

Removes unneeded changes in menu.ts

improves stuff
@manucorporat manucorporat merged commit 9e4c3a6 into master Mar 3, 2017
@jgw96 jgw96 mentioned this pull request Mar 3, 2017
@manucorporat manucorporat deleted the split-panel branch March 4, 2017 11:36
@digaus
Copy link

digaus commented Mar 14, 2017

Is it possible to define if the main pane is shown on the right or the left? So that when the screen is too small only the left pane will be shown?

Currently I have two panes

    <ion-nav [root]="rootPage" #content swipeBackEnabled="false" main></ion-nav>

    <ion-nav [root]="rootPage1" #content swipeBackEnabled="false"></ion-nav>

I want the main component to be shown on the left side rather then on the right to realise a detail page once the screen is big enought which will be shown on the right.

@seiyria
Copy link
Contributor

seiyria commented Mar 14, 2017 via email

@digaus
Copy link

digaus commented Mar 14, 2017

Could you post your code?

@seiyria
Copy link
Contributor

seiyria commented Mar 14, 2017

Sure:

  .reversed-split-pane {
    flex-direction: row-reverse;

    ion-menu {
      border-right: none !important;
      // you'll also want to add border-left: 1px solid #dedede here
    }
  }
<ion-split-pane class="reversed-split-pane">
</ion-split-pane>

@manucorporat
Copy link
Contributor Author

@seiyria @digaus
#10775

will be available in ionic 2.3

@seiyria
Copy link
Contributor

seiyria commented Mar 14, 2017

Awesome, thank you!

@digaus
Copy link

digaus commented Mar 14, 2017

Nice :)

@digaus
Copy link

digaus commented Mar 15, 2017

Mhh not exactly what I was looking for... Here you can see what I want to do, currently switching rootPages to make it work which is not very good.
splitpane

@kodeine
Copy link

kodeine commented Jun 16, 2017

what if there are 2 menus (left/right). Using splitpane i cant close the right menu by default. looks like menuCtl functions dont work at all when using splitpane.

@digaus
Copy link

digaus commented Jun 19, 2017

You need to manually do that. Register a click event which triggers the right menu. Does not work otherwise

@kodeine
Copy link

kodeine commented Jun 19, 2017

@digaus this is the problem when using splitpane, none of the functions for menu work on browser. i cant close or open using menuCtrl.

@digaus
Copy link

digaus commented Jun 19, 2017

@kodeine You also need to active the menu you want to open

@Farbdose
Copy link

Farbdose commented Dec 1, 2017

When using ion-slides with horizontal scrolling this change of b435ad6 causes a part of the next slide to be visible for +200ms when rotating from portrait to landscape as the ion-slides takes that long to resize itself.

I don't have an absolute value but its long enough that after rotating the device you can see the left part of the next slide and wonder why it takes so long to resize while everything else is finished subjectively immediately

@manucorporat Could you explain why this delay is needed to make ion-slides work correctly with split panes?
Could we just call resize two times, on the actual event and 200ms later?

My current workaround is basically a copy of the resize method wrapped in a directive for easy access.

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

Successfully merging this pull request may close these issues.

9 participants