Improved lists
Desktop preview on cards. In the Cards view of Pages, Posts and any public type, each card shows the page at 1440 px, scaled to its width. In Pages it always appears; in the other types, when there is no featured image. Builder_OS_Thumbs (includes/class-builder-os-thumbs.php) and admin/js/builder-os-card-preview.js do it:
- Loading: only visible cards (IntersectionObserver, with a 200 px margin) and at most 2 loads at a time. AJAX
bos_card_preview(nonce andedit_post). - Thumbnail request: the page is requested with
?bos_thumb=<id>and the headerX-BuilderOS-Thumb: <id>.<caducidad>.<HMAC>(2 minutes, only that post). With it:- drafts, pending and private posts are shown as in the preview;
- no admin bar;
- no Tracking (no tags, pixels or cookie banner);
- no A/B: it assigns no variant and counts nothing, and the drop-in serves the original without a cookie;
- no popups or maintenance mode;
- with
DONOTCACHEPAGE,noindexandno-store. Modules query it withBuilder_OS_Thumbs::request().
- Static HTML:
<script>,<noscript>(pixels), iframes, objects,modulepreload,on*handlers andjavascript:are removed. A<base>is added, plus CSS that leaves entrance animations (.bos-anim, AOS, WOW, Elementor) in their final state and hides the most common cookie banners. It is painted in ansandbox="allow-same-origin"iframe (no scripts), with a white background even in dark: the client’s canvas never receives dark mode. - Cache:
uploads/builder-os/thumbs/<id>-<hmac>.html(closed folder). It is deleted when the post is saved and expires with any global change (cache clear, theme, Customizer or menus), through the optionbuilder_os_thumbs_ver. - Fallback: if there is no preview (error, no loopback or non-visible type), the initial stays over the hatching. Filter
builder_os_card_preview_supported.
Builder_OS_WP_Lists (module wp-lists, includes/class-builder-os-wp-lists.php), admin/css/builder-os-wp-lists.css and admin/js/builder-os-wp-lists.js (depends on jquery and builder-os-motion-ui). Builder_OS::run() starts the module and Builder_OS_Appearance::admin_assets() enqueues it on skinned screens.
| Screen | kind | Instant search | View |
|---|---|---|---|
edit.php (posts, pages, public types) | posts | yes (except product) | List / Cards |
upload.php?mode=list | media | yes | Grid / List (core links; the mode is saved in media_library_mode) |
upload.php?mode=grid | media-grid | core’s library search | — |
edit-comments.php | comments | yes | List |
users.php | users | yes | List |
plugins.php | plugins | no: core already has its live search (updates.js) | List |
edit-tags.php (categories, tags and other plugins’ taxonomies) | terms | yes | List |
- Filters:
builder_os_lists_screens(array withmedia,comments,users,pluginsandterms; removing one returns that screen to core’s table),builder_os_lists_post_types(by defaultpost,pageandpublictypes withshow_ui; attachments,wp_block,wp_navigationand templates are left out),builder_os_lists_instant_types(the above minusproduct: WooCommerce has its own JavaScript in its list, so its products keep the style but reload the screen) andbuilder_os_lists_default_view(list|cards; Pages usescards). body:bos-lists bos-lists--list|cards bos-lists--instant(andbos-lists-{kind}). All list forms receive.bos-list-form; Users’,id="bos-list-form"; in Plugins the bar goes in#bos-list-top.- Glass bar (
.bos-list-bar,position: stickybelow the top bar; the glass goes on a sibling layer, never on the container). Row 1: 44 px search (core’s#post-search-input, withkbd /and ×), the.subsubsubstatuses as pills with their count, the List | Cards selector and Screen options and Help as icon buttons. Row 2: language, a ▾ chip for each<select>in.tablenav .actions(with search if there are more than 9 options; the<select>stays in the form and receiveschange), Sort ▾, core’s or other plugins’ buttons and “N items”. - Instant search and filters:
inputwith a 250 ms wait, Enter immediate and Esc clears. Afetchof the same screen is made withAbortController, parsed withDOMParserand these are replaced:#the-list(the same element, so core’s delegation isn’t lost), statuses, hidden fields, each<select>‘s options, bulk actions, pagination, sort links and the subtitle. Thenhistory.replaceState, an “N results” announcement (aria-live) and thebos-lists:updatedevent. If the server’s filter set changes or the request fails, the page reloads with a notice. While loading there are 6 skeleton rows. - Quick edit: before changing rows,
inlineEditPost.revert()is called (orcommentReply.revert()in Comments);tr#post-{id}and#inline_{id}aren’t touched; new rows go through aMutationObserver. - Selection bar (
.bos-bulkbar): dark pill with the lime counter, “Select all”, one pill per bulk action (up to 4; the rest in “More actions ▾”) and ×. It moves core’s#bulk-action-selector-topand#doaction, and each pill sets the value and callsclick()on#doaction, so core’s and other plugins’ handlers run. - Rows: title with status chips and metadata below; categories, tags, comments and languages are relocated with JavaScript (no
display: contents, so the table’s semantics aren’t broken); unknown columns from other plugins stay as columns (List) or as a “Name: value” line (Cards). 34 px icon actions (Edit, Quick edit, View, Trash —red on hover—, Restore, Delete, Duplicate, Convert to HTML) and third-party ones as a text chip. Page hierarchy with--bos-level × 26 pxindentation. - Cards view (
html.bos-lists-cardview):minmax(272px, 1fr)grid, 16:10 thumbnail, glass checkbox, two-line title, chips and a footer with avatar, date and actions. The home page uses the hero surface. With languages active, in Cards and with no language filter or search, translations are grouped under the main language’s card (“ES EN ✓ / + FR”) with the “See all” notice. - Empty state, footer and header:
tr.no-itemsbecomes.bos-empty(with “Clear filters” and “Add …”); footer “1–20 of 41” with paginator and “20 per page ▾”; summary under the title (“32 published · 3 scheduled · 5 drafts”) and the “Add …” action with the lime circle. - Keyboard and mobile:
/focuses the search, Esc clears it; at 782 px or less Cards are forced into one column, the bar stops being fixed, chips are bottom sheets and every touch target is 44 px. The four lists from the second batch (Media, Comments, Users and Plugins) use core’s stacked mode, with the action and switch cells always visible. - No flicker and no JavaScript:
admin_headprints an inline script that setshtml.bos-lists-ready(andbos-lists-cardviewif needed). Everything that is hidden depends on that class; without it core’s tablenav, search and statuses work.
PHP hooks (only on the improved screen and in wp_ajax_inline-save, priority 0, so the saved row comes out like the others):
- Column
bos_thumb(manage_{type}_posts_columns, priority 20): featured image (medium,loading="lazy", link witharia-hidden) or a hatched block with the initial, plus a<span class="bos-rowdata" hidden>withdata-avatar,data-parentanddata-lang. It is only added if the type supports a featured image and no column hasthumbin its key (WooCommerce paints its own). - Relative date:
post_date_column_timereturns<time class="bos-date__rel" datetime title>hace 3 días</time>and the JavaScript rewrites it withIntl.RelativeTimeFormatin the screen’s language. - Statuses (
display_post_states, priority 50): “Front Page” becomes “Home page”, “Posts Page” becomes “Blog”, and “Package: {title}” (according toBuilder_OS_Pages::pages_map()) and “Template: {name}” are added. With WordPress 6.9 or later,post_states_htmlpaints<span class="post-state bos-state bos-state--{clave}">without the “—” dash. - Row classes (
post_class):bos-is-front,bos-lang-{código}andbos-translation. - View per user: metadata
bos_list_view(array( tipo => 'list' | 'cards' )), saved bywp_ajax_bos_list_view(noncebos_list_view,edit_posts).
Media. In list: type and date filters as chips, search in the bar, .view-switch as Grid | List, 52 px thumbnail, “Uploaded to” as a chip and icon actions (Edit, View, Copy URL, Download and Delete permanently, which keeps its confirm). In grid (Backbone) nothing is rewritten: the JavaScript (dependency media-grid) wraps wp.media.view.Attachment.Library.prototype.render before the frame is created to add the “PNG · 12 KB” label, and the .media-toolbar is dressed as the glass bar.
Comments. Status is painted by CSS class, also without JavaScript: .column-comment::before shows a chip with a dot (“Approved”, “Pending” with tr.unapproved, “Spam”, “In trash”), with the texts translated as CSS variables (--bos-l-pending…) via wp_add_inline_style; edit-comments.js adds or removes unapproved when moderating and the chip changes by itself. Core’s yellow background and red left border are removed. Counts keep their <span> (.pending-count…). Author with a 36 px avatar, “In response to” as a chip and relative date (comment_class adds bos-t-{marca GMT}, also on AJAX rows). Icon actions with Approve with a lime circle; they are the same <a data-wp-lists>, so moderation is still by AJAX. The selection bar offers Approve, Reject, Spam and Trash, and the “Antispam” column is kept.
Users. 40 px avatar, username and, below, name and email; role as a chip (one per role) and “Posts” as a chip. Icon actions (Edit, View, Send password reset, Delete). “Change role to…” (#new_role + #changeit) becomes a ▾ chip in the selection bar that clicks #changeit. Other plugins’ columns are kept.
Plugins. Each row’s icon is the real one: BuilderOS, its logo (admin/img/favicon-builder-os.svg); the rest, the icons of the update_plugins transient (response and no_update, Builder_OS_WP_Lists::plugin_icons(), no server requests), with the initial as a fallback if there is none or it doesn’t load. Updates is core’s table, which already uses that icons. Core’s live search is kept. Since core empties #bulk-action-form and refills it, the bar (with core’s whole search form) lives outside, in #bos-list-top, and a MutationObserver remounts rows, bulk actions (the selection bar goes back inside the form, because updates.js listens to its buttons there), header and footer. Core’s Activate/Deactivate link is dressed as a switch (bos-switch, the same <a> with its nonce). BuilderOS goes first, with its lime icon and “by GrayCoder” in gray, discreet, next to the name. The update notice is a well with an amber dot, without the yellow left border (the active row doesn’t carry core’s colored border either). The parentheses in the view counts (“Update available (1)”) are removed also when updates.js rewrites them (MutationObserver on each .count); Export and Erase personal data do the same.