OK Justin, i kind of "revived" my PlusMinusAdjuster. The relevant files are here,

https://github.com/chrispetsos/prefsEditors/blob/master/src/shared/adjusters/js/PlusMinusAdjuster.js
https://github.com/chrispetsos/prefsEditors/blob/master/src/shared/adjusters/js/MagnifierAdjuster.js
https://github.com/chrispetsos/prefsEditors/blob/master/src/shared/adjusters/js/TextSizeAdjuster.js

So, now i have the identical Magnifier and Text-size adjusters running together in the "Increase Size" panel. The PlusMinusAdjuster.js file has most of the shared logic, with sharing being feasible by passing method parameters here and there. I know this is not the optimal solution in terms of design but this was the best i could come up with.
As you will realize, there is a lot of duplicate code around, only with some method, listener or selector rename. This has been due to the fact that grade merging mandated that i have different member names, such as listeners, invokers, previews etc. Also, the fact that all HTML markup is in a single file made me have different selectors for the duplicated elements.

So, in this version i am experiencing a similar issue with the preview-per-setting bug being broken after a Save/Reset/Cancel. Basically, i update the UI of the PlusMinusAdjusters after every value change here,
https://github.com/chrispetsos/prefsEditors/blob/master/src/shared/adjusters/js/PlusMinusAdjuster.js#L44
From the first time that refreshView() gets executed, previews are broken the same way until i reload the page. Could the origin of this bug be the same with the other situtation? Do you think it will be resolved once we update the Infusion lib?


Date: Wed, 23 Oct 2013 07:41:39 -0700
From: notifications@github.com
To: prefsEditors@noreply.github.com
CC: chrispetsos@msn.com
Subject: Re: [prefsEditors] GPII-187, GPII-188, GPII-225, GPII-227 contributions (#7)

In src/pmt/js/PMT.js:

> +                },
> +                resetButtonText: {
> +                    expander: {
> +                        func: "gpii.uiOptions.pmt.lookupMsg",
> +                        args: ["{uiOptionsLoader}.msgBundle", "resetButtonText"]
> +                    }
> +                },
> +                cancelButtonText: {
> +                    expander: {
> +                        func: "gpii.uiOptions.pmt.lookupMsg",
> +                        args: ["{uiOptionsLoader}.msgBundle", "cancelButtonText"]
> +                    }
> +                }
> +            },
> +            components: {
> +                increaseSizeExtraAdjustersComponent: {

Unfortunately for now the merging is probably the best option if for no other reason than you both have implementations with it already. As we talked about earlier we are close to having the new composite panel grade in place. This should alleviate the issues with creating these complex panels and being able to reuse code. However, that will come with a lot of other refactoring to infusion as well. At this point you should try to get things in as good a state as possible to be ready for integration and merging into the GPII/prefsEditor repo. Hope that addresses things but let me know if there are more concerns or anything I missed.
…
 On Oct 23, 2013, at 9:33 AM, chrispetsos <notifications@github.com> wrote:

 In src/pmt/js/PMT.js:

 > +                },
 > +                resetButtonText: {
 > +                    expander: {
 > +                        func: "gpii.uiOptions.pmt.lookupMsg",
 > +                        args: ["{uiOptionsLoader}.msgBundle", "resetButtonText"]
 > +                    }
 > +                },
 > +                cancelButtonText: {
 > +                    expander: {
 > +                        func: "gpii.uiOptions.pmt.lookupMsg",
 > +                        args: ["{uiOptionsLoader}.msgBundle", "cancelButtonText"]
 > +                    }
 > +                }
 > +            },
 > +            components: {
 > +                increaseSizeExtraAdjustersComponent: {
 Yes Justin that did it thanks! So, from my point of view, the only big change that we will need now is related to the +/- adjuster. As you may have seen, i had to comment out all code of my PlusMinusAdjuster.js https://github.com/chrispetsos/prefsEditors/blob/master/src/shared/adjusters/js/PlusMinusAdjuster.js This had to be done after merging for a number of reasons which have to do with the fact that many members had to be renamed in order not to have merging conflicts. For example, that code operates on "that.model.value" while now every preference has its own name e.g. "model.magnification". Same stands for previews etc. That used to work because each adjuster was a separate component, but now we merge everything in a single component. How can this be reused after merging? Perhaps Alex's version is better at that? What do you think? I the meantime, i had an email from Alex a couple of days ago stating, "Also, I suggest we use your way of combining adjusters, rather than grade merging like in Speak Text (the grade merging was an attempt for something that eventually even Justin and Antranig were unable to resolve)." I'm confused... Even if we cannot currently go for reusable code, under the pressing timeframe we have, what would you suggest? Maybe duplicate all code and only rename the needed parts? I know though that you are against letting duplicate code in repo, and you are correct doing that. Don't know... any thoughts? Date: Wed, 23 Oct 2013 06:08:50 -0700 From: notifications@github.com To: prefsEditors@noreply.github.com CC: chrispetsos@msn.com Subject: Re: [prefsEditors] GPII-187, GPII-188, GPII-225, GPII-227 contributions (#7) In src/pmt/js/PMT.js:
 + }, + resetButtonText: { + expander: { + func: "gpii.uiOptions.pmt.lookupMsg", + args: ["{uiOptionsLoader}.msgBundle", "resetButtonText"] + } + }, + cancelButtonText: { + expander: { + func: "gpii.uiOptions.pmt.lookupMsg", + args: ["{uiOptionsLoader}.msgBundle", "cancelButtonText"] + } + } + }, + components: { + increaseSizeExtraAdjustersComponent: {
 Because the option takes in a function as opposed to a name, you have to declare that function before it is used. Basically, just move the code for gpii.uiOptions.panels.arrayMergePolicy to the top of the file and things should work. — Reply to this email directly or view it on GitHub.
 —
 Reply to this email directly or view it on GitHub.


—
Reply to this email directly or view it on GitHub.