chore(branding): remove leftover upstream theme identifiers
The theme was renamed Zibll/子比 → AKSRT → Jio, but upstream branding survived the sweeps in CSS classes, the SVG sprite prefix, a persisted widget field ID, JS events, admin Vue class names, test infrastructure and docblocks. Renames: - zib-widget / zib-widget-wrap / zib-slider → jio-widget-box / jio-widget-box-wrap / jio-slider-box (jio-widget is taken by the modern widget shell, jio-box-* by the card primitives) - zib-partners-scroll + zps-* → jio-partners-scroll + jps-* - zib-combo-info-card + zci-* → jio-combo-info-card + jci-* - zibsvg- → jiosvg-, including the exported picker helpers and the fa-zibsvg- family-prefix guard - zibpay_type → pay_type; the dual-read fallback in PostQuery collapses to a single key - [zibajax="submit"] dropped (no PHP emitter); zib_ajax.success → jio_ajax.success - aks-* admin Vue classes → jio-* - zib_palette() → palette() User-facing vendor traces are gone: the floating "more" button default no longer ships a zibll.com link or 子比主题 marketing copy, the notice widget ships no preset promo entries, and the four 官网教程 links are removed from the post-list admin schema. Test infrastructure renamed to neutral names (docker-compose.reference.yml, Caddyfile, article-baseline.json, modern-widgets-contract.test.cjs) with their DB/volume/env/slug identifiers following. Kept intentionally, documented in tests/fixtures/README.md: the golden fixture reference fingerprint (a SHA-256 record of an external directory, read by validate-widget-golden / generate-widget-golden-fixture / audit-widget-system), the doesNotMatch guards that prove the old tokens are gone, and the reference theme's own meta key in the visual fixtures. No backward-compat or data migration: saved widget configs holding old icon keys or the old field ID silently lose them, per the project's rewrite-over-compatibility rule. Verified: 132/132 node contract tests, php tests/widget-system/run.php (146 assertions), audit-admin-contracts, audit-psr4-paths and validate-widget-golden all green; tracked bundles regenerated and in sync. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
42cc64106d
commit
427968a721
188 files changed
+915
-967
No files matched your search
File renamed without changes.
+12
-12
@@ -1,14 +1,14 @@
|
||||
# Jio / Zibll visual reference
|
||||
# Jio / reference visual comparison
|
||||
|
||||
The reference stack is isolated from the Jio site and exposes Zibll at
|
||||
https://localhost:9443. The local Zibll source remains read-only.
|
||||
The reference stack is isolated from the Jio site and exposes the reference
|
||||
theme at https://localhost:9443. The local reference source remains read-only.
|
||||
|
||||
~~~powershell
|
||||
$env:ZIBLL_THEME_PATH='C:\Users\Xing\Desktop\zibll'
|
||||
docker compose -f tests/visual/docker-compose.zibll.yml up -d
|
||||
docker compose -f tests/visual/docker-compose.zibll.yml run --rm wp core install --url=https://localhost:9443 --title='Zibll Reference' --admin_user=visual_admin --admin_password='Jio-Visual-2026!' --admin_email=visual@example.test --skip-email
|
||||
docker compose -f tests/visual/docker-compose.zibll.yml run --rm wp theme activate zibll
|
||||
docker compose -f tests/visual/docker-compose.zibll.yml run --rm wp eval-file /visual-fixtures/article-fixtures.php create
|
||||
$env:REFERENCE_THEME_PATH='C:\Users\Xing\Desktop\zibll'
|
||||
docker compose -f tests/visual/docker-compose.reference.yml up -d
|
||||
docker compose -f tests/visual/docker-compose.reference.yml run --rm wp core install --url=https://localhost:9443 --title='Reference' --admin_user=visual_admin --admin_password='Jio-Visual-2026!' --admin_email=visual@example.test --skip-email
|
||||
docker compose -f tests/visual/docker-compose.reference.yml run --rm wp theme activate reference
|
||||
docker compose -f tests/visual/docker-compose.reference.yml run --rm wp eval-file /visual-fixtures/article-fixtures.php create
|
||||
~~~
|
||||
|
||||
Run the same theme-neutral article generator inside the Jio WordPress
|
||||
@@ -22,8 +22,8 @@ wp eval-file /visual-fixtures/article-fixtures.php cleanup
|
||||
The shared generator creates the same authors, category, tag, dates, images,
|
||||
featured/no-image/multi-image/first-image/external-cover posts, slide and video
|
||||
metadata, pay/VIP states, sticky state, and interaction counters in both sites.
|
||||
Fixture-only Zibll and Jio metadata are written together so the rendered
|
||||
business state is identical without adding compatibility code to either theme.
|
||||
Fixture-only metadata is written together so the rendered business state is
|
||||
identical without adding compatibility code to either theme.
|
||||
|
||||
Use `tests/visual/article-visual-matrix-v1.json` for the article-only captures.
|
||||
Every reference/candidate pair must record the screenshot, DOM, computed styles,
|
||||
@@ -38,8 +38,8 @@ or critical/serious accessibility issue.
|
||||
Clean the reference fixture before removing its volumes:
|
||||
|
||||
~~~powershell
|
||||
docker compose -f tests/visual/docker-compose.zibll.yml run --rm wp eval-file /visual-fixtures/article-fixtures.php cleanup
|
||||
docker compose -f tests/visual/docker-compose.zibll.yml down -v
|
||||
docker compose -f tests/visual/docker-compose.reference.yml run --rm wp eval-file /visual-fixtures/article-fixtures.php cleanup
|
||||
docker compose -f tests/visual/docker-compose.reference.yml down -v
|
||||
~~~
|
||||
|
||||
The older `tools/wp-cli-visual-fixtures.php`, widget golden file, and broad page
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schema": "jio.zibll-article-baseline.v1",
|
||||
"schema": "jio.article-baseline.v1",
|
||||
"referencePath": "C:\\Users\\Xing\\Desktop\\zibll",
|
||||
"theme": "Zibll",
|
||||
"theme": "reference",
|
||||
"version": "9.0",
|
||||
"capturedAt": "2026-08-18",
|
||||
"files": {
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Theme-neutral article fixtures shared by the Zibll and Jio visual sites.
|
||||
* Theme-neutral article fixtures shared by the reference and Jio visual sites.
|
||||
*
|
||||
* Usage: wp eval-file /visual-fixtures/article-fixtures.php create|cleanup
|
||||
*/
|
||||
@@ -12,8 +12,15 @@ if (!defined('WP_CLI') || !WP_CLI) {
|
||||
}
|
||||
|
||||
$action = sanitize_key((string) ($args[0] ?? ''));
|
||||
$manifest_key = 'zibll_article_visual_fixture_v1';
|
||||
$prefix = 'zibll_article_v1_';
|
||||
$manifest_key = 'article_visual_fixture_v1';
|
||||
$prefix = 'article_v1_';
|
||||
|
||||
/**
|
||||
* 参考主题读取自己的 meta 键来渲染副标题、封面与计数器;Jio 读取 jio_* 键。
|
||||
* 这里同时写两套,保证两个站点渲染出的业务状态一致——这不是本主题的兼容层,
|
||||
* 而是给外部参考系统做固件管道。
|
||||
*/
|
||||
const REFERENCE_META_KEY = 'zib_other_data';
|
||||
|
||||
if (!in_array($action, ['create', 'cleanup'], true)) {
|
||||
WP_CLI::error('Expected create or cleanup.');
|
||||
@@ -76,7 +83,7 @@ $manifest = [
|
||||
'files' => [],
|
||||
'options' => [],
|
||||
];
|
||||
foreach (['jio_settings', 'zibll_options'] as $option_name) {
|
||||
foreach (['jio_settings', 'reference_options'] as $option_name) {
|
||||
$manifest['options'][$option_name] = [
|
||||
'exists' => get_option($option_name, null) !== null,
|
||||
'value' => get_option($option_name),
|
||||
@@ -110,7 +117,7 @@ try {
|
||||
'post_related_orderby' => 'views',
|
||||
'related_title' => '相关推荐',
|
||||
];
|
||||
foreach (['jio_settings', 'zibll_options'] as $option_name) {
|
||||
foreach (['jio_settings', 'reference_options'] as $option_name) {
|
||||
$current = get_option($option_name, []);
|
||||
update_option($option_name, array_merge(is_array($current) ? $current : [], $visual_options), false);
|
||||
}
|
||||
@@ -136,8 +143,8 @@ try {
|
||||
$manifest['users'][] = (int) $user_id;
|
||||
}
|
||||
|
||||
$category = wp_insert_term('视觉文章', 'category', ['slug' => 'zibll-article-fixture']);
|
||||
$tag = wp_insert_term('视觉标签', 'post_tag', ['slug' => 'zibll-visual-tag']);
|
||||
$category = wp_insert_term('视觉文章', 'category', ['slug' => 'article-fixture']);
|
||||
$tag = wp_insert_term('视觉标签', 'post_tag', ['slug' => 'visual-tag']);
|
||||
if (is_wp_error($category) || is_wp_error($tag)) {
|
||||
throw new RuntimeException('Unable to create article fixture terms.');
|
||||
}
|
||||
@@ -167,7 +174,7 @@ try {
|
||||
$background = imagecolorallocate($image, $rgb[0], $rgb[1], $rgb[2]);
|
||||
$foreground = imagecolorallocate($image, 255, 255, 255);
|
||||
imagefill($image, 0, 0, $background);
|
||||
imagestring($image, 5, 48, 48, 'Zibll 9.0 Article Fixture ' . ($index + 1), $foreground);
|
||||
imagestring($image, 5, 48, 48, 'Article Fixture ' . ($index + 1), $foreground);
|
||||
imagejpeg($image, $filepath, 92);
|
||||
imagedestroy($image);
|
||||
} else {
|
||||
@@ -193,9 +200,9 @@ try {
|
||||
file_put_contents($video_path, '');
|
||||
$manifest['files'][] = $video_path;
|
||||
$video_url = trailingslashit($upload['url']) . basename($video_path);
|
||||
$term_other = (array) get_term_meta($category_id, 'zib_other_data', true);
|
||||
$term_other = (array) get_term_meta($category_id, REFERENCE_META_KEY, true);
|
||||
$term_other['cover_image'] = $image_urls[4];
|
||||
update_term_meta($category_id, 'zib_other_data', $term_other);
|
||||
update_term_meta($category_id, REFERENCE_META_KEY, $term_other);
|
||||
update_term_meta($category_id, 'cover_image', $image_urls[4]);
|
||||
update_term_meta($category_id, 'jio_category_cover_id', $attachment_ids[4]);
|
||||
|
||||
@@ -211,7 +218,7 @@ try {
|
||||
['slug' => 'first-image', 'title' => '文章首图作为缩略图', 'first_image' => 3],
|
||||
];
|
||||
foreach ($scenarios as $index => $scenario) {
|
||||
$content = '<p>固定摘要正文,用于 Zibll 与 Jio 的文章列表逐像素比较。</p>';
|
||||
$content = '<p>固定摘要正文,用于参考主题与 Jio 的文章列表逐像素比较。</p>';
|
||||
if (!empty($scenario['gallery'])) {
|
||||
$content .= implode('', array_map(static fn(string $url): string => '<img src="' . esc_url($url) . '" alt="">', array_slice($image_urls, 0, 4)));
|
||||
} elseif (isset($scenario['first_image'])) {
|
||||
@@ -245,26 +252,26 @@ try {
|
||||
$post_meta = [
|
||||
'subtitle' => ' · 固定副标题',
|
||||
];
|
||||
$zib_meta = (array) get_post_meta($post_id, 'zib_other_data', true);
|
||||
$zib_meta['subtitle'] = $post_meta['subtitle'];
|
||||
$reference_meta = (array) get_post_meta($post_id, REFERENCE_META_KEY, true);
|
||||
$reference_meta['subtitle'] = $post_meta['subtitle'];
|
||||
if (isset($scenario['external'])) {
|
||||
$post_meta['thumbnail_url'] = $image_urls[(int) $scenario['external']];
|
||||
$zib_meta['thumbnail_url'] = $post_meta['thumbnail_url'];
|
||||
$reference_meta['thumbnail_url'] = $post_meta['thumbnail_url'];
|
||||
}
|
||||
if (!empty($scenario['slides'])) {
|
||||
$post_meta['featured_slide'] = implode(',', array_slice($attachment_ids, 0, 4));
|
||||
$zib_meta['featured_slide'] = $post_meta['featured_slide'];
|
||||
$reference_meta['featured_slide'] = $post_meta['featured_slide'];
|
||||
}
|
||||
if (!empty($scenario['video'])) {
|
||||
$post_meta['featured_video'] = $video_url;
|
||||
$zib_meta['featured_video'] = $video_url;
|
||||
$reference_meta['featured_video'] = $video_url;
|
||||
}
|
||||
$zib_meta['views'] = 1200 + ($index * 137);
|
||||
$zib_meta['like'] = 30 + ($index * 7);
|
||||
update_post_meta($post_id, 'zib_other_data', $zib_meta);
|
||||
$reference_meta['views'] = 1200 + ($index * 137);
|
||||
$reference_meta['like'] = 30 + ($index * 7);
|
||||
update_post_meta($post_id, REFERENCE_META_KEY, $reference_meta);
|
||||
update_post_meta($post_id, 'jio_post_meta', $post_meta);
|
||||
update_post_meta($post_id, 'jio_post_views', $zib_meta['views']);
|
||||
update_post_meta($post_id, '_jio_like_count', $zib_meta['like']);
|
||||
update_post_meta($post_id, 'jio_post_views', $reference_meta['views']);
|
||||
update_post_meta($post_id, '_jio_like_count', $reference_meta['like']);
|
||||
update_post_meta($post_id, '_jio_favorite_count', 10 + $index);
|
||||
|
||||
$pay_type = (string) ($scenario['pay'] ?? 'no');
|
||||
@@ -287,7 +294,7 @@ try {
|
||||
stick_post((int) $manifest['posts'][0]);
|
||||
}
|
||||
update_option($manifest_key, $manifest, false);
|
||||
WP_CLI::success('Created identical Zibll/Jio article fixtures.');
|
||||
WP_CLI::success('Created identical reference/Jio article fixtures.');
|
||||
} catch (Throwable $error) {
|
||||
$cleanup($manifest);
|
||||
WP_CLI::error('Fixture creation rolled back: ' . $error->getMessage());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"schema": "jio.zibll-article-visual-matrix.v1",
|
||||
"schema": "jio.article-visual-matrix.v1",
|
||||
"reference": "https://localhost:9443",
|
||||
"candidate": "https://localhost",
|
||||
"fixture": "/visual-fixtures/article-fixtures.php",
|
||||
@@ -19,11 +19,11 @@
|
||||
"routes": [
|
||||
{ "id": "home", "path": "/", "states": ["default", "hover", "loading", "error"] },
|
||||
{ "id": "archive", "path": "/?post_type=post", "states": ["default", "numbered", "load-more", "infinite", "no-more"] },
|
||||
{ "id": "category", "path": "/category/zibll-article-fixture/", "states": ["default", "empty"] },
|
||||
{ "id": "tag", "path": "/tag/zibll-visual-tag/", "states": ["default", "empty"] },
|
||||
{ "id": "category", "path": "/category/article-fixture/", "states": ["default", "empty"] },
|
||||
{ "id": "tag", "path": "/tag/visual-tag/", "states": ["default", "empty"] },
|
||||
{ "id": "search", "path": "/?s=视觉", "states": ["default", "empty"] },
|
||||
{ "id": "author-a", "path": "/author/zibll_article_v1_author_a/", "states": ["default", "numbered", "load-more"] },
|
||||
{ "id": "single-related", "path": "/zibll_article_v1_featured/", "states": ["img", "list", "text"] }
|
||||
{ "id": "author-a", "path": "/author/article_v1_author_a/", "states": ["default", "numbered", "load-more"] },
|
||||
{ "id": "single-related", "path": "/article_v1_featured/", "states": ["img", "list", "text"] }
|
||||
],
|
||||
"postScenarios": ["featured", "no-image", "multi", "external", "slides", "video", "paid", "vip", "first-image"],
|
||||
"capture": {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
name: jio-zibll-visual-reference
|
||||
name: jio-visual-reference
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:11.4
|
||||
environment:
|
||||
MARIADB_DATABASE: zibll_reference
|
||||
MARIADB_USER: zibll
|
||||
MARIADB_PASSWORD: zibll
|
||||
MARIADB_DATABASE: reference
|
||||
MARIADB_USER: visual
|
||||
MARIADB_PASSWORD: visual
|
||||
MARIADB_RANDOM_ROOT_PASSWORD: "1"
|
||||
volumes:
|
||||
- zibll_db:/var/lib/mysql
|
||||
- reference_db:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
|
||||
interval: 5s
|
||||
@@ -23,14 +23,14 @@ services:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_USER: zibll
|
||||
WORDPRESS_DB_PASSWORD: zibll
|
||||
WORDPRESS_DB_NAME: zibll_reference
|
||||
WORDPRESS_DB_USER: visual
|
||||
WORDPRESS_DB_PASSWORD: visual
|
||||
WORDPRESS_DB_NAME: reference
|
||||
volumes:
|
||||
- zibll_wp:/var/www/html
|
||||
- reference_wp:/var/www/html
|
||||
- type: bind
|
||||
source: ${ZIBLL_THEME_PATH}
|
||||
target: /var/www/html/wp-content/themes/zibll
|
||||
source: ${REFERENCE_THEME_PATH}
|
||||
target: /var/www/html/wp-content/themes/reference
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: .
|
||||
@@ -44,8 +44,8 @@ services:
|
||||
ports:
|
||||
- "9443:443"
|
||||
volumes:
|
||||
- ./zibll-Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- zibll_caddy_data:/data
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- reference_caddy_data:/data
|
||||
|
||||
wp:
|
||||
image: wordpress:cli-php8.1
|
||||
@@ -57,14 +57,14 @@ services:
|
||||
user: "33:33"
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db
|
||||
WORDPRESS_DB_USER: zibll
|
||||
WORDPRESS_DB_PASSWORD: zibll
|
||||
WORDPRESS_DB_NAME: zibll_reference
|
||||
WORDPRESS_DB_USER: visual
|
||||
WORDPRESS_DB_PASSWORD: visual
|
||||
WORDPRESS_DB_NAME: reference
|
||||
volumes:
|
||||
- zibll_wp:/var/www/html
|
||||
- reference_wp:/var/www/html
|
||||
- type: bind
|
||||
source: ${ZIBLL_THEME_PATH}
|
||||
target: /var/www/html/wp-content/themes/zibll
|
||||
source: ${REFERENCE_THEME_PATH}
|
||||
target: /var/www/html/wp-content/themes/reference
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: .
|
||||
@@ -73,6 +73,6 @@ services:
|
||||
entrypoint: ["wp"]
|
||||
|
||||
volumes:
|
||||
zibll_db:
|
||||
zibll_wp:
|
||||
zibll_caddy_data:
|
||||
reference_db:
|
||||
reference_wp:
|
||||
reference_caddy_data:
|
||||
Reference in new issue
Block a user