Add "Select All" controls at the bottom of the list

I’m trying to tag all the topics in a category and move them into a more general category. (We have a bunch of musical theater categories that aren’t so active any more.) The “Select All” control only selects the topics that have been loaded in. (For me, that’s the most recent 30.) So I’ve learned to scroll all the way to the bottom of the list and then back to the topic to select every topic:

topic_select

For a small number of topics, that’s not so bad. but it gets painful when there are hundreds of topics to scroll past on the way down and again on the way up. In an ideal world, the “Select All” button would load in all the topics or somesuch so that I don’t need to scroll through even once.

But barring that, it would helpful to have another “Select All” button at the bottom of the page too. That would save me half of the scrolling time.

By the way, I love some of the little UI touches I’m seeing as I do this. When I got to a new subcategory, the select tool is already on, so I don’t have to press that button. When I go to add tags, the category slug is suggested as a category so I don’t have to type it each time. Once I submit the new tags, a little progress counter tells me how many have been done. Seriously, this is a lot of work for an admin feature. Thanks!

2 Likes

This is so tricky, cause a list could keep growing and growing. We can not “pre-load” 50k topics when you click the button, that would explode a lot of things. There are tricks (we could pass relations around) but it gets very very complicated.

A tiny improvement that may help you here is if we “remember” you clicked “select all” and then auto select the batch we load when you lazy load it.

At least it makes your process significantly easier to work through (you just scroll and scroll). Does that sound like an adequate improvement?

5 Likes

My first thought was “Yes, that’d work fine.” And it would solve the problem of needing back up to the top of the list to “Select All”. But I tagged another category just now and noticed the wrench icon I need to press to do anything with that list is all the way at the top of the page. So I still would need to scroll all the way down and back to the top whether all the topics get selected on the way down or not.

Maybe make the wrench sticky in addition to auto selecting as I scroll?


The other issue is an expectations problem. When I selected all the first couple of categories I did, I assumed it would select all topics in the category. I thought it was strange that all these categories had exactly 30 topics. But then I went back to see if I’d tagged everything the way I wanted and noticed that they have more than 30. It’s just the first 30 that happened to be loaded in that I selected.

I can certainly understand it’s not a good idea to load in thousands of topics if you happen to press one button. But it sorta feels like a broken promise when it turns out “all” just means “all on the page”. I don’t have a good suggestion other than maybe warn folks when they do a bulk action that they should check to make sure they got everything they want.

That is already the case, I suspect something about your theme is changing this, maybe try “safe mode”?

Yeah a V2 refinement would be to pop up a little panel that counts how much stuff you have selected.

You have 30 topics selected, keep scrolling to select more.

:wrench:

We will go ahead and do the auto selection, but refinements to expectations and a richer wrench panel will have to wait a bit.

4 Likes

No joy using the safe mode, but my money is still on our site doing unkosher things to break it. Thanks for letting me know.

I really appreciate the auto-select solution. Thanks!

4 Likes

That button’s stickiness had actually been broken for a little bit and was fixed with:

https://github.com/discourse/discourse/pull/11888

If you update your site and still have issues, then I’d take a look at your customizations.

5 Likes

Yay! Yes the latest update fixed the stickiness problem.

3 Likes

This PR should do it:

https://github.com/discourse/discourse/pull/12026

3 Likes