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

Prefs Framework Composite Panel system modifies selectors after construction

    Details

    • Type: Bug
    • Status: Pull Request
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      One of the immediate next goals of the framework after implementing the new style FLUID-6148 potentia II system is to make all component options immutable for FLUID-6145. One of the significant remaining sources of options mutation is in the Prefs framework's fluid.prefs.compositePanel.surfaceSubpanelRendererSelectors in Panels.js . This currently reads:

          fluid.prefs.compositePanel.surfaceSubpanelRendererSelectors = function (that, components, selectors) {
              fluid.each(components, function (compEntry, compName) {
                  var compOpts = compEntry[0];
                  if (fluid.prefs.compositePanel.isPanel(compOpts.type, compOpts.options)) {
                      var opts = fluid.prefs.compositePanel.prefetchComponentOptions(compOpts.type, compOpts.options);
                      fluid.each(opts.selectors, function (selector, selName) {
                          if (!opts.selectorsToIgnore || opts.selectorsToIgnore.indexOf(selName) < 0) {
                              fluid.set(selectors,  fluid.prefs.compositePanel.rebaseSelectorName(compName, selName), selectors[compName] + " " + selector);
                          }
                      });
                  }
              });
          };
      

      The fluid.set call actually targets the component's own "options.selectors" entry and this function is called during the component's onCreate event. In the upcoming framework we can't expect to modify the selector collection after construction (and even in the current one it creates a race risk if one of them was evaluated during construction) so we will need to find an alternate means of implementing this workflow which doesn't modify the component's options.

        Attachments

          Activity

            People

            • Assignee:
              jobara Justin Obara
              Reporter:
              antranig Antranig Basman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: