WeakAuras / WeakAuras2

World of Warcraft addon that provides a powerful framework to display customizable graphics on your screen.
https://weakauras.wtf
GNU General Public License v2.0
1.25k stars 308 forks source link

Adopt blizzard's scroll templates #5134

Open emptyrivers opened 2 months ago

emptyrivers commented 2 months ago

(mostly a note for myself)

While making this little thing I had the opprotunity to work with the 'modern' scroll templates, and I think they could be put to good use in WeakAuras, too. Here is a tutorial on how to make use of them.

In particular, I think we should modify this part of Options to make use of WowScrollBox + LinearizedTreeDataProvider:

image

We currently use Ace widgets, and are "forced" (are we actually?) to build potentially thousands of them the moment the user opens WeakAurasOptions. This takes a pretty long time if you have a lot of auras, and personally is a big barrier to ever opening options. I predict that using the WowScrollBox system would be the quickest way to eliminate this pain point.

As far as I can tell, WowScrollBox has made its way into every flavor of classic that we support as well, so no need to worry about compatibility problems.

Scrollboxes made using a combination of WowScrollBox + ScrollUtil work differently in important ways:

mrbuds commented 2 months ago

Profiling window use WowScrollBoxList & WowTrimScrollBar templates

mrbuds commented 2 months ago

Also note the WeakAurasScrollArea widget for texture picker that is more clever than the original AceGUIContainer-ScrollFrame widget as it doesn't create all not visible elements