Add more actions to cell (#3217)

* Added toggle more actions to cell

* Resolve PR comments
-- Added INotificationService for notification msg

* Reduced ToggleMoreAction to smaller size. So the dropdown could be displayed closer to it instead of at the buttom of the cell.
This commit is contained in:
Yurong He
2018-11-14 17:51:59 -08:00
committed by GitHub
parent db3bb82dbd
commit e607f68b3e
10 changed files with 174 additions and 19 deletions

View File

@@ -12,6 +12,7 @@ import { CellView } from 'sql/parts/notebook/cellViews/interfaces';
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import * as themeColors from 'vs/workbench/common/theme';
import { ICellModel } from 'sql/parts/notebook/models/modelInterfaces';
import { NotebookModel } from 'sql/parts/notebook/models/notebookModel';
export const CODE_SELECTOR: string = 'code-cell-component';
@@ -21,7 +22,13 @@ export const CODE_SELECTOR: string = 'code-cell-component';
templateUrl: decodeURI(require.toUrl('./codeCell.component.html'))
})
export class CodeCellComponent extends CellView implements OnInit {
private _model: NotebookModel;
@Input() cellModel: ICellModel;
@Input() set model(value: NotebookModel) {
this._model = value;
}
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) private _changeRef: ChangeDetectorRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService
@@ -41,4 +48,9 @@ export class CodeCellComponent extends CellView implements OnInit {
private updateTheme(theme: IColorTheme): void {
}
get model(): NotebookModel {
return this._model;
}
}