Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,31 @@ editors. Numeric controls save integers and toggle defaults use booleans. Group
and Columns layouts must preserve nested element attributes during early setup,
especially the Checkout form slug. Editor previews use sample data; verify real
customer actions on the published page rather than treating a preview as proof.

## Mobile admin lists and detail widgets

Use WordPress's 782px mobile admin breakpoint. Keep status filters wrapping in
normal flow, give live search its own full-width row, and keep view-switch controls
at least 44px square. Search remains usable when the current query has no results;
each input has a unique label target and a description of live filtering.

List tables retain WordPress's expandable mobile rows, but their primary column
must identify the record (customer/product name or site URL), never just an avatar
or thumbnail. Hide the preceding decorative column on mobile and show row actions
without requiring hover. Do not apply uppercase column-heading typography to row
headers. Long identifiers and addresses wrap rather than widen the page.

Embedded detail rows are not desktop data grids: constrain their single responsive
cell to the widget width, allow its flex content to shrink, and wrap the title and
status onto separate lines when needed. Preserve the desktop layout and existing
navigation. See `views/base/filter.php`, `views/base/responsive-table-row.php`,
`inc/list-tables/class-base-list-table.php`, and the mobile block in
`assets/css/admin.css`.

Constrain the settings search dropdown to its input width on mobile; unlike the
desktop max-content menu, long result titles must wrap. Diagnostic tables and job
hooks wrap long values. The four-column shortcode reference instead keeps its
column relationships in a labelled, keyboard-scrollable region, never a
page-wide horizontal scrollbar (`views/shortcodes/shortcodes.php`). Full-screen
mobile dialogs reserve space for their title bar and scroll only the remaining
content area so the final form controls stay reachable.
180 changes: 177 additions & 3 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -1958,6 +1958,20 @@ body.wu-page-wp-ultimo-settings .selectize-control.single .selectize-input::afte
left: 0 !important;
border-radius: 0 !important;
}
#WUB_window {
display: flex;
flex-direction: column;
height: 100dvh !important;
}
#WUB_title {
flex-shrink: 0;
}
#WUB_window #WUB_ajaxContent {
flex: 1;
min-height: 0;
height: auto !important;
box-sizing: border-box;
}
/* stylelint-enable */
}
#wp-ultimo-log-contents pre {
Expand Down Expand Up @@ -4211,8 +4225,7 @@ ul.wu-widget-list > li:first-child {
float: right;
}
.wu-styling .wp-filter.wu-filter .search-form {
height: 32px;
content: " ";
height: auto;
min-width: 10px;
}
.wu-styling .wp-filter.wu-filter .wu-sub-view-status .count.view-count {
Expand All @@ -4237,7 +4250,8 @@ ul.wu-widget-list > li:first-child {
.wu-styling .alternate {
background-color: #fbfcfd;
}
.wu-styling .widefat th {
.wu-styling .widefat thead th,
.wu-styling .widefat tfoot th {
text-transform: uppercase;
font-size: 11px;
font-weight: bold;
Expand Down Expand Up @@ -4993,6 +5007,166 @@ td.column-id {
background-color: #fefefe;
}

/* Match WordPress's mobile admin breakpoint without changing desktop tables. */
@media screen and (max-width: 782px) {
.wu-page-wp-ultimo-system-info #wp-ultimo-wrap,
.wu-page-wp-ultimo-shortcodes #wp-ultimo-wrap,
.wu-page-wp-ultimo-jobs .wp-list-table .column-primary {
overflow-wrap: anywhere;
}

.wu-page-wp-ultimo-system-info #wp-ultimo-wrap table {
table-layout: fixed;
}

.wu-page-wp-ultimo-shortcodes .wu-shortcode-attributes {
overflow-x: auto;
}

.wu-page-wp-ultimo-shortcodes .wu-shortcode-attributes table {
min-width: 32rem;
}

.wu-styling #wu-settings-search-box .selectize-dropdown {
width: 100% !important;
}

.wu-styling #wu-settings-search-box .selectize-dropdown [data-selectable] {
white-space: normal;
overflow-wrap: anywhere;
}

.wu-styling .wp-filter.wu-filter {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 12px;
padding: 12px;
}

.wu-styling .wp-filter.wu-filter .filter-links {
display: flex;
flex-wrap: wrap;
flex-basis: 100%;
margin: 0;
}

.wu-styling .wp-filter.wu-filter .filter-links li {
float: none;
margin: 0;
max-width: 100%;
}

.wu-styling .wp-filter.wu-filter .filter-links li > a {
padding: 12px;
white-space: normal;
}

.wu-styling .wp-filter.wu-filter .search-form {
float: none;
flex: 1 0 100%;
margin: 0;
max-width: 100%;
}

.wu-styling .wp-filter.wu-filter .wp-filter-search {
box-sizing: border-box;
width: 100%;
max-width: none;
min-height: 44px;
margin: 0;
}

.wu-styling .wp-filter.wu-filter .view-switch {
float: none;
display: flex;
margin: 0;
padding: 0;
}

.wu-styling .wp-filter.wu-filter .view-switch a {
display: flex;
align-items: center;
justify-content: center;
min-width: 44px;
min-height: 44px;
padding: 0;
}

.wu-styling .wu-list-table.wu-mode-grid .tablenav.top {
position: static;
}

.wu-styling .wu-list-table .wp-list-table .column-primary {
overflow-wrap: anywhere;
}

/* Decorative cells before the primary column are not collapsed by core. */
.wu-styling .wu-list-table .wp-list-table .column-customer_status,
.wu-styling .wu-list-table .wp-list-table .column-featured_image_id { /* stylelint-disable-line selector-class-pattern */
display: none;
}

.wu-styling .wu-list-table .wp-list-table tbody th {
text-transform: none;
font-size: 14px;
font-weight: normal;
letter-spacing: normal;
}

.wu-styling .wu-list-table .row-actions {
position: static;
left: auto;
}

/* Core also supplies a toggle through handle_row_actions(). Keep just that one. */
.wu-styling .wu-list-table .row-actions + .toggle-row {
display: none;
}

.wu-page-wp-ultimo-addons .wu-wrap .button-primary {
box-sizing: border-box;
max-width: 100%;
height: auto;
white-space: normal;
overflow-wrap: anywhere;
}

.wu-styling .wu-list-table .wp-list-table .column-responsive {
box-sizing: border-box;
width: 100%;
padding: 8px 10px;
}

.wu-styling .wu-responsive-table-content {
min-width: 0;
overflow-wrap: anywhere;
}

.wu-styling .wu-responsive-table-heading {
flex-wrap: wrap;
gap: 8px;
}

.wu-styling .wu-responsive-table-heading > .wu-truncate {
white-space: normal;
}

.wu-styling .wu-responsive-table-status {
margin-left: 0;
max-width: 100%;
flex-shrink: 1;
}

.wu-styling .wu-responsive-table-link {
display: flex;
align-items: center;
justify-content: center;
min-width: 44px;
min-height: 44px;
}
}

@media screen and (max-width: 1280px) {
.wu-list-table .wp-list-table.products th.column-type,
.wu-list-table .wp-list-table.products th.column-slug {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/admin.min.css

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions assets/js/list-tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,36 @@

} // end if;

// Restore or remove bulk actions when a search changes whether rows exist.
if (typeof response.bulk_actions !== 'undefined') {

[ 'top', 'bottom' ].forEach(function(position) {

const $navigation = $table_parent.find('.tablenav.' + position);
const $bulk_actions = $navigation.find('.bulkactions');

if (response.bulk_actions[ position ].length) {

if ($bulk_actions.length) {

$bulk_actions.replaceWith(response.bulk_actions[ position ]);

} else {

$navigation.prepend(response.bulk_actions[ position ]);

} // end if;

} else {

$bulk_actions.remove();

} // end if;

});

} // end if;

hooks.doAction('wu_list_table_update', response, form_data, $table_parent);

// Init back our event handlers
Expand Down
2 changes: 1 addition & 1 deletion assets/js/list-tables.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading