fix(creator-studio): caret overlap in toolbar and hidden sub-categories

工具条下拉触发器的下三角原本绝对定位在按钮右下角,按钮宽度不够时会压到
居中的文字上。改为文字 + 三角同行排版(.jio-creator__tool-meta),宽度不足
时只压缩文字。

分类只查询 parent=0,导致二级 / 三级分类在投稿页完全不可选。新增
SubmitCategories 统一解析:
- 取全部分类并按父子关系深度优先展平,带上 depth / path;
- 白名单按"选了上级即包含其全部子级"展开,未配置白名单时不做额外过滤;
- 创作者工作台、经典投稿表单、保存校验与审核应用共用同一份结果。

选择器按 depth 缩进,搜索同时匹配完整路径。

同时把 assets/creator-studio/build 与 assets/admin/build 统一为整目录忽略
(不再跟踪 .gitkeep),避免构建产物反复被误提交。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Opus 5 committed 2026-11-09 18:10:19 +08:00
1 parent 330df53195
commit beb898b1ab
12 files changed
+291 -53

No files matched your search

+2 -3
View File
@@ -427,9 +427,8 @@ final class SubmissionVersion {
if (isset($snapshot['categories']) && is_array($snapshot['categories'])) {
$cats = array_values(array_unique(array_filter(array_map('absint', $snapshot['categories']))));
$allowed = is_array($settings['allowed_cat_ids'] ?? null) ? array_map('intval', $settings['allowed_cat_ids']) : [];
if ($allowed !== [] && $cats !== []) {
$cats = array_values(array_intersect($cats, $allowed));
if ($cats !== []) {
$cats = SubmitCategories::filter_ids($cats, $settings);
}
wp_set_post_categories($post_id, $cats);
}