We have kind of a weird organizational scheme: the functions are organized as methods of a var. I'd imagine that's to make the functions easier to find, but currently it doesn't do anything of the sort. We should have a folder of common code, and then other js files specific to each of the tabs/dialogs. I'd feel better about getting rid of the weird var stuff altogether, but if not we need to rename the vars to have more intuitive names (for the common files, maybe they can have the same name as the file). I'll work on this after our next release, since merging this patch with other patches would be basically impossible.
I agree that we would certainly benefit from some refactoring, especially around sorting out the mess I've made of what code goes in what js library. The functions within vars structure is a somewhat common js design pattern to create namespaces and avoid collisions between functions with the same names. Ultimately, it's our call whether we want to keep using this pattern. I'd suggest that we make the namespace name (e.g. 'qaTools') match the js file name, so that it's obvious when looking at a function call what file it's coming from.
Sounds like code clean up would be nice, but not necessary to get QAX out the door. Let's still work on this if it'll make developing features and functionality easier for QAX 2.0 (whenever that happens). :-)
Priority: -- → P3
Component: QA Community Extension → QA Community Extension
Product: Webtools → Other Applications
Version: Trunk → unspecified
I'd argue that refactoring for refactoring's sake is not really a high priority goal. I'm happy with doing refactoring as we fix different issues on a file by file basis. Marking this as low priority.
Priority: P3 → P4
Litmus has been replaced by MozTrap. If we want an extension to integrate with MozTrap, it would be better to start from scratch with a new extension rather than trying to shoehorn that functionality into the >5 year old QAC.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.