Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#8017 closed enhancement (fixed)

create stub files for widgets defined in other modules

Reported by: alex Owned by: alex
Priority: high Milestone: 1.3
Component: Dijit Version: 1.2.0
Keywords: files, module, package, dijit, parser Cc: bill, Adam Peller
Blocked By: Blocking:

Description

today, some widgets define multiple widget classes in a single file. For example, dijit.form.Button defines dijit.form.Button , dijit.form.DropDownButton , dijit.form.ComboButton , and dijit.form.ToggleButton .

This makes it difficult to understand from looking at files what features Dijit really provides and makes it more difficult for tools to build optimizations which may pre-require or auto-inline some bits of code.

In order to create a 1:1 file/widget mapping with low-impact and risk for 1.3, it has been agreed that we should add stub files for widgets defined in other "rollups". The stub for dijit.form.DropDownButton might look like:

// located at:
//    dijit/form/DropDownButton.js

dojo.provide("dijit.form.DropDownButton");
dojo.require("dijit.form.Button");

Change History (17)

comment:1 Changed 11 years ago by alex

here's a list of classes not correctly associated with their source files:

obelisk:dijit alex$ cat /tmp/out.txt 
./_Container.js:dojo.declare("dijit._Contained",
./_Container.js:dojo.declare("dijit._Container",
./_Container.js:dojo.declare("dijit._KeyNavContainer",
./_editor/range.js:dojo.declare("dijit.range.W3CRange",null, {
./_tree/model.js:dojo.declare(
./Dialog.js:dojo.declare("dijit.DialogUnderlay",
./Dialog.js:dojo.declare("dijit.TooltipDialog",
./form/_FormWidget.js:dojo.declare("dijit.form._FormValueWidget", dijit.form._FormWidget,
./form/Button.js:dojo.declare("dijit.form.DropDownButton", [dijit.form.Button, dijit._Container], {
./form/Button.js:dojo.declare("dijit.form.ComboButton", dijit.form.DropDownButton, {
./form/Button.js:dojo.declare("dijit.form.ToggleButton", dijit.form.Button, {
./form/CheckBox.js-	"dijit.form.RadioButton",
./form/ComboBox.js-	"dijit.form.ComboBoxMixin",
./form/ComboBox.js-	"dijit.form._ComboBoxMenu",
./form/ComboBox.js:dojo.declare("dijit.form._ComboBoxDataStore", null, {
./form/Form.js:dojo.declare("dijit.form._FormMixin", null,
./form/NumberTextBox.js-	"dijit.form.NumberTextBoxMixin",
./form/Slider.js-	"dijit.form.HorizontalSlider",
./form/Slider.js-	"dijit.form.VerticalSlider",
./form/Slider.js:dojo.declare("dijit.form._SliderMover",
./form/Slider.js:dojo.declare("dijit.form.HorizontalRule", [dijit._Widget, dijit._Templated],
./form/Slider.js:dojo.declare("dijit.form.VerticalRule", dijit.form.HorizontalRule,
./form/Slider.js:dojo.declare("dijit.form.HorizontalRuleLabels", dijit.form.HorizontalRule,
./form/Slider.js:dojo.declare("dijit.form.VerticalRuleLabels", dijit.form.HorizontalRuleLabels,
./form/ValidationTextBox.js-	"dijit.form.MappedTextBox",
./form/ValidationTextBox.js-	"dijit.form.RangeBoundTextBox",
./InlineEditBox.js-	"dijit._InlineEditor",
./layout/AccordionContainer.js:dojo.declare("dijit.layout.AccordionPane",
./layout/BorderContainer.js:dojo.declare("dijit.layout._Splitter", [ dijit._Widget, dijit._Templated ],
./layout/BorderContainer.js:dojo.declare("dijit.layout._Gutter", [dijit._Widget, dijit._Templated ],
./layout/StackContainer.js-	"dijit.layout.StackController",
./layout/StackContainer.js:dojo.declare("dijit.layout._StackButton",
./layout/TabContainer.js:dojo.declare("dijit.layout.TabController",
./layout/TabContainer.js:dojo.declare("dijit.layout._TabButton",
./Menu.js:dojo.declare("dijit.MenuItem",
./Menu.js:dojo.declare("dijit.PopupMenuItem",
./Menu.js:dojo.declare("dijit.MenuSeparator",
./Menu.js:dojo.declare("dijit.CheckedMenuItem",
./Toolbar.js:dojo.declare("dijit.ToolbarSeparator",
./Tooltip.js-	"dijit._MasterTooltip",
./Tree.js-	"dijit._TreeNode",
./Tree.js-	"dijit.tree.TreeStoreModel",
./Tree.js:dojo.declare("dijit.tree.ForestStoreModel", dijit.tree.TreeStoreModel, {

comment:2 Changed 11 years ago by alex

or a slightly cleaner version:

_Container.js:					dijit._Contained
_Container.js:					dijit._Container
_Container.js:					dijit._KeyNavContainer
_editor/range.js:					dijit.range.W3CRange
Dialog.js:						dijit.DialogUnderlay
Dialog.js:						dijit.TooltipDialog
form/_FormWidget.js:				dijit.form._FormValueWidget
form/Button.js:					dijit.form.DropDownButton
form/Button.js:					dijit.form.ComboButton
form/Button.js:					dijit.form.ToggleButton
form/CheckBox.js:				dijit.form.RadioButton
form/ComboBox.js:				dijit.form.ComboBoxMixin
form/ComboBox.js:				dijit.form._ComboBoxMenu
form/ComboBox.js:				dijit.form._ComboBoxDataStore
form/Form.js:					dijit.form._FormMixin
form/NumberTextBox.js:			dijit.form.NumberTextBoxMixin
form/Slider.js:					dijit.form.HorizontalSlider
form/Slider.js:					dijit.form.VerticalSlider
form/Slider.js:					dijit.form._SliderMover
form/Slider.js:					dijit.form.HorizontalRule
form/Slider.js:					dijit.form.VerticalRule
form/Slider.js:					dijit.form.HorizontalRuleLabels
form/Slider.js:					dijit.form.VerticalRuleLabels
form/ValidationTextBox.js:		dijit.form.MappedTextBox
form/ValidationTextBox.js:		dijit.form.RangeBoundTextBox
InlineEditBox.js:					dijit._InlineEditor
layout/AccordionContainer.js:		dijit.layout.AccordionPane
layout/BorderContainer.js:			dijit.layout._Splitter
layout/BorderContainer.js:			dijit.layout._Gutter
layout/StackContainer.js:			dijit.layout.StackController
layout/StackContainer.js:			dijit.layout._StackButton
layout/TabContainer.js:			dijit.layout.TabController
layout/TabContainer.js:			dijit.layout._TabButton
Menu.js:							dijit.MenuItem
Menu.js:							dijit.PopupMenuItem
Menu.js:							dijit.MenuSeparator
Menu.js:							dijit.CheckedMenuItem
Toolbar.js:						dijit.ToolbarSeparator
Tooltip.js:						dijit._MasterTooltip
Tree.js:							dijit._TreeNode
Tree.js:							dijit.tree.TreeStoreModel
Tree.js:							dijit.tree.ForestStoreModel

comment:3 Changed 11 years ago by alex

Resolution: fixed
Status: newclosed

fixed in [15592]

comment:4 Changed 11 years ago by bill

(In [16252]) Split menu widgets into separate files, refs #8017 !strict Maintains backwards compatibility b/c Menu dojo.require()'s MenuItem?, PopupMenuItem?, CheckedMenuItem?, and MenuSeparator? (note that those files do not dojo.require() Menu)

comment:5 Changed 11 years ago by bill

(In [16254]) Split _Container, _Contained, and _KeyNavContainer into separate files, refs #8017 !strict

Since these are (in theory) private mixins, I didn't maintain back-compat, in the sense that dojo.require("dijit._Container") no longer pulls in the definition for _Contained. Could put it in if people complain.

comment:6 Changed 11 years ago by bill

(In [16255]) Split TreeStoreModel? and ForestStoreModel? into separate files, refs #8017 !strict Maintains backwards compatibility b/c Tree.js dojo.require()'s TreeStoreModel?.js and ForestStoreModel?.js.

comment:7 Changed 11 years ago by bill

(In [16256]) Split DialogUnderlay? off to separate file, refs #8017 !strict

comment:8 Changed 11 years ago by bill

(In [16257]) Split TooltipDialog? off to separate file, refs #8017 !strict Dialog.js still requires TooltipDialog?.js for back-compat, but not vice-versa.

comment:9 Changed 11 years ago by bill

(In [16258]) Split dijit.form._FormMixin off to separate file, and update the comment. Refs #8017 !strict

comment:10 Changed 11 years ago by bill

(In [16259]) Split ToolbarSeparator? off to separate file, refs #8017 !strict Toolbar.js still requires ToolbarSeparator?.js for back-compat.

comment:11 Changed 11 years ago by bill

(In [16273]) Split Slider related widgets into separate files, refs #8017 !strict Slider.js remains for backwards compatibility, but developers should dojo.require() HorizontalSlider?, HorizontalRule? etc. directly.

comment:12 Changed 11 years ago by bill

(In [16663]) Missing dojo.require(), refs #8017

comment:13 Changed 10 years ago by bill

(In [16931]) RadioButton? stub file was forgotten in [15592]. Refs #8017, fixes #8818.

comment:14 Changed 10 years ago by bill

(In [16959]) Oops, misnamed the file. This time really fixes #8818 I think (and refs #8017).

comment:15 Changed 9 years ago by bill

(In [21887]) fix dojo.require() plus some spacing, refs #8017.

comment:16 Changed 6 years ago by bill

In [31409]:

Remove API doc for dijit._underlay. People should be accessing the underlay via DialogUnderlay.show() and hide(). Refs #8017 !strict.

comment:17 Changed 6 years ago by Bill Keese <bill@…>

In 0cf58fcbf2ca0c71fe8f4affbeea250b5af8c890/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.