FLUID-6231: Clarify / correctly document behaviour of fluid.promise.fireTransformEvent filterNamespaces option

Metadata

Source
FLUID-6231
Type
Improvement
Priority
Major
Status
Closed
Resolution
Fixed
Assignee
Alan Harnum
Reporter
Alan Harnum
Created
2017-11-28T13:55:57.529-0500
Updated
2024-07-22T10:35:27.199-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. Tech. Documentation

Description

The "esoteric but powerful" fireTransformEvent function documented at https://docs.fluidproject.org/infusion/development/PromisesAPI.html#fluidpromisefiretransformeventevent-payload-options is indeed powerful, but possibly too esoteric in regards to the (optional) filterNameSpaces feature.

The documentation states as follows:

filterNamespaces: {Array of String} A collection of event namespaces to be filtered out of the processing chain for this particular firing

As written in the documentation, this sounds (to my ear at least) like a blacklist filter option that will remove ("filter out") any event namespaces that match from the chain.

By contrast, both the implementation and its in-code API documentation and the test make clear that this is a whitelist filter option, and removes all event namespaces that do not match the collection in the array:

We should correct the documentation; longer term, this probably needs a way to operate the chain with the option of both including or excluding event namespaces.

Comments