fix(user-home): span the tab pagination skeleton across the post grid
The posts/favorites tabs turn the article list into a 2-column grid at >=992px. The AJAX pagination skeleton .post_ajax_loader is a direct child of that grid, so with no grid-column it was laid out as a single half-width card and the whole placeholder stack collapsed into one column while paging or switching tabs. Span the loader across every column and, while loading, give it the same 2-column template the real cards use so placeholders line up with them. The skeleton shape now follows the resolved render mode instead of a hardcoded 'list', so card mode no longer renders list blocks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -154,8 +154,19 @@ test('skeleton blocks share the card gutter instead of overflowing it', () => {
|
||||
|
||||
// The user-home panel zeroes the container margin and the card gutters, so the
|
||||
// skeleton's inner item must not pick up any leftover compensation there.
|
||||
//
|
||||
// The panel also turns the list into a 2-column grid at >=992px. The loader is
|
||||
// a direct child of that grid, so without an explicit span it is laid out as a
|
||||
// single half-width card and the whole skeleton stack collapses into one
|
||||
// column. It must span every column and re-run the same 2-column template
|
||||
// internally while loading, so the placeholders line up with the real cards.
|
||||
const userHome = fs.readFileSync(path.join(root, 'assets/css/routes/user-home.css'), 'utf8')
|
||||
assert.match(userHome, /\.aksrt-user-home__post-list\[data-view="list"\] > \.post_ajax_loader \.posts-item \{\s*margin-right: 0;\s*margin-left: 0;/)
|
||||
assert.match(userHome, /\.aksrt-user-home__post-list\[data-view="list"\] > \.post_ajax_loader \{\s*grid-column: 1 \/ -1;/)
|
||||
assert.match(
|
||||
userHome,
|
||||
/\.dashboard-panel\.is-loading \.aksrt-user-home__post-list\[data-view="list"\] > \.post_ajax_loader \{[^}]*display: grid;[^}]*grid-template-columns: repeat\(2, minmax\(0, 1fr\)\);/s
|
||||
)
|
||||
})
|
||||
|
||||
test('asset tables are InnoDB and operation keys are unique', () => {
|
||||
|
||||
Reference in New Issue
Block a user