Files
wordpress-theme-aksrt/tools/admin-contract-report.json
T
kate522andClaude Fable 5 38bbd917a9 fix(skeleton): align the homepage tab and sort loaders with the reference 1:1
首页「更多栏目」tab 与「排序方式」切换的骨架占位与参考主题 zibll 有实质差异,
根因不是几何宽度,而是三处结构/契约错位:

1. 骨架块自身结构与参考主题不同。card 分支用了 `<posts>` 元素 + `.post-graphic`
   包裹层(列表变体,带 margin-right:20px),而参考主题 card 骨架是
   `<div class="posts-item card">` 且 `.item-thumbnail` 是直接子元素。
   → card 骨架右侧多出一条真实卡片没有的 20px 沟槽。

2. 骨架块被错误地打上 `ajax-item`。参考主题的占位块没有该类。它会让
   `find('.ajax-item')` / ajax-list 的 `inject()` 把骨架当成真实条目。

3. 排序切换的骨架被预渲染节点顶替。aksrt_render_pagination() 在 .ajax-pag 内
   渲染了一个写死 2 条、写死 list 形状的 .post_ajax_loader;runtime post_ajax()
   会先在容器内 find('.post_ajax_loader'),找到就复用并丢弃调用方按视口动态
   拼出的骨架 → 切排序永远是 2 条 list 骨架,card 布局下也是、与视口宽度无关。
   参考主题 zib_paging() 根本没有 loader 兄弟节点。

改动:
- inc/helpers/posts-renderer/markup.php:aksrt_render_placeholder() 的
  card/list 分支改为与 zib_get_post_placeholder() 逐字等价的结构;去掉
  ajax-item 类、card 分支的 .post-graphic 包裹层,元素改用 <div>。
- inc/helpers/template-tags/pagination-permissions.php:删除预渲染 loader,
  与参考主题 zib_paging() 一致 —— 只渲染翻页控件。
- assets/js/core/pagination.js:找不到骨架节点时构造与 runtime/main.js 同款
  的文章骨架(卡片 8/6/4 条、列表 4/3 条,按视口与参考主题同阈值),
  不再退化为「转圈 + 文案」这个第二套加载语言;仅评论等非文章面保留该兜底。
- assets/js/core/pagination.js:为排序菜单(.ajax-option)与 tab 触发器
  (.post_ajax_trigger)增加避让 —— 它们归 legacy runtime 管线,
  否则一次点击发两个请求(与 ajax-list.js 的既有避让对称)。
- assets/js/runtime/main.js:post_ajax 的显隐由 fadeIn()/hide() 改为
  .is-loading 类切换。前者写 inline display,优先级高于类规则,一旦残留
  骨架永远打不开,正是骨架契约明令禁止的失败模式。

归档/分类筛选面原本另有一套独立加载语言(spinner 遮罩 + opacity 淡出),
本次一并统一到同一条 .post_ajax_loader + .is-loading 契约:
- inc/helpers/aksrt-archive.php:删除 show_loading 标记位与遮罩 DOM,
  改为在分页之后渲染文章骨架。
- assets/js/core/archive.js:showLoading/hideLoading 只切 .is-loading;
  fetchPosts() 清空内容时保留骨架与分页节点(与参考主题 success 只 hide
  不删的生命周期一致),原先会连带删掉骨架。
- assets/css/frontend/layout.css:删除 .archive__ajax-wrap.is-loading
  的 opacity 淡出与 spinner 遮罩规则。
- category.php / tag.php:删除已失效的 show_loading 实参。

验证:php -l 全部通过;php tools/audit-admin-contracts.php errors=0;
契约测试 post-visual(22) / asset-ledger(16) / message-center(8) /
lazyload(7) / frontend-lifecycle(13) / zibll-modern-widgets(10) /
page-display(18) / a11y 全绿;已重跑 build:public 刷新产物。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-04 03:04:02 +08:00

236 lines
11 KiB
JSON

{
"generated_at": "2026-10-03T18:57:46+00:00",
"errors": [],
"warnings": [
"customPage tools-update section 'tools/update' not in PHP schema (ok if pure operational page)",
"customPage users-wechat-template section 'users/wechat-template' not in PHP schema (ok if pure operational page)",
"enum incomplete parse for 'alipay_payment_type' (php subset of js): php=[page] js=[page,wap]",
"enum incomplete parse for 'avatar_external' (php subset of js): php=[] js=[,gravatar,weavatar,cravatar,geekzu,loli,sep,v2ex]",
"enum incomplete parse for 'backup_frequency' (php subset of js): php=[daily] js=[daily,weekly,monthly]",
"enum incomplete parse for 'bind_reminder' (php subset of js): php=[email] js=[email,phone,email_phone,close]",
"enum incomplete parse for 'content_audit_on_failure' (php subset of js): php=[allow] js=[allow,block]",
"enum incomplete parse for 'content_audit_provider' (php subset of js): php=[baidu] js=[baidu,null]",
"enum incomplete parse for 'direction' (php subset of js): php=[horizontal] js=[horizontal,vertical]",
"enum incomplete parse for 'effect' (php subset of js): php=[slide] js=[slide,fade,cube,coverflow,flip]",
"enum incomplete parse for 'epay_device' (php subset of js): php=[auto] js=[auto,pc,mobile]",
"enum incomplete parse for 'font_family' (php subset of js): php=[system] js=[system,noto-sans-sc,noto-serif-sc,custom]",
"enum incomplete parse for 'i18n_default_lang' (php subset of js): php=[zh-CN] js=[zh-CN,en,zh-TW,ja,ko,fr,de,es,ru]",
"enum incomplete parse for 'i18n_switcher_position' (php subset of js): php=[header] js=[header,footer,both,none]",
"enum incomplete parse for 'i18n_url_strategy' (php subset of js): php=[query] js=[query,path,subdomain]",
"enum incomplete parse for 'img_position' (php subset of js): php=[left] js=[left,right]",
"enum incomplete parse for 'invit_code_s' (php subset of js): php=[close] js=[close,open,must]",
"enum incomplete parse for 'invite_code_s' (php subset of js): php=[close] js=[close,open,must]",
"enum incomplete parse for 'ip_addr_sdk' (php subset of js): php=[polling] js=[polling,qq,amap,null]",
"enum incomplete parse for 'ip_geo_format' (php subset of js): php=[province_city] js=[province_city,province,country_province]",
"enum incomplete parse for 'lazy_animation' (php subset of js): php=[fade] js=[blur,fade,scale]",
"enum incomplete parse for 'list_meta_show' (php subset of js): php=[view] js=[view,like,comm]",
"enum incomplete parse for 'list_orderby' (php subset of js): php=[date] js=[date,modified,default]",
"enum incomplete parse for 'list_show_type' (php subset of js): php=[separate] js=[separate,no_margin]",
"enum incomplete parse for 'list_thumb_fit' (php subset of js): php=[] js=[,contain]",
"enum incomplete parse for 'list_type' (php subset of js): php=[text] js=[text,thumb,thumb_if_has,card]",
"enum incomplete parse for 'lists' (php subset of js): php=[modified] js=[modified,date,views,like,comment_count,favorite,rand]",
"enum incomplete parse for 'mandatory_bind' (php subset of js): php=[email] js=[email,phone,email_phone,close]",
"enum incomplete parse for 'message_paginate_type' (php subset of js): php=[ajax_lists] js=[ajax_lists,default]",
"enum incomplete parse for 'oauth_bind_type' (php subset of js): php=[auto] js=[auto,manual]",
"enum incomplete parse for 'oauth_proxy_mode' (php subset of js): php=[close] js=[close,server,client]",
"enum incomplete parse for 'paging_ajax_s' (php subset of js): php=[1] js=[1,0]",
"enum incomplete parse for 'pattern' (php subset of js): php=[allow] js=[allow,prohibit]",
"enum incomplete parse for 'pay_alipay_sdk_options' (php subset of js): php=[official_alipay] js=[official_alipay,epay,null]",
"enum incomplete parse for 'pay_box_position' (php subset of js): php=[box_top] js=[box_top,top,bottom,box_bottom]",
"enum incomplete parse for 'pay_modo_default' (php subset of js): php=[0] js=[0,points]",
"enum incomplete parse for 'pay_wechat_sdk_options' (php subset of js): php=[official_wechat] js=[official_wechat,epay,null]",
"enum incomplete parse for 'post_pay_box_position' (php subset of js): php=[content] js=[content,mask]",
"enum incomplete parse for 'post_time_source' (php subset of js): php=[date] js=[date,modified]",
"enum incomplete parse for 'referral_attribution_model' (php subset of js): php=[first_touch] js=[first_touch,last_touch]",
"enum incomplete parse for 'search_type_in' (php subset of js): php=[post] js=[post,user]",
"enum incomplete parse for 'sign_card_position' (php subset of js): php=[left] js=[left,center,right]",
"enum incomplete parse for 'sign_theme_mode' (php subset of js): php=[no] js=[no,white-theme,dark-theme]",
"enum incomplete parse for 'style' (php subset of js): php=[null] js=[null,style2]",
"enum incomplete parse for 'system_notice_btn1_color' (php subset of js): php=[primary] js=[primary,success,warning,danger,info,purple,dark]",
"enum incomplete parse for 'system_notice_btn2_color' (php subset of js): php=[primary] js=[primary,success,warning,danger,info,purple,dark]",
"enum incomplete parse for 'system_notice_btn3_color' (php subset of js): php=[primary] js=[primary,success,warning,danger,info,purple,dark]",
"enum incomplete parse for 'system_notice_btn4_color' (php subset of js): php=[primary] js=[primary,success,warning,danger,info,purple,dark]",
"enum incomplete parse for 'system_notice_policy' (php subset of js): php=[] js=[,signin,vip,free,auth]",
"enum incomplete parse for 'system_notice_size' (php subset of js): php=[] js=[,modal-mini,modal-sm,modal-lg]",
"enum incomplete parse for 'theme_mode' (php subset of js): php=[white-theme] js=[white-theme,dark-theme,time-auto]",
"enum incomplete parse for 'user_email_limit_type' (php subset of js): php=[not] js=[not,allow]",
"enum incomplete parse for 'user_sign_type' (php subset of js): php=[modal] js=[modal,page]",
"enum incomplete parse for 'user_signin_nopas_active' (php subset of js): php=[nopas] js=[nopas,pas,only_nopas]",
"enum incomplete parse for 'wechat_payment_type' (php subset of js): php=[native] js=[native,h5]",
"enum incomplete parse for 'weixingzh_gzh_type' (php subset of js): php=[service] js=[service,subscribe]",
"assets/admin/build/ missing — run: cd assets/admin && npm run build"
],
"info": [
"PHP schema domains: global, page_display, post_list, permissions, users, payment, extensions, tools, ExtensionsAudit, ExtensionsIP, ExtensionsPush, ToolsBackup, ToolsHealth, ToolsImportExport",
"Menu pages discovered: 60"
],
"domains": {
"global": {
"sections": [
"code-highlight",
"common",
"custom-code",
"email",
"i18n",
"layout",
"logo",
"search",
"seo",
"share",
"system-notice"
],
"files": [
"src/Admin/Schema/GlobalSchema.php"
]
},
"page_display": {
"sections": [
"category",
"footer",
"header-components",
"header-nav",
"homepage",
"other",
"tag",
"user-home"
],
"files": [
"src/Admin/Schema/SchemaPageDisplay.php"
]
},
"post_list": {
"sections": [
"comment",
"feature",
"filter",
"list",
"page",
"pay",
"submit",
"thumb"
],
"files": [
"src/Admin/Schema/SchemaPostList.php",
"src/Admin/Schema/PostList/SchemaPostListList.php"
]
},
"permissions": {
"sections": [
"attachment",
"capabilities",
"login",
"moderation"
],
"files": [
"src/Admin/Schema/SchemaPermissions.php"
]
},
"users": {
"sections": [
"auth",
"badge",
"credits",
"features",
"level",
"notifications",
"oauth",
"report",
"sms",
"verify",
"wechat"
],
"files": [
"src/Admin/Schema/SchemaUsers.php"
]
},
"payment": {
"sections": [
"affiliate",
"gateway",
"knowledge",
"recharge",
"revenue",
"vip",
"withdrawal"
],
"files": [
"src/Admin/Schema/SchemaPayment.php"
]
},
"extensions": {
"sections": [
"audit",
"ip",
"push"
],
"files": [
"src/Admin/Schema/SchemaExtensions.php"
]
},
"tools": {
"sections": [
"backup",
"health",
"import-export"
],
"files": [
"src/Admin/Schema/SchemaTools.php"
]
},
"ExtensionsAudit": {
"sections": [
"audit"
],
"files": [
"src/Admin/Schema/SchemaExtensionsAudit.php"
]
},
"ExtensionsIP": {
"sections": [
"ip"
],
"files": [
"src/Admin/Schema/SchemaExtensionsIP.php"
]
},
"ExtensionsPush": {
"sections": [
"push"
],
"files": [
"src/Admin/Schema/SchemaExtensionsPush.php"
]
},
"ToolsBackup": {
"sections": [
"backup"
],
"files": [
"src/Admin/Schema/SchemaToolsBackup.php"
]
},
"ToolsHealth": {
"sections": [
"health"
],
"files": [
"src/Admin/Schema/SchemaToolsHealth.php"
]
},
"ToolsImportExport": {
"sections": [
"import-export"
],
"files": [
"src/Admin/Schema/SchemaToolsImportExport.php"
]
}
},
"page_count": 60,
"build": {
"present": false,
"entry": false,
"missing_chunks": [],
"chunks": []
}
}