[Controls] Remove labs:dashboard:dashboardControls UI setting (#168997)

Closes https://github.com/elastic/kibana/issues/162978

## Summary

This PR removes the `labs:dashboard:dashboardControls` advanced UI
setting. The removal of this setting is **not** a breaking change, as it
hasn't functioned properly for quite some time; it is completely safe to
remove this setting **regardless** of the previous value. Telemetry
tracking for this setting is also no longer required.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Hannah Mudge 2023-10-17 08:41:27 -06:00 committed by GitHub
parent d871474d19
commit b7f1bb9c18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 3 additions and 66 deletions

View file

@ -52,7 +52,6 @@ export const TIMEPICKER_TIME_DEFAULTS_ID = 'timepicker:timeDefaults';
// Presentation labs settings
export const LABS_CANVAS_BY_VALUE_EMBEDDABLE_ID = 'labs:canvas:byValueEmbeddable';
export const LABS_CANVAS_ENABLE_UI_ID = 'labs:canvas:enable_ui';
export const LABS_DASHBOARD_CONTROLS_ID = 'labs:dashboard:dashboardControls';
export const LABS_DASHBOARD_DEFER_BELOW_FOLD_ID = 'labs:dashboard:deferBelowFold';
export const LABS_DASHBOARDS_ENABLE_UI_ID = 'labs:dashboard:enable_ui';

View file

@ -16,7 +16,6 @@ import { ViewMode } from '@kbn/embeddable-plugin/public';
import { ExitFullScreenButton } from '@kbn/shared-ux-button-exit-full-screen';
import { DashboardGrid } from '../grid';
import { pluginServices } from '../../../services/plugin_services';
import { useDashboardContainer } from '../../embeddable/dashboard_container';
import { DashboardEmptyScreen } from '../empty_screen/dashboard_empty_screen';
@ -35,9 +34,6 @@ export const useDebouncedWidthObserver = (skipDebounce = false, wait = 100) => {
};
export const DashboardViewportComponent = () => {
const {
settings: { isProjectEnabledInLabs },
} = pluginServices.getServices();
const controlsRoot = useRef(null);
const dashboard = useDashboardContainer();
@ -60,7 +56,6 @@ export const DashboardViewportComponent = () => {
const description = dashboard.select((state) => state.explicitInput.description);
const focusedPanelId = dashboard.select((state) => state.componentState.focusedPanelId);
const expandedPanelId = dashboard.select((state) => state.componentState.expandedPanelId);
const controlsEnabled = isProjectEnabledInLabs('labs:dashboard:dashboardControls');
const { ref: resizeRef, width: viewportWidth } = useDebouncedWidthObserver(!!focusedPanelId);
@ -71,7 +66,7 @@ export const DashboardViewportComponent = () => {
return (
<div className={'dshDashboardViewportWrapper'}>
{controlsEnabled && controlGroup && viewMode !== ViewMode.PRINT ? (
{controlGroup && viewMode !== ViewMode.PRINT ? (
<div
className={controlCount > 0 ? 'dshDashboardViewport-controls' : ''}
ref={controlsRoot}

View file

@ -489,10 +489,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'labs:dashboard:dashboardControls': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'labs:dashboard:linksPanel': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },

View file

@ -137,7 +137,6 @@ export interface UsageStats {
'labs:dashboard:enable_ui': boolean;
'labs:dashboard:linksPanel': boolean;
'labs:dashboard:deferBelowFold': boolean;
'labs:dashboard:dashboardControls': boolean;
'discover:rowHeightOption': number;
hideAnnouncements: boolean;
isDefaultIndexMigrated: boolean;

View file

@ -11,15 +11,9 @@ import { i18n } from '@kbn/i18n';
export const LABS_PROJECT_PREFIX = 'labs:';
export const DEFER_BELOW_FOLD = `${LABS_PROJECT_PREFIX}dashboard:deferBelowFold` as const;
export const DASHBOARD_LINKS_PANEL = `${LABS_PROJECT_PREFIX}dashboard:linksPanel` as const;
export const DASHBOARD_CONTROLS = `${LABS_PROJECT_PREFIX}dashboard:dashboardControls` as const;
export const BY_VALUE_EMBEDDABLE = `${LABS_PROJECT_PREFIX}canvas:byValueEmbeddable` as const;
export const projectIDs = [
DEFER_BELOW_FOLD,
DASHBOARD_CONTROLS,
BY_VALUE_EMBEDDABLE,
DASHBOARD_LINKS_PANEL,
] as const;
export const projectIDs = [DEFER_BELOW_FOLD, BY_VALUE_EMBEDDABLE, DASHBOARD_LINKS_PANEL] as const;
export const environmentNames = ['kibana', 'browser', 'session'] as const;
export const solutionNames = ['canvas', 'dashboard', 'presentation'] as const;
@ -49,20 +43,6 @@ export const projects: { [ID in ProjectID]: ProjectConfig & { id: ID } } = {
}),
solutions: ['dashboard'],
},
[DASHBOARD_CONTROLS]: {
id: DASHBOARD_CONTROLS,
isActive: true,
isDisplayed: true,
environments: ['kibana', 'browser', 'session'],
name: i18n.translate('presentationUtil.labs.enableDashboardControlsProjectName', {
defaultMessage: 'Enable dashboard controls',
}),
description: i18n.translate('presentationUtil.labs.enableDashboardControlsProjectDescription', {
defaultMessage:
'Enables the controls system for dashboard, which allows dashboard authors to more easily build interactive elements for their users.',
}),
solutions: ['dashboard'],
},
[DASHBOARD_LINKS_PANEL]: {
id: DASHBOARD_LINKS_PANEL,
isActive: true,

View file

@ -9923,12 +9923,6 @@
"description": "Non-default value of setting."
}
},
"labs:dashboard:dashboardControls": {
"type": "boolean",
"_meta": {
"description": "Non-default value of setting."
}
},
"labs:dashboard:linksPanel": {
"type": "boolean",
"_meta": {

View file

@ -13,7 +13,7 @@ export default function ({ loadTestFile, getService, getPageObjects }: FtrProvid
const kibanaServer = getService('kibanaServer');
const security = getService('security');
const { dashboardControls, dashboard } = getPageObjects(['dashboardControls', 'dashboard']);
const { dashboard } = getPageObjects(['dashboard']);
async function setup() {
await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/dashboard/current/data');
@ -28,8 +28,6 @@ export default function ({ loadTestFile, getService, getPageObjects }: FtrProvid
// enable the controls lab and navigate to the dashboard listing page to start
await dashboard.navigateToApp();
await dashboardControls.enableControlsLab();
await dashboard.navigateToApp();
await dashboard.preserveCrossAppState();
}

View file

@ -50,8 +50,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
to: 'Dec 3, 2018 @ 00:00:00.000',
});
await dashboard.navigateToApp();
await dashboardControls.enableControlsLab();
await dashboard.navigateToApp();
await dashboard.preserveCrossAppState();
await dashboard.gotoDashboardLandingPage();
await dashboard.clickNewDashboard();

View file

@ -54,26 +54,11 @@ export class DashboardPageControls extends FtrService {
private readonly testSubjects = this.ctx.getService('testSubjects');
private readonly common = this.ctx.getPageObject('common');
private readonly header = this.ctx.getPageObject('header');
private readonly settings = this.ctx.getPageObject('settings');
/* -----------------------------------------------------------
General controls functions
----------------------------------------------------------- */
public async enableControlsLab() {
await this.header.clickStackManagement();
await this.settings.clickKibanaSettings();
const currentValue = await this.settings.getAdvancedSettingAriaCheckbox(
'labs:dashboard:dashboardControls'
);
if (currentValue !== 'true') {
await this.settings.toggleAdvancedSettingCheckbox('labs:dashboard:dashboardControls');
}
}
public async expectControlsEmpty() {
await this.testSubjects.existOrFail('controls-empty');
}

View file

@ -4792,8 +4792,6 @@
"presentationUtil.labs.components.titleLabel": "Ateliers",
"presentationUtil.labs.enableByValueEmbeddableDescription": "Active la prise en charge pour les éléments d'incorporation by-value dans Canvas",
"presentationUtil.labs.enableByValueEmbeddableName": "Éléments d'incorporation By-Value",
"presentationUtil.labs.enableDashboardControlsProjectDescription": "Active le système de contrôles pour le tableau de bord, ce qui permet à ses auteurs de créer plus facilement des éléments interactifs pour leurs utilisateurs.",
"presentationUtil.labs.enableDashboardControlsProjectName": "Activer les contrôles pour le tableau de bord",
"presentationUtil.labs.enableDeferBelowFoldProjectDescription": "Les panneaux sous \"le pli\" (la zone masquée en dessous de la fenêtre accessible en faisant défiler), ne se chargeront pas immédiatement, mais seulement lorsqu'ils entreront dans la fenêtre d'affichage.",
"presentationUtil.labs.enableDeferBelowFoldProjectName": "Différer le chargement des panneaux sous \"le pli\"",
"presentationUtil.saveModalDashboard.addToDashboardLabel": "Ajouter au tableau de bord",

View file

@ -4808,8 +4808,6 @@
"presentationUtil.labs.components.titleLabel": "ラボ",
"presentationUtil.labs.enableByValueEmbeddableDescription": "キャンバスでby-value埋め込み可能オブジェクトのサポートを有効にします",
"presentationUtil.labs.enableByValueEmbeddableName": "By-Value埋め込み可能オブジェクト",
"presentationUtil.labs.enableDashboardControlsProjectDescription": "ダッシュボードのコントロールシステムを有効にします。これにより、ダッシュボードの作成者は、ユーザー向けのインタラクティブな要素をより簡単に構築できます。",
"presentationUtil.labs.enableDashboardControlsProjectName": "ダッシュボードコントロールを有効にする",
"presentationUtil.labs.enableDeferBelowFoldProjectDescription": "「区切り」の下のすべてのパネル(ウィンドウ下部の下にある非表示の領域)はすぐに読み込まれません。ビューポートを入力するときにのみ読み込まれます",
"presentationUtil.labs.enableDeferBelowFoldProjectName": "「区切り」の下のパネルの読み込みを延期",
"presentationUtil.saveModalDashboard.addToDashboardLabel": "ダッシュボードに追加",

View file

@ -4807,8 +4807,6 @@
"presentationUtil.labs.components.titleLabel": "实验",
"presentationUtil.labs.enableByValueEmbeddableDescription": "在 Canvas 中启用按值嵌入的支持",
"presentationUtil.labs.enableByValueEmbeddableName": "按值嵌入",
"presentationUtil.labs.enableDashboardControlsProjectDescription": "为仪表板启用控件系统,这允许仪表板作者更轻松地为其用户构建交互式元素。",
"presentationUtil.labs.enableDashboardControlsProjectName": "启用仪表板控件",
"presentationUtil.labs.enableDeferBelowFoldProjectDescription": "“折叠”下的任何面板即可通过滚动访问的窗口底部隐藏的区域,将不会立即加载,而仅在进入视区时加载",
"presentationUtil.labs.enableDeferBelowFoldProjectName": "推迟加载“折叠”下的面板",
"presentationUtil.saveModalDashboard.addToDashboardLabel": "添加到仪表板",

View file

@ -55,7 +55,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});
it('should render all panels on the dashboard', async () => {
await dashboardControls.enableControlsLab();
await dashboard.navigateToApp();
await dashboard.loadSavedDashboard('[8.0.0] Controls Dashboard');