Why LUX Content Migration Needs a Searchable Export Checklist

Selecting Individual Posts (“Select Posts”): Why Export Needs a Searchable Checklist

When I built the “Select Posts” mode, I knew I had to avoid two distinct failure modes.

One was the trap built into the WordPress admin itself: “selection only applies to the items visible on the current page.” The other was the trap of cramming every selectable item onto a single screen until the screen itself became unusable.

I’ll walk through both cases, explain the evidence behind them, and outline why I chose a searchable checklist for this feature.

WordPress admin’s “Select All” is not actually selecting everything

Sometimes you need to move a specific set of posts scattered across multiple categories rather than grouped neatly under one.

The first approach that comes to mind is selecting them with checkboxes on the Posts screen in the WordPress admin.

But I confirmed that this approach has a well-documented limitation.

The existence of a plugin called bulk-actions-select-all is itself evidence of the problem. According to the plugin’s description, WordPress’s default bulk-action interface “limits selection to the items visible on the current page by default.”

If there are 200 posts and 20 appear on each page, clicking the “Select All” checkbox at the top selects only the 20 currently visible posts. The other 180 are not included.

Working around that limitation requires installing a separate third-party plugin.

I considered this trap especially serious for the “Select Posts” feature.

If you are moving an entire category, it is not an issue because there is a category-based mode.

I wanted to eliminate the problem of selection being cut off by page boundaries altogether.

That does not mean displaying everything on one screen is always safe

The problem is that you cannot solve it simply by removing pagination and displaying every post on one screen.

WordPress Core Trac ticket #9864 illustrates the failure mode on the other side.

On a site with more than 5,000 pages, the “Parent page” dropdown on the page-editing screen ran into trouble because it tried to list every page as an option.

According to the figures reported, the request timed out after consuming the full 30-second execution limit and 384 MB of memory.

The ticket was eventually resolved with the recommendation that “this dropdown should be replaced with something that can search and paginate incrementally on the server side.” In practice, Gutenberg replaced it with an autocomplete search selector.

I had to find a balance between these two cases.

I could have built a fully server-side autocomplete system, sending a search request to the server every time the user typed. Instead, I chose a simpler approach.

Render every post on the screen as a checkbox list, then, as soon as the user types into the search field, show only the already-rendered items whose titles contain the search string and hide the rest.

This is the same general type of problem seen in Trac #9864: all the items are loaded at once.

But the real problems in that ticket were the attempt to put thousands of <option> elements into a single dropdown and the unnecessarily heavy SELECT * query used to populate them. A checkbox list is handled differently by the browser than a dropdown, and I limited the data retrieved to the minimum the list needs: the ID and title.

That said, I would not claim this approach has no limits—on a very large site with tens of thousands of posts, I would recommend narrowing the scope first with the category-based mode rather than using this mode.

The “Select Posts” mode is designed for situations where you need to identify a few hundred posts—or fewer—with precision. It is not meant to make you browse an entire large-scale site through this one screen.

I also know that search is not always the right answer

There is one more point worth making: I did not assume that adding a search box would solve everything.

Tripaneer Techblog’s research on the usability of multi-selecting from a long list takes a cautious view of search-centered interfaces.

According to the article, when users try to search an unfamiliar long list, “the search returns no results as much as 50% of the time”—because the terminology differs or the item they want is not there in the first place.

That is why, instead of hiding items behind a search box, I recommend organizing them into groups and displaying them visually so users can scan them—especially when the items are unfamiliar.

I think that criticism is valid, but the underlying assumptions here are importantly different.

That research concerns exploratory selection: choosing something relevant from a set of tags or categories the user may not know well.

The “Select Posts” mode handles a completely different kind of search: finding the titles of posts the user wrote on their own site.

This is not exploratory browsing. It is a known-item search where the user already knows what they are looking for.

The risk of failure due to terminology mismatches is therefore much lower. In this context, I decided that search was the right choice.

Still, Tripaneer’s criticism would apply if search were the only way to access the list. That is why, when the search field is empty, the full list of posts remains visible. Search should be a tool for narrowing the list, not the only door through which users can access it.

The selection state must not disappear because of a search

This is another version of the issue identified by bulk-actions-select-all: “the selection disappears when the screen changes.”

When the user enters a search term, my implementation does not redraw the items or fetch a new list from the server.

It simply hides the already-rendered checkboxes whose titles do not match the search term for the moment. The checked state itself remains in the DOM.

Suppose you search for “apple” and check three related posts, then clear the search and search for “banana” and check two more. When you finally run the export, all five items remain selected.

I do not consider this a minor detail. Changing the search term repeatedly while selecting items is a normal use case for this mode, and if earlier selections disappeared every time the search changed, the feature would be effectively useless.

To sum up the Select Posts mode in the export feature

The “Select Posts” mode is designed for situations where you need to identify specific posts scattered across different parts of a site rather than neatly organized by category.

I was trying to strike a balance between two opposing failures: the WordPress admin’s problem of selections becoming trapped within a single page, and the problem of trying to load every item at once until the interface collapses under the weight.

That is the design reasoning behind the seemingly simple checklist built into this one mode.

References