Opened 8 years ago

Closed 7 years ago

#15248 closed enhancement (fixed)

[cla] [patch] Update dojox.widget.FisheyeList to AMD format

Reported by: Karl Tiedt Owned by: Karl Tiedt
Priority: undecided Milestone: 1.8
Component: DojoX Widgets Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

Update FisheyeList? to AMD format (similar to FisheyeLite?) - Allows for Fisheye or its ListItems? to be easily extended.

Note: this is not a full AMD local var conversion, this is just a "as much as needed to keep things working" but allow AMD support.

Attachments (1)

dojoxFisheyeList.patch (26.0 KB) - added by Karl Tiedt 8 years ago.
Revised patch, full AMD support now

Download all attachments as: .zip

Change History (16)

comment:1 Changed 8 years ago by Karl Tiedt

Owner: changed from dante to Karl Tiedt
Status: newassigned

comment:2 Changed 8 years ago by Adam Peller

can you use _WidgetBase instead of _Widget?

Changed 8 years ago by Karl Tiedt

Attachment: dojoxFisheyeList.patch added

Revised patch, full AMD support now

comment:3 Changed 8 years ago by Karl Tiedt

Updated to widgetBase and did a full AMD update - it makes sense to do it. Can someone verify that on/connect stuff is correct - I tested with our application and the test page and all appears to work as expected)

comment:4 Changed 8 years ago by bill

Thanks for the full conversion.

The on() calls look good to me. About handle.remove() vs. dojo.disconnect(handle), the only caution I've found is that dojo.disconnect(handle) won't complain when handle is null or undefined, whereas handle.remove() will throw an exception. But as long as the handles are guaranteed to be set, you're OK.

If you really wanted to do an update to all the latest API's then I guess the

// this.on() does not work for addChild 
this.connect(this, "addChild", "_initializePositioning"); 

would be converted to:

this._adoptHandles(
   aspect.after(this, "addChild", lang.hitch(this, "_initializePositioning"), true)
);

(because this.connect() needs to go away in 2.0 since dojo.connect() is going away)

Last edited 8 years ago by bill (previous) (diff)

comment:5 Changed 8 years ago by Karl Tiedt

Ahhh _adoptHandles apparently is trunk only? at least it is not in our 1.7.2 project, will make that update though and get this committed

comment:6 Changed 8 years ago by Karl Tiedt

Looking at how _adoptHandles works this is perfectly legal right?

        this._adoptHandles(
            aspect.after(this, "addChild", lang.hitch(this, "_initializePositioning"), true),
            aspect.after(winUtil.global, "onresize", lang.hitch(this, "_initializePositioning"), true)
        );

comment:7 Changed 8 years ago by Adam Peller

Milestone: tbd1.8

comment:8 in reply to:  6 Changed 8 years ago by bill

Replying to ktiedt:

Looking at how _adoptHandles works this is perfectly legal right?

        this._adoptHandles(
            aspect.after(this, "addChild", lang.hitch(this, "_initializePositioning"), true),
            aspect.after(winUtil.global, "onresize", lang.hitch(this, "_initializePositioning"), true)
        );

Yup, that's the intended usage.

comment:9 Changed 8 years ago by Karl Tiedt

Resolution: fixed
Status: assignedclosed

In [28441]:

Fixes #15248 - Separate Fisheyelist/ListItem? into 2 separate files 2 allow for extending 1 or the other and converted to full AMD and updated all calls to use non deprecated code paths - also updated test file for AMD usage.

comment:10 Changed 8 years ago by bill

In [28447]:

Fix typo, plus remove direct <script> tag (since it's illegal in the world of AMD), refs #15248 !strict.

comment:11 Changed 8 years ago by Karl Tiedt

In [28481]:

Missed update to data-dojo-attach-point in templateString and need to start the conservative trigger handler regardless of initial value, then pause/resume as needed. Refs #15248

comment:12 Changed 7 years ago by ben hockey

Resolution: fixed
Status: closedreopened

don't forget to update dojox/dojox.profile.js so that these converted files get tagged as amd. ie update the excludes array so that these module ids aren't going to match any more.

comment:13 Changed 7 years ago by Colin Snover

Milestone: 1.82.0

1.8 is frozen. Move all enhancements to next release. If you need an exemption from the freeze for this ticket, contact me immediately.

comment:14 Changed 7 years ago by bill

Milestone: 2.01.8

See neonstalwart's comment above.

comment:15 Changed 7 years ago by bill

Resolution: fixed
Status: reopenedclosed

In [29239]:

Update dojox.profile.js with modules converted to AMD, fixes #15248, #15301, refs #13101,

Note: See TracTickets for help on using tickets.