From e52aa01cf0a6dde33cb3fcc630c1d074ed80a32d Mon Sep 17 00:00:00 2001 From: Aasim Khan Date: Wed, 28 Jun 2023 10:25:38 -0700 Subject: [PATCH] Removing preview flag from OE filtering (#23486) * Removing preview flag from OE filtering * Fixing double node path bug * Cleaning header --- .../contrib/objectExplorer/browser/serverTreeView.ts | 4 ++-- .../services/objectExplorer/browser/connectionTreeAction.ts | 2 +- .../objectExplorer/browser/filterDialog/filterDialog.ts | 2 +- .../objectExplorer/browser/serverTreeActionProvider.ts | 5 +---- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/sql/workbench/contrib/objectExplorer/browser/serverTreeView.ts b/src/sql/workbench/contrib/objectExplorer/browser/serverTreeView.ts index cec4b1020e..7faeeb0b79 100644 --- a/src/sql/workbench/contrib/objectExplorer/browser/serverTreeView.ts +++ b/src/sql/workbench/contrib/objectExplorer/browser/serverTreeView.ts @@ -606,8 +606,8 @@ export class ServerTreeView extends Disposable implements IServerTreeView { public async filterElementChildren(node: TreeNode): Promise { await FilterDialog.getFiltersForProperties( node.filterProperties, - localize('objectExplorer.filterDialogTitle', "(Preview) Filter Settings: {0}", node.getConnectionProfile().title), - localize('objectExplorer.nodePath', "Node Path: {0}", node.nodePath), + localize('objectExplorer.filterDialogTitle', "Filter Settings"), + node.nodePath, node.filters, async (filters) => { let errorListener; diff --git a/src/sql/workbench/services/objectExplorer/browser/connectionTreeAction.ts b/src/sql/workbench/services/objectExplorer/browser/connectionTreeAction.ts index c661081965..17150f11a8 100644 --- a/src/sql/workbench/services/objectExplorer/browser/connectionTreeAction.ts +++ b/src/sql/workbench/services/objectExplorer/browser/connectionTreeAction.ts @@ -390,7 +390,7 @@ export class DeleteConnectionAction extends Action { export class FilterChildrenAction extends Action { public static ID = 'objectExplorer.filterChildren'; - public static LABEL = localize('objectExplorer.filterChildren', "Filter (Preview)"); + public static LABEL = localize('objectExplorer.filterChildren', "Filter"); constructor( id: string, diff --git a/src/sql/workbench/services/objectExplorer/browser/filterDialog/filterDialog.ts b/src/sql/workbench/services/objectExplorer/browser/filterDialog/filterDialog.ts index e4fa070955..9e04f4a612 100644 --- a/src/sql/workbench/services/objectExplorer/browser/filterDialog/filterDialog.ts +++ b/src/sql/workbench/services/objectExplorer/browser/filterDialog/filterDialog.ts @@ -67,7 +67,7 @@ const CLEAR_COLUMN_HEADER = localize('objectExplorer.clearColumnHeader', "Clear" const TRUE_SELECT_BOX = localize('objectExplorer.trueSelectBox', "True"); const FALSE_SELECT_BOX = localize('objectExplorer.falseSelectBox', "False"); -function nodePathDisplayString(nodepath: string): string { return localize('objectExplorer.nodePath', "Node Path: {0}", nodepath) } +function nodePathDisplayString(nodepath: string): string { return localize('objectExplorer.nodePath', "Path: {0}", nodepath) } const PROPERTY_COLUMN_ID = 'property'; const OPERATOR_COLUMN_ID = 'operator'; diff --git a/src/sql/workbench/services/objectExplorer/browser/serverTreeActionProvider.ts b/src/sql/workbench/services/objectExplorer/browser/serverTreeActionProvider.ts index c156bcb013..571f673ac3 100644 --- a/src/sql/workbench/services/objectExplorer/browser/serverTreeActionProvider.ts +++ b/src/sql/workbench/services/objectExplorer/browser/serverTreeActionProvider.ts @@ -27,8 +27,6 @@ import { fillInActions } from 'vs/platform/actions/browser/menuEntryActionViewIt import { AsyncServerTree, ServerTreeElement } from 'sql/workbench/services/objectExplorer/browser/asyncServerTree'; import { ICapabilitiesService } from 'sql/platform/capabilities/common/capabilitiesService'; import { ILogService } from 'vs/platform/log/common/log'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES } from 'sql/workbench/common/constants'; /** * Provides actions for the server tree elements @@ -45,7 +43,6 @@ export class ServerTreeActionProvider { @IContextKeyService private _contextKeyService: IContextKeyService, @ICapabilitiesService private _capabilitiesService: ICapabilitiesService, @ILogService private _logService: ILogService, - @IConfigurationService private _configurationService: IConfigurationService ) { } @@ -252,7 +249,7 @@ export class ServerTreeActionProvider { // Contribute refresh action for scriptable objects via contribution if (!this.isScriptableObject(context)) { // Adding filter action if the node has filter properties - if (treeNode?.filterProperties?.length > 0 && this._configurationService.getValue(CONFIG_WORKBENCH_ENABLEPREVIEWFEATURES)) { + if (treeNode?.filterProperties?.length > 0) { actions.push(this._instantiationService.createInstance(FilterChildrenAction, FilterChildrenAction.ID, FilterChildrenAction.LABEL, context.treeNode)); } // Adding remove filter action if the node has filters applied to it and the action is not inline only.