Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#13993 closed defect (fixed)

[regression] themeTester no longer honors theme, dir, etc. query params

Reported by: Kenneth G. Franqueiro Owned by: bill
Priority: high Milestone: 1.7
Component: Dijit Version: 1.7.0b1
Keywords: Cc: Douglas Hays
Blocked By: Blocking:

Description

dijit/themes/themeTester.html in trunk doesn't honor the theme and dir (and presumably other) query params, which are quite important and useful in the context of this page.

The reason would appear to be that dijit/tests/_testCommon.js is no longer loaded. In 1.6, this was loaded via a normal script tag. It would appear that in trunk, it was attempted to be loaded as a module (and indeed looks to be one), but is currently commented out. (I'd point out that its commenting predates the latest revision of that line.)

Upon uncommenting that line, themeTester still appears to work under normal (param-less) circumstances, as well as with dir=rtl. However, specifying a theme (even redundantly specifying claro) results in nothing but a blank page.

Change History (9)

comment:1 Changed 10 years ago by Kenneth G. Franqueiro

Component: GeneralDijit

comment:2 Changed 10 years ago by Kenneth G. Franqueiro

It would appear there may actually be an error *in* _testCommon.js actually... Although I don't see any errors reported when I try to include it in themeTester.html, if I go to other test pages that use it (e.g. dijit/tests/test_Calendar.html, dijit/tests/test_Toolbar.html, ...) if I add ?theme=... to the URL, I end up with the following error:

loadFuncs[i] is not a function (_testCommon.js:123)

comment:3 Changed 10 years ago by Kenneth G. Franqueiro

Upon a bit more investigation, reverting the last change to _testCommon.js ([26353]) seems to make theme switching on other test pages work again, but it still doesn't resolve the issue in themeTester.

Now I'm not sure if I've actually found two separate issues, or what...

comment:4 Changed 10 years ago by Adam Peller

Cc: Douglas Hays added

comment:5 Changed 10 years ago by bill

In [26690]:

Get ?theme=... working again for dijit test files. Refs #13993 !strict.

comment:6 Changed 10 years ago by bill

In [26693]:

Convert _testCommon.js to granular dependencies. Still not using define() because this files is included in hundreds of test files via <script src=...> rather than by require(...). Refs #13993 !strict.

comment:7 Changed 10 years ago by bill

Owner: set to bill
Resolution: fixed
Status: newclosed

In [26694]:

Get ?theme=... working again for themeTester.html. In order to not confuse AMD loader, isolate insertion of <link> nodes to when no AMD activity (i.e. no loading of JS files) is occurring. Fixes #13993 !strict.

comment:8 Changed 10 years ago by bill

In [26695]:

Get ?theme=... working again for IE. Need to use special method to insert stylesheets on IE. Refs #13993 !strict.

comment:9 Changed 10 years ago by bill

In [26696]:

code reduction, plus better attempt to change document.css for IE, refs #13993 !strict.

Note: See TracTickets for help on using tickets.