Files
wordpress-theme-aksrt/tools/admin-contract-report.json
T
kate522andClaude Fable 5 20fde1d652 fix(skeleton): put the widget gutter relief on the skeleton's inner item
小工具(首页挂载的 / 侧栏的)骨架加载占位比真实卡片窄一截:card 布局下
每侧窄 8px,视觉上就是「骨架小了一些」。

小工具的卡片走 skip_wrapper=true,直接挂在 .widget-ajaxpager 上
(src/WidgetSystem/PostRenderer.php),不经过 .posts-row,因此只受小工具
这条独立的负边距链作用:

  .widget-ajaxpager            margin: -8px
  .posts-item.card(真实卡片)  margin: 8px   ← 卡片自身自带
  .post_ajax_loader(外层)     margin: 8px   ← f61142ee 加的补偿
  .posts-item.card(骨架内层)  margin: 8px   ← 同一条卡片规则

骨架于是拿到 8px(外层 loader)+ 8px(内层卡片)= 16px,而真实卡片只有
8px,内容区每侧少 8px。list 模式没暴露是因为 .posts-item 的 8px 来自
`.widget-main-post.style-list .posts-item`,该规则只覆盖 style-list、
不作用于骨架,外层的 8px 恰好补上 list 卡片应有的一份,刚好对齐。

修法:把水平补偿从外层 .post_ajax_loader 移到骨架内层的 .posts-item /
.posts-mini —— 与真实卡片同一个元素、同一条选择器,于是两者逐像素同宽,
也顺带回答了「补偿链的拥有者是谁」这个一直在打补丁的问题。

- assets/css/main.css、assets/css/frontend/post-card.css:.posts-row 与
  .widget-ajaxpager 两条链、桌面 8px 与移动 5px 两组,共 8 处规则改为
  内层选择器。
- assets/css/routes/user-home.css:面板归零规则同步改到内层,否则它归零
  的是已经失效的外层,旧补偿会重新显形。
- tests/widget-system/asset-ledger-contract.test.cjs:把守卫断言改成内层
  选择器,并修正规则匹配以支持选择器组(.posts-item, .posts-mini)。
  注释说明为何不能补偿外层。

参考主题 zibll 完全没有 .post_ajax_loader 的 margin 规则;AKSRT 需要它,
是因为骨架多包了一层。定位在内层是与参考主题等价的正确解。

Verification:
- node tests/widget-system/asset-ledger-contract.test.cjs  16/16
- node tests/widget-system/post-visual-contract.test.cjs   22/22
- node tests/widget-system/zibll-modern-widgets-contract.test.cjs 10/10
- node tests/widget-system/lazyload-contract.test.cjs      7/7
- node tests/widget-system/frontend-lifecycle-contract.test.cjs 13/13
- node tests/widget-system/page-display-contract.test.cjs  18/18
- node tests/widget-system/message-center-contract.test.cjs 8/8
- php tools/audit-admin-contracts.php  errors=0
- build:public 已重建;旧外层规则在源与产物中均已归零

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

236 lines
11 KiB
JSON

{
"generated_at": "2026-10-03T20:06:15+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": []
}
}