From 5850b5176eb10a76cca7210e90d7af4e698bc97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sat, 14 Mar 2026 13:31:22 +0000 Subject: [PATCH] admin-components: organize platform orders compact components (row-meta/row-warn) --- public/css/admin-components.css | 4 ++ ...ntsCssPlatformOrdersSectionCommentTest.php | 37 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 tests/Feature/AdminComponentsCssPlatformOrdersSectionCommentTest.php diff --git a/public/css/admin-components.css b/public/css/admin-components.css index 4f70d1b..2e8fc17 100644 --- a/public/css/admin-components.css +++ b/public/css/admin-components.css @@ -89,7 +89,11 @@ /* 平台订单列表(精简视图):进一步收敛信息密度 */ .platform-orders-table.is-compact td{padding-top:8px;padding-bottom:8px;} .platform-orders-table.is-compact .muted-xs{font-size:12px;} + +/* 平台订单列表:二行辅助信息(例如 线索/订阅ID) */ .platform-orders-table .row-meta{margin-top:2px;} + +/* 平台订单列表:行内治理提示(精简视图主要入口) */ .platform-orders-table .row-warn{margin-top:4px;padding:4px 6px;border-left:3px solid #e06b67;background:#fff9f9;border-radius:4px;} .platform-orders-table .row-warn a.link{color:#b52b27;text-decoration:underline;} .platform-orders-table .row-warn a.link:hover{text-decoration:none;} diff --git a/tests/Feature/AdminComponentsCssPlatformOrdersSectionCommentTest.php b/tests/Feature/AdminComponentsCssPlatformOrdersSectionCommentTest.php new file mode 100644 index 0000000..42855b4 --- /dev/null +++ b/tests/Feature/AdminComponentsCssPlatformOrdersSectionCommentTest.php @@ -0,0 +1,37 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_admin_components_css_contains_platform_orders_row_meta_and_row_warn_section_comments(): void + { + $this->loginAsPlatformAdmin(); + + $css = file_get_contents(public_path('css/admin-components.css')); + $this->assertIsString($css); + + // 用注释守住“组织结构”,便于后续持续美化时快速定位 + $this->assertStringContainsString('/* 平台订单列表:二行辅助信息(例如 线索/订阅ID) */', $css); + $this->assertStringContainsString('/* 平台订单列表:行内治理提示(精简视图主要入口) */', $css); + + // 同时确保核心 selector 仍在(防止误删导致样式断裂) + $this->assertStringContainsString('.platform-orders-table .row-meta{', $css); + $this->assertStringContainsString('.platform-orders-table .row-warn{', $css); + } +}