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

Refactor/overlay components #684

Merged
merged 20 commits into from
Sep 10, 2018
Merged

Conversation

Tibing
Copy link
Member

@Tibing Tibing commented Aug 28, 2018

Please read and mark the following check list before creating a pull request:

Short description of what this resolves:

Refactor popover, context-menu, and searches, implement with overlays.
Remove capability add something to layout top. All dynamic layout components have to work with overlays now.

BREAKING CHANGE:
appendToLayoutTop and clearLayoutTop methods was removed from NbThemeService. Instead of this methods, you have to use NbOverlayService. It's the extension of @angular/cdk overlays, so, check documentation first of all.

Basic usage of overlays may look like this:

constructor(protected overlay: NbOverlayService) {
}

const overlayRef = overlay.create();
const overlayComponentPortal = new ComponentPortal(MyOverlayComponent);
overlayRef.attach(overlayComponentPortal);

Closes #683, closes #664, closes #668.

@Tibing Tibing requested a review from yggg August 28, 2018 08:28
@Inject(NB_WINDOW) protected window,
@Inject(NB_DOCUMENT) protected document,
@Inject(PLATFORM_ID) protected platformId: Object,
protected layoutDirectionService: NbLayoutDirectionService,
protected scrollService: NbLayoutScrollService,
protected rulerService: NbLayoutRulerService,
protected scrollTop: NbRestoreScrollTopHelper,
@Optional() protected overlayContainer: NbOverlayContainerAdapter,
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Collaborator

@nnixaa nnixaa left a comment

Choose a reason for hiding this comment

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

mostly fine

* Basic menu items, will be passed to the internal NbMenuComponent.
* */
@Input('nbContextMenu')
set _items(items: NbMenuItem[]) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

_

@@ -10,6 +10,9 @@ import { NbDynamicToAddComponent } from '../shared/dynamic.component';
@Component({
selector: 'nb-popover-custom-component',
templateUrl: './popover-custom-component.component.html',
styles: [`nb-layout-column {
Copy link
Collaborator

Choose a reason for hiding this comment

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

new lines

@@ -10,6 +10,10 @@ import { Component } from '@angular/core';
@Component({
selector: 'nb-popover-showcase',
templateUrl: './popover-showcase.component.html',
styles: [`:host {
Copy link
Collaborator

Choose a reason for hiding this comment

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

new lines

@nnixaa nnixaa merged commit d3ba6ab into akveo:master Sep 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants