mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
* initial changes
* add isCodeOutput and apply decorations on output
* Add extension gallery update reminder action (#17644)
* Fix extensionsGallery.json name (#17646)
* Remove galleries list action (#17648)
* multi-level table support (#17638)
* multi-level table support
* comments
* address comments
* add period to end of sentence.
* Show connection string example for add sql binding quickpick (#17650)
* add connection string example
* reorder
* Resolves same-origin-policy violation when ADS web is running in a container (#17555)
* Stops appending port to authority for web mode
* Clarifies comment
* Adds missing sql carbon edit tag
* vbump STS (#17653)
* use latest STS (#17658)
* Refactoring readProjFile() (#17637)
* move reading project parts to different helper functions
* cleanup
* remove comment
* addressing comments
* Corrects Web Build Pipeline ENOENT Error (#17656)
* Checks for successful directory creation
* Revert "Checks for successful directory creation"
This reverts commit 372409ef323f0d82e11992bc7bc33d607a7d5581.
* Checks for the existence of the logs directory before accessing.
* Adds SQL carbon edit comment
* Removing call to copy from non-existing directory.
* Removes unneeded import
* Checks for file existence before copying.
* Provides explanation for modification
* Replaces file existence check with exception handling.
* Bump tools service (#17671)
* Apply changes from Remote Database to sqlproj - mssql changes (#17655)
* update project from database
* update project from database
* update project from database
* Re-adding schemaComparePublishChanges for temporary backcompat
* Adding comment for keeping enum values in sync
* Correcting enum value
Co-authored-by: Noureldine Yehia <t-nyehia@microsoft.com>
* update add file/folder for msbuild sdk style projects (#17660)
* update add file for msbuild sdk style projects
* also handle add folder
* fix comment
* fix issue reported by component governance (#17678)
* update json-schema version
* remove unused packages
* update package.json
* SQL Binding: Give default connection setting name (#17659)
* show sqlconnectionstring in quickpick
* fix duplicate sqlconnectionstring setting
* add (new)
* add sqlconnectionstring as default setting name
* check if sqlconnectionstring already exists
* Provide aria-labels for node checkboxes in the tree view. (#17676)
During accessibility testing, it was discovered that screen reader does not announce what checkboxes in the tree view represent. It was merely announcing "checkbox unchecked", so it was not clear without visuals which checkbox the focus is on.
This change sets an `aria-label` of the checkbox elements to match the label of the owning tree node. This way the announcement becomes "My Node; checkbox; unchecked". This is fine as a quick solution to the problem, but in the future we may want to consider adding additional checkbox label property to the nodes exposed by the tree provider, so that each checkbox can announce additional information, if needed.
* Respect ARIA label specified int he tree component options. (#17674)
During accessibility testing it was discovered that tree view in our wizard reads "Tree Node tree view" instead of the proper label that is specified. It turned out to be the problem with the tree component, where `ariaLabel` was hardcoded to "Tree Node", instead of the one provided in the options.
This change addresses the problem by passing through `ariaLabel` from the options object to the underlying tree control. I also removed the default `Tree Node` hardcoded label, as it didn't make much sense. This does mean that all tree-views that do not explicitly specify their aria-label will now get an empty label. I think this is better than having unrelated, unlocalized `Tree Node`.
I'm also worried about changes to the `ariaLabel` property after the component was initialized. I updated the code to propagate the value to the underlying tree view in the `setProperties` override of the tree component and hope that it will take care of it.
* Fix sql projects net6 warnings (#17673)
* fix .net 6 error showing on startup
* fix double warning
* addressing comments
* update key string
* undo adding space in net core sdk location setting (#17684)
* update names for msbuild sdk style projects (#17677)
* update names for msbuild sdk style projects
* remove msbuild from names
* update comments
* Designer: property descriptions (#17668)
* format
* added strings
* format doc
* use codicon instead
* show descriptions in property pane only
* fix ssdt string bug
* fix overflow option
* review comments
* review comments
* changes
* sts 156 vbump (#17683)
* Sql Binding: Add "Check out pane for more details" when nuget package download fails (#17680)
* check output for more details
* detail error
* wait for result from showerrormessage
* [Loc] Update to sql-database-projects and sql.xlf (#17687)
* update the vmImage for build jobs (#17689)
* update vmImage for windows build
* update tar command
* use specific macos version
* support building msbuild sdk style projects (#17675)
* support building msbuild sdk style projects
* fixes after merge
* add foreign keys and constraints (#17697)
* foreign keys and constraints
* refactoring
* fix issues
* properties pane improvements (#17700)
* [Loc] update to tabledesignercomponentinput (#17704)
* Add instructions for developing VS Code version of sql-database-projects (#17705)
* Adding UI for deploying a db proj to docker (#17495)
* code refactoring (#17706)
* Improve accessibility for wizard steps navigation (#17669)
Our extension is relying on the wizard dialog. During accessibility testing it was discovered that wizard step buttons are being reported as links by the screen reader (NVDA, JAWS). Claimed expected behavior by the tester is that they should be announced as buttons.
I discussed this issue with accessibility SMEs and they said it is perfectly fine to keep them as links. They did mention that they would probably design the UX differently from the start, but given that we already have it this way, links are fine. They did suggest to add few additional ARIA attributes to the link elements:
- `aria-current="step"` if the link is for the currently active step. This literally just announces "current step" at the end, when you focus on a link
- `aria-disabled="true"` makes it say "**unavailable**; link; *<step number>*" when in NVDA "browse" mode and move to the grayed-out link.
So this change implements the said improvements.
* bump sts version to 159 (#17709)
* LEGO: check in for main to temporary branch. (#17699)
* LEGO: check in for main to temporary branch. (#17702)
Co-authored-by: Alex Ma <alma1@microsoft.com>
* [Loc] update to sql-database-projects (#17713)
* LEGO: check in for main to temporary branch. (#17715)
* Register additional editor overrides when adding new notebook file types (#17708)
* Also standardized file extension contributions to always start with a period, and to always do lower case string comparisons for file extensions.
* input width in designer (#17714)
* Add additional properties to wizard page navigation events (#17716)
* Fix open external not working (#17717)
* save password checkbox fix (#17718)
* save password checkbox fix
* remove code to reset the checkbox value
* allow build to continue when cache task fails (#17720)
* cache task should not fail the build
* update cachesalt
* Fix language flavor change on connection when in sqlcmd mode (#17719)
* Fix language flavor change on connection when in sqlcmd mode
* comment + fix
* LEGO: check in for main to temporary branch. (#17722)
* LEGO: check in for main to temporary branch. (#17724)
Co-authored-by: Alex Ma <alma1@microsoft.com>
* Update one more variable name for sdk style projects (#17710)
* LEGO: check in for main to temporary branch. (#17725)
Co-authored-by: Alex Ma <alma1@microsoft.com>
* LEGO: check in for main to temporary branch. (#17726)
Co-authored-by: Alex Ma <alma1@microsoft.com>
* LEGO: check in for main to temporary branch. (#17730)
* Fix "unsupported version" error when adding sql binding package (#17721)
* Apply changes from remote database to sqlproj - schema-compare changes (#17679)
* update project from database
* update project from database
* Merge from main
* Removing dupe test stub
* PR feedback
* cleanup
* PR feedback
* Fixing tests, adding stubs to update sqlproj as schema compare target
* updating code comment
Co-authored-by: Noureldine Yehia <t-nyehia@microsoft.com>
* [Loc] Update to schema-compare XLF (#17733)
* Enabled deployment of Azure Arc data controllers in directly connected mode (#17707)
* Added fields for connectivity mode, custom loc, auto-metrics, auto-logs, and the dynamic enablement of such fields.
* Changed the description of the data controller details page.
* Change notebook params to work for direct mode
* Added login to dc deployment notebooks
* Fixed auto upload metrics and logs true/false, separated login into another cell.
* Removed localization of indirect and direct connectivity labels.
* Fix ordering of reading sqlproj Build Includes and Removes (#17712)
* evaluate includes and removes in order in sqlproj
* fix after merge
* fix comment
* update comment
* Add resource deployment samples for (#17734)
* Update remove file for sdk style sql projects (#17688)
* add support for removing file in new style project
* fix test
* only load files, not whole project when checking if a <Build Remove> needs to be added
* merge changes
* fixes after merge
* [Loc] update to Arc XLF (#17737)
* Bump to latest version of azdata (#17735)
* Remove .net 6 version cutoff for building sql projects (#17736)
* remove .net 6 version cutoff for building sql projects
* Revert "Warning when .NET 6 SDK is detected (#17422)"
This reverts commit 2ed8aeb565.
* add back skipVersionSupportedCheck
* add back return false
* addressing comments
* [Loc] update to sql-database-projects xlf (#17743)
* Add additional notebook tests for handling relative links. (#17739)
* [Loc] Fix for duplicate strings in LCL files (#17756)
* WIP spanish lcl duplicate removal
* Revert "WIP spanish lcl duplicate removal"
This reverts commit 5f943153ec8980849a045c8bf7256d852571a778.
* fix for duplicate strings
* removed spaces
* Fixes ADS Web bug around copying user codes and opening a browser tab when adding an Azure Account. (#17760)
* Fixes bug around copying user codes and opening a browser tab.
* Code review changes
* Additional review changes.
* Unnecessary import removed
* Editing pipeline ACR service connection endpoint to the latest one created (#17767)
* using the new registry endpoint
* updating the service connection
* Changing the name of acr service endpoint to SqlToolsContainer
* Updating web build acr endpoint as well.
* Notebooks: Add Tooltips for Link/Image Buttons on Markdown Toolbar (#17763)
* Add title for tooltips
* Tweak tooltips
* Added UI for user to accept EULA when deploying sql proj to docker container (#17762)
* fix sorting bug (#17769)
* fix sorting bug
* comments
* Set default radio button selection, evaluate default component popula… (#17764)
* Set default radio button selection, evaluate default component population off of selection instead of unprocessed input
* rename var
* if -> switches
* Remove project radio buttons because they require commands that aren't yet checked in (and fail as a result)
* Added fix for Publish Target Label Position (#17771)
* Added fix for Publish Target Label Position
* renamed checkbox
* LEGO: check in for main to temporary branch. (#17775)
* LEGO: check in for main to temporary branch. (#17778)
Co-authored-by: Alex Ma <alma1@microsoft.com>
* update dashboard taskbar separator (#17779)
* remove comments
* fix applying decorations
* add test
* enable find in sql result set
* add tests and update sql results highlight logic
* calculate the outputComponent index
* fix editor issues later
* remove newline replace on search
* address comments
* fix highlight issue
Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
Co-authored-by: Alan Ren <alanren@microsoft.com>
Co-authored-by: Lucy Zhang <luczhan@microsoft.com>
Co-authored-by: Lewis Sanchez <87730006+lewis-sanchez@users.noreply.github.com>
Co-authored-by: Kim Santiago <31145923+kisantia@users.noreply.github.com>
Co-authored-by: Benjin Dubishar <benjin.dubishar@gmail.com>
Co-authored-by: Noureldine Yehia <t-nyehia@microsoft.com>
Co-authored-by: Alexander Ivanov <nahk-ivanov@users.noreply.github.com>
Co-authored-by: Aditya Bist <adbist@microsoft.com>
Co-authored-by: Sai Avishkar Sreerama <74571829+ssreerama@users.noreply.github.com>
Co-authored-by: Alex Ma <alma1@microsoft.com>
Co-authored-by: Leila Lali <llali@microsoft.com>
Co-authored-by: csigs <csigs@users.noreply.github.com>
Co-authored-by: Cory Rivera <corivera@microsoft.com>
Co-authored-by: Candice Ye <candiceye@berkeley.edu>
Co-authored-by: Aasim Khan <aasimkhan30@gmail.com>
Co-authored-by: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com>
242 lines
8.9 KiB
TypeScript
242 lines
8.9 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import * as azdata from 'azdata';
|
|
|
|
import { Event } from 'vs/base/common/event';
|
|
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
|
import { URI, UriComponents } from 'vs/base/common/uri';
|
|
import { RenderMimeRegistry } from 'sql/workbench/services/notebook/browser/outputs/registry';
|
|
import { ModelFactory } from 'sql/workbench/services/notebook/browser/models/modelFactory';
|
|
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
|
|
import { ISingleNotebookEditOperation } from 'sql/workbench/api/common/sqlExtHostTypes';
|
|
import { ICellModel, INotebookModel } from 'sql/workbench/services/notebook/browser/models/modelInterfaces';
|
|
import { NotebookChangeType, CellType } from 'sql/workbench/services/notebook/common/contracts';
|
|
import { IBootstrapParams } from 'sql/workbench/services/bootstrap/common/bootstrapParams';
|
|
import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
|
|
import { Range } from 'vs/editor/common/core/range';
|
|
import { IEditorPane } from 'vs/workbench/common/editor';
|
|
import { INotebookInput } from 'sql/workbench/services/notebook/browser/interface';
|
|
import { INotebookShowOptions } from 'sql/workbench/api/common/sqlExtHost.protocol';
|
|
import { NotebookViewsExtension } from 'sql/workbench/services/notebook/browser/notebookViews/notebookViewsExtension';
|
|
|
|
export const SERVICE_ID = 'sqlNotebookService';
|
|
export const INotebookService = createDecorator<INotebookService>(SERVICE_ID);
|
|
|
|
export const DEFAULT_NOTEBOOK_PROVIDER = 'builtin';
|
|
export const DEFAULT_NOTEBOOK_FILETYPE = '.ipynb';
|
|
export const SQL_NOTEBOOK_PROVIDER = 'sql';
|
|
export const OVERRIDE_EDITOR_THEMING_SETTING = 'notebook.overrideEditorTheming';
|
|
|
|
export interface ILanguageMagic {
|
|
magic: string;
|
|
language: string;
|
|
kernels?: string[];
|
|
executionTarget?: string;
|
|
}
|
|
|
|
/**
|
|
* Valid navigation providers.
|
|
*/
|
|
export enum NavigationProviders {
|
|
NotebooksNavigator = 'BookNavigator.Notebooks',
|
|
ProvidedBooksNavigator = 'BookNavigator.ProvidedBooks'
|
|
}
|
|
|
|
export const unsavedBooksContextKey = 'unsavedBooks';
|
|
|
|
export interface INotebookService {
|
|
_serviceBrand: undefined;
|
|
|
|
readonly onNotebookEditorAdd: Event<INotebookEditor>;
|
|
readonly onNotebookEditorRemove: Event<INotebookEditor>;
|
|
onNotebookEditorRename: Event<INotebookEditor>;
|
|
|
|
readonly isRegistrationComplete: boolean;
|
|
readonly registrationComplete: Promise<void>;
|
|
readonly languageMagics: ILanguageMagic[];
|
|
|
|
registerSerializationProvider(providerId: string, provider: ISerializationProvider): void;
|
|
|
|
registerExecuteProvider(providerId: string, provider: IExecuteProvider): void;
|
|
|
|
unregisterSerializationProvider(providerId: string): void;
|
|
|
|
unregisterExecuteProvider(providerId: string): void;
|
|
|
|
registerNavigationProvider(provider: INavigationProvider): void;
|
|
|
|
getNavigationProvider(notebookUri: URI): INavigationProvider;
|
|
|
|
getSupportedFileExtensions(): string[];
|
|
|
|
getProvidersForFileType(fileType: string): string[] | undefined;
|
|
|
|
getStandardKernelsForProvider(provider: string): azdata.nb.IStandardKernel[] | undefined;
|
|
|
|
getOrCreateSerializationManager(providerId: string, uri: URI): Promise<ISerializationManager>;
|
|
|
|
getOrCreateExecuteManager(providerId: string, uri: URI): Thenable<IExecuteManager>;
|
|
|
|
addNotebookEditor(editor: INotebookEditor): void;
|
|
|
|
removeNotebookEditor(editor: INotebookEditor): void;
|
|
|
|
listNotebookEditors(): INotebookEditor[];
|
|
|
|
findNotebookEditor(notebookUri: URI): INotebookEditor | undefined;
|
|
|
|
getMimeRegistry(): RenderMimeRegistry;
|
|
|
|
renameNotebookEditor(oldUri: URI, newUri: URI, currentEditor: INotebookEditor): void;
|
|
|
|
/**
|
|
* Checks if a notebook has previously been marked as trusted, and that
|
|
* the notebook has not changed on disk since that time. If the notebook
|
|
* is currently dirty in the app, the previous trusted state will be used even
|
|
* if it's altered on disk since the version in our UI is based on previously trusted
|
|
* content.
|
|
* @param notebookUri the URI identifying a notebook
|
|
* @param isDirty is the notebook marked as dirty in by the text model trackers?
|
|
*/
|
|
isNotebookTrustCached(notebookUri: URI, isDirty: boolean): Promise<boolean>;
|
|
/**
|
|
* Serializes an impactful Notebook state change. This will result
|
|
* in trusted state being serialized if needed, and notifications being
|
|
* sent to listeners that can act on the point-in-time notebook state
|
|
* @param notebookUri The URI identifying a notebook.
|
|
* @param changeType The type of notebook state change to serialize.
|
|
* @param cell (Optional) The notebook cell associated with the state change.
|
|
* @param isTrusted (Optional) A manual override for the notebook's trusted state.
|
|
*/
|
|
serializeNotebookStateChange(notebookUri: URI, changeType: NotebookChangeType, cell?: ICellModel, isTrusted?: boolean): Promise<void>;
|
|
|
|
/**
|
|
*
|
|
* @param notebookUri URI of the notebook to navigate to
|
|
* @param sectionId ID of the section to navigate to
|
|
*/
|
|
navigateTo(notebookUri: URI, sectionId: string): void;
|
|
|
|
/**
|
|
* Sets the trusted mode for the specified notebook.
|
|
* @param notebookUri URI of the notebook to navigate to
|
|
* @param isTrusted True if notebook is to be set to trusted, false otherwise.
|
|
*/
|
|
setTrusted(notebookUri: URI, isTrusted: boolean): Promise<boolean>;
|
|
|
|
/**
|
|
* Event that gets fired when a cell is executed.
|
|
*/
|
|
onCodeCellExecutionStart: Event<void>;
|
|
|
|
/**
|
|
* Fires the onCodeCellExecutionStart event.
|
|
*/
|
|
notifyCellExecutionStarted(): void;
|
|
|
|
openNotebook(resource: UriComponents, options: INotebookShowOptions): Promise<IEditorPane | undefined>;
|
|
|
|
getUntitledUriPath(originalTitle: string): string;
|
|
}
|
|
|
|
export interface IExecuteProvider {
|
|
readonly providerId: string;
|
|
getExecuteManager(notebookUri: URI): Thenable<IExecuteManager>;
|
|
handleNotebookClosed(notebookUri: URI): void;
|
|
}
|
|
|
|
export interface ISerializationProvider {
|
|
readonly providerId: string;
|
|
getSerializationManager(notebookUri: URI): Thenable<ISerializationManager>;
|
|
}
|
|
|
|
export interface ISerializationManager {
|
|
providerId: string;
|
|
readonly contentManager: azdata.nb.ContentManager;
|
|
}
|
|
|
|
export interface IExecuteManager {
|
|
providerId: string;
|
|
readonly sessionManager: azdata.nb.SessionManager;
|
|
readonly serverManager: azdata.nb.ServerManager;
|
|
}
|
|
|
|
export interface IProviderInfo {
|
|
providerId: string;
|
|
providers: string[];
|
|
}
|
|
|
|
export interface INotebookParams extends IBootstrapParams {
|
|
notebookUri: URI;
|
|
input: INotebookInput;
|
|
providerInfo: Promise<IProviderInfo>;
|
|
profile?: IConnectionProfile;
|
|
modelFactory?: ModelFactory;
|
|
}
|
|
|
|
/**
|
|
* Defines a section in a notebook as the header text for that section,
|
|
* the relative URI that can be used to link to it inside Notebook documents
|
|
*/
|
|
export interface INotebookSection {
|
|
header: string;
|
|
relativeUri: string;
|
|
}
|
|
|
|
export interface ICellEditorProvider {
|
|
hasEditor(): boolean;
|
|
isCellOutput: boolean;
|
|
cellGuid(): string;
|
|
getEditor(): BaseTextEditor;
|
|
deltaDecorations(newDecorationsRange: NotebookRange | NotebookRange[], oldDecorationsRange: NotebookRange | NotebookRange[]): void;
|
|
}
|
|
|
|
export class NotebookRange extends Range {
|
|
updateActiveCell(cell: ICellModel) {
|
|
this.cell = cell;
|
|
}
|
|
cell: ICellModel;
|
|
isMarkdownSourceCell: boolean;
|
|
outputComponentIndex: number;
|
|
|
|
constructor(cell: ICellModel, startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, markdownEditMode?: boolean, outputIndex?: number) {
|
|
super(startLineNumber, startColumn, endLineNumber, endColumn);
|
|
this.updateActiveCell(cell);
|
|
this.isMarkdownSourceCell = markdownEditMode ? markdownEditMode : false;
|
|
this.outputComponentIndex = outputIndex >= 0 ? outputIndex : -1;
|
|
}
|
|
}
|
|
|
|
export interface INotebookEditor {
|
|
readonly notebookParams: INotebookParams;
|
|
readonly id: string;
|
|
readonly cells?: ICellModel[];
|
|
readonly cellEditors: ICellEditorProvider[];
|
|
readonly modelReady: Promise<INotebookModel>;
|
|
readonly model: INotebookModel | null;
|
|
readonly views: NotebookViewsExtension | null;
|
|
isDirty(): boolean;
|
|
isActive(): boolean;
|
|
isVisible(): boolean;
|
|
executeEdits(edits: ISingleNotebookEditOperation[]): boolean;
|
|
runCell(cell: ICellModel): Promise<boolean>;
|
|
runAllCells(startCell?: ICellModel, endCell?: ICellModel): Promise<boolean>;
|
|
clearOutput(cell: ICellModel): Promise<boolean>;
|
|
clearAllOutputs(): Promise<boolean>;
|
|
getSections(): INotebookSection[];
|
|
navigateToSection(sectionId: string): void;
|
|
deltaDecorations(newDecorationsRange: NotebookRange | NotebookRange[], oldDecorationsRange: NotebookRange | NotebookRange[]): void;
|
|
addCell(cellType: CellType, index?: number, event?: UIEvent);
|
|
}
|
|
|
|
export interface INavigationProvider {
|
|
providerId: string;
|
|
hasNavigation: boolean;
|
|
getNavigation(uri: URI): Thenable<azdata.nb.NavigationResult>;
|
|
onNext(uri: URI): void;
|
|
onPrevious(uri: URI): void;
|
|
}
|