Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-6231

Clarify / correctly document behaviour of fluid.promise.fireTransformEvent filterNamespaces option

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Tech. Documentation
    • Labels:
      None

      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.

        Attachments

          Activity

            People

            Assignee:
            aharnum Alan Harnum
            Reporter:
            aharnum Alan Harnum
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: