Skip to content

Commit c881755

Browse files
committed
Add few comments
Signed-off-by: Tyler Ohlsen <[email protected]>
1 parent 3e9df58 commit c881755

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/plugins/visualizations/public/embeddable/visualize_embeddable.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,10 @@ export class VisualizeEmbeddable
405405
const abortController = this.abortController;
406406

407407
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
408412
if (isEligibleForVisLayers(this.vis)) {
409413
exprVisLayers = await this.fetchVisLayers(expressionParams, abortController);
410414
}
@@ -485,7 +489,8 @@ export class VisualizeEmbeddable
485489

486490
/**
487491
* 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
489494
*/
490495
fetchVisLayers = async (
491496
expressionParams: IExpressionLoaderParams,
@@ -498,6 +503,8 @@ export class VisualizeEmbeddable
498503
);
499504
if (!isEmpty(augmentVisSavedObjs) && !abortController.signal.aborted) {
500505
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.
501508
const visLayersPipelineInput = {
502509
type: 'vis_layers',
503510
layers: [] as VisLayers,

0 commit comments

Comments
 (0)