@@ -405,6 +405,10 @@ export class VisualizeEmbeddable
405
405
const abortController = this . abortController ;
406
406
407
407
let exprVisLayers = { } as ExprVisLayers ;
408
+ // TODO: final eligibility will be defined as part of a separate effort.
409
+ // This includes not fetching any layers / not showing any layers, when in the
410
+ // edit context of the vis
411
+ // See https://github.com/opensearch-project/OpenSearch-Dashboards/issues/3268
408
412
if ( isEligibleForVisLayers ( this . vis ) ) {
409
413
exprVisLayers = await this . fetchVisLayers ( expressionParams , abortController ) ;
410
414
}
@@ -485,7 +489,8 @@ export class VisualizeEmbeddable
485
489
486
490
/**
487
491
* Collects any VisLayers from plugin expressions functions
488
- * by fetching all AugmentVisSavedObjects that match the vis ID
492
+ * by fetching all AugmentVisSavedObjects that match the vis
493
+ * saved object ID
489
494
*/
490
495
fetchVisLayers = async (
491
496
expressionParams : IExpressionLoaderParams ,
@@ -498,6 +503,8 @@ export class VisualizeEmbeddable
498
503
) ;
499
504
if ( ! isEmpty ( augmentVisSavedObjs ) && ! abortController . signal . aborted ) {
500
505
const visLayersPipeline = buildPipelineFromAugmentVisSavedObjs ( augmentVisSavedObjs ) ;
506
+ // The initial input for the pipeline will just be an empty arr of VisLayers. As plugin
507
+ // expression functions are ran, they will incrementally append their generated VisLayers to it.
501
508
const visLayersPipelineInput = {
502
509
type : 'vis_layers' ,
503
510
layers : [ ] as VisLayers ,
0 commit comments