dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Attempt for DFL-3654: Selectors (nth-child()) used for the sortable tabl...

Open danfooo opened this issue 13 years ago • 3 comments

...e are slow

danfooo avatar Oct 11 '12 09:10 danfooo

Feels slightly over-engineered to me. Why not just generate the classes in the corresponding template?

hzr avatar Oct 11 '12 10:10 hzr

I have to agree with @hzr, must be possible to add the corresponding classes in the templates. I do similar things in the templates of the new Resource Service

p01 avatar Oct 11 '12 11:10 p01

In https://github.com/operasoftware/dragonfly/pull/109/files#L4R179 for example, different rows come together from different templates. You'd pass counts between several map functions, and repeat the code that checks even/odd. Even when it's just one template function used with map, sometimes you return [], so you couldn't work with the index that's passed. Okay, I admit that last one might be a theoretical problem.

@p01 if you do a similar thing, doesn't that mean it's useful to do it in one common place instead? I don't think it's expensive either.

Edit: Github kills my link here for some reason, I meant to point to a specific line https://github.com/operasoftware/dragonfly/pull/109/files#L4R179

danfooo avatar Oct 11 '12 11:10 danfooo