diff --git a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts index 0caade9bd872..d8bb68417dc9 100644 --- a/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts +++ b/src/plugins/visualizations/public/embeddable/visualize_embeddable.ts @@ -405,6 +405,10 @@ export class VisualizeEmbeddable const abortController = this.abortController; let exprVisLayers = {} as ExprVisLayers; + // TODO: final eligibility will be defined as part of a separate effort. + // This includes not fetching any layers / not showing any layers, when in the + // edit context of the vis + // See https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3268 if (isEligibleForVisLayers(this.vis)) { exprVisLayers = await this.fetchVisLayers(expressionParams, abortController); } @@ -485,7 +489,8 @@ export class VisualizeEmbeddable /** * Collects any VisLayers from plugin expressions functions - * by fetching all AugmentVisSavedObjects that match the vis ID + * by fetching all AugmentVisSavedObjects that match the vis + * saved object ID */ fetchVisLayers = async ( expressionParams: IExpressionLoaderParams, @@ -498,6 +503,8 @@ export class VisualizeEmbeddable ); if (!isEmpty(augmentVisSavedObjs) && !abortController.signal.aborted) { const visLayersPipeline = buildPipelineFromAugmentVisSavedObjs(augmentVisSavedObjs); + // The initial input for the pipeline will just be an empty arr of VisLayers. As plugin + // expression functions are ran, they will incrementally append their generated VisLayers to it. const visLayersPipelineInput = { type: 'vis_layers', layers: [] as VisLayers,