summary: เปลี่ยนคำว่า "สารบัญ" เป็น "รายการตามหน้า" ทั้งหน้าสรุป — ตามคำขอผู้ใช้ 2026-09-18 (คำเดิมสื่อว่าเป็นสารบัญครบทุกหน้าของเอกสาร แต่บล็อกนี้แสดงเฉพาะหน้าที่มี annotation/bookmark คำใหม่ตรงเนื้อหาจริงกว่า) แก้ให้เป็นชื่อเดียวกันทุกจุด: หัวข้อ desktop (h2), ป้ายมือถือ <details> ("รายการตามหน้าและผู้ร่วมทำ"), aria-label ของ <nav> ทั้ง 2 จุด (ตัดส่วน "หน้าที่มีรายการ" ทิ้ง — คำใหม่สื่อความหมายนั้นอยู่แล้วและ link แต่ละรายการมี aria-label "หน้า N, X รายการ" ของตัวเอง) + sync comment ที่เรียกบล็อกนี้ (page.tsx 6 จุด, globals.css 1 จุด) และคำอธิบายหน้าใน CLAUDE.md (3 จุด) — เหลือคำ "สารบัญ" จุดเดียวโดยเจตนาใน comment page.tsx ("จุดไข่ปลาแบบสารบัญของเอกสารราชการ") เพราะอ้างถึงรูปแบบภาพ dot leader ไม่ใช่ชื่อบล็อก — เป็นการแก้ string/comment ล้วน ไม่แต่ตรรกะ (grep ยืนยันไม่มี test/e2e ผูกข้อความนี้)
All checks were successful
Deploy eCourt Note Web to Server / Validate Database Schema (Drizzle) (push) Successful in 3s
Deploy eCourt Note Web to Server / Build Web Docker Image (push) Successful in 52s
Deploy eCourt Note Web to Server / Deploy eCourt Note Web to Server (push) Successful in 6s
Deploy eCourt Note Web to Server / Notify Deployment Status (push) Successful in 0s

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-09-18 12:09:43 +07:00
parent f9114b3f00
commit e713bcc5e3
3 changed files with 12 additions and 12 deletions

View file

@ -62,7 +62,7 @@ app/uploads/[name]/route.ts ← เสิร์ฟไฟล์อัป
app/page.tsx ← รายการไฟล์ (server component) app/page.tsx ← รายการไฟล์ (server component)
app/login/page.tsx ← หน้า login (มี session แล้ว redirect /) app/login/page.tsx ← หน้า login (มี session แล้ว redirect /)
app/annotate/[id]/page.tsx ← โหลด file + initial data → PDFViewer app/annotate/[id]/page.tsx ← โหลด file + initial data → PDFViewer
app/annotate/[id]/summary/page.tsx ← หน้าสรุป Annotation+Bookmark จัดกลุ่มตามหน้า (design "แฟ้มสำนวน" 2026-09-17: แถบหัวน้ำเงิน + สารบัญจุดไข่ปลา + การ์ดรายหน้า 1 หน้า 1 การ์ด ขอบ folio — คำขอผู้ใช้ 2026-09-17 แทนแผ่นกระดาษแผ่นเดียวคั่นเส้น; ต่อหน้า = บรรทัดสรุปหน้า (ไม่มีหัวข้อ) + Bookmark/Annotation หุบ-กางได้ผ่าน CollapsibleBlock; สารบัญ desktop = การ์ด sticky มี max-h, มือถือ < lg = <details> การ์ด ไม่มี JS; generateMetadata ตั้งชื่อแท็บ browser ตามคดี; ตอนพิมพ์ header เป็นกรอบเส้นน้ำเงิน + ซ่อนแถบ action/สารบัญมือถือ — กฎ @media print อยู่ใน globals.css) — อย่าถอด class `summary-page` ของ <main> (กฎ coarse 44px ใน globals.css ผูกอยู่กับ selector นี้ ครอบทั้ง `a` และ `button`) app/annotate/[id]/summary/page.tsx ← หน้าสรุป Annotation+Bookmark จัดกลุ่มตามหน้า (design "แฟ้มสำนวน" 2026-09-17: แถบหัวน้ำเงิน + รายการตามหน้าจุดไข่ปลา + การ์ดรายหน้า 1 หน้า 1 การ์ด ขอบ folio — คำขอผู้ใช้ 2026-09-17 แทนแผ่นกระดาษแผ่นเดียวคั่นเส้น; ต่อหน้า = บรรทัดสรุปหน้า (ไม่มีหัวข้อ) + Bookmark/Annotation หุบ-กางได้ผ่าน CollapsibleBlock; รายการตามหน้า desktop = การ์ด sticky มี max-h, มือถือ < lg = <details> การ์ด ไม่มี JS; generateMetadata ตั้งชื่อแท็บ browser ตามคดี; ตอนพิมพ์ header เป็นกรอบเส้นน้ำเงิน + ซ่อนแถบ action/รายการตามหน้ามือถือ — กฎ @media print อยู่ใน globals.css) — อย่าถอด class `summary-page` ของ <main> (กฎ coarse 44px ใน globals.css ผูกอยู่กับ selector นี้ ครอบทั้ง `a` และ `button`)
components/summary/CollapsibleBlock.tsx ← client component เดียวของหน้าสรุป (state หุบ/กางกลุ่ม Bookmark/Annotation — children ส่งจาก server ได้ตรง ๆ) components/summary/CollapsibleBlock.tsx ← client component เดียวของหน้าสรุป (state หุบ/กางกลุ่ม Bookmark/Annotation — children ส่งจาก server ได้ตรง ๆ)
components/pdf/PDFViewer.tsx ← client root (tool state, zoom, selection, lazy render หน้า) components/pdf/PDFViewer.tsx ← client root (tool state, zoom, selection, lazy render หน้า)
components/pdf/InkLayer.tsx ← SVG freehand + รูปทรง + redaction components/pdf/InkLayer.tsx ← SVG freehand + รูปทรง + redaction

View file

@ -36,8 +36,8 @@ import { withBasePath } from "@/utils/base-path";
// หน้าสรุปหมายเหตุ (F15/D2) — server component รวม annotation (ทุกผู้ใช้) + bookmark // หน้าสรุปหมายเหตุ (F15/D2) — server component รวม annotation (ทุกผู้ใช้) + bookmark
// จัดกลุ่มตามหน้า แต่ละแถวกระโดดเป็น deep link `/annotate/<id>?ann=` / `?page=` (F12) // จัดกลุ่มตามหน้า แต่ละแถวกระโดดเป็น deep link `/annotate/<id>?ann=` / `?page=` (F12)
// — design "แฟ้มสำนวน" 2026-09-17: แถบหัวกระดาษน้ำเงิน (สืบต่อจาก tile JN ของแบรนด์) + // — design "แฟ้มสำนวน" 2026-09-17: แถบหัวกระดาษน้ำเงิน (สืบต่อจาก tile JN ของแบรนด์) +
// สารบัญจุดไข่ปลา + การ์ดรายหน้า 1 หน้า 1 การ์ด (คำขอผู้ใช้ 2026-09-17 แทนแผ่น // รายการตามหน้าจุดไข่ปลา + การ์ดรายหน้า 1 หน้า 1 การ์ด (คำขอผู้ใช้ 2026-09-17 แทนแผ่น
// กระดาษแผ่นเดียวคั่นเส้น) แต่ละการ์ดมีขอบ folio เลขหน้าใหญ่; สารบัญเป็น anchor // กระดาษแผ่นเดียวคั่นเส้น) แต่ละการ์ดมีขอบ folio เลขหน้าใหญ่; รายการตามหน้าเป็น anchor
// link (#page-N) ล้วน — desktop เป็น sticky aside แบบการ์ด ส่วนมือถือ (< lg) เป็น // link (#page-N) ล้วน — desktop เป็น sticky aside แบบการ์ด ส่วนมือถือ (< lg) เป็น
// <details> แบบการ์ด ไม่มี JS / client component เดียวของหน้าคือ CollapsibleBlock // <details> แบบการ์ด ไม่มี JS / client component เดียวของหน้าคือ CollapsibleBlock
// (หุบ/กางกลุ่ม Bookmark/Annotation) // (หุบ/กางกลุ่ม Bookmark/Annotation)
@ -165,7 +165,7 @@ export default async function SummaryPage({
} }
const pages = Array.from(pageMap.entries()).sort((x, y) => x[0] - y[0]); const pages = Array.from(pageMap.entries()).sort((x, y) => x[0] - y[0]);
// ภาพรวมระดับไฟล์สำหรับสารบัญ desktop (sticky aside) + สารบัญมือถือ (<details>) // ภาพรวมระดับไฟล์สำหรับรายการตามหน้า desktop (sticky aside) + มือถือ (<details>)
const allParticipants = Array.from( const allParticipants = Array.from(
new Set([ new Set([
...dtos.map((a) => a.userName), ...dtos.map((a) => a.userName),
@ -238,20 +238,20 @@ export default async function SummaryPage({
</div> </div>
) : ( ) : (
<div className="mt-5 lg:grid lg:grid-cols-[220px_minmax(0,1fr)] lg:items-start lg:gap-8"> <div className="mt-5 lg:grid lg:grid-cols-[220px_minmax(0,1fr)] lg:items-start lg:gap-8">
{/* สารบัญมือถือ (จอ < lg) — design review 2026-09-17 H2: คืน navigation ที่หาย {/* รายการตามหน้ามือถือ (จอ < lg) — design review 2026-09-17 H2: คืน navigation ที่หาย
ไปบนมือถือ (aside ด้านล่างแสดงเฉพาะ lg) ใช้ <details> ได้หุบ/กาง + keyboard ไปบนมือถือ (aside ด้านล่างแสดงเฉพาะ lg) ใช้ <details> ได้หุบ/กาง + keyboard
โดยไม่มี JS เพิ่ม — จุดไข่ปลา + ผู้ร่วมทำ ภาษาเดียวกับ desktop (จอ lg กับ โดยไม่มี JS เพิ่ม — จุดไข่ปลา + ผู้ร่วมทำ ภาษาเดียวกับ desktop (จอ lg กับ
ตอนพิมพ์ซ่อน — display:none ไม่กินช่องของกริด) */} ตอนพิมพ์ซ่อน — display:none ไม่กินช่องของกริด) */}
<details className="group rounded-xl border border-slate-200 bg-white shadow-sm lg:hidden print:hidden"> <details className="group rounded-xl border border-slate-200 bg-white shadow-sm lg:hidden print:hidden">
<summary className="flex cursor-pointer list-none items-center justify-between rounded-md px-4 py-3 text-sm font-semibold text-slate-800 hover:text-primary [&::-webkit-details-marker]:hidden"> <summary className="flex cursor-pointer list-none items-center justify-between rounded-md px-4 py-3 text-sm font-semibold text-slate-800 hover:text-primary [&::-webkit-details-marker]:hidden">
สารบัญและผู้ร่วมทำ รายการตามหน้าและผู้ร่วมทำ
<ChevronDown <ChevronDown
aria-hidden aria-hidden
className="h-4 w-4 shrink-0 text-slate-400 transition-transform group-open:rotate-180 motion-reduce:transition-none" className="h-4 w-4 shrink-0 text-slate-400 transition-transform group-open:rotate-180 motion-reduce:transition-none"
/> />
</summary> </summary>
<nav <nav
aria-label="สารบัญหน้าที่มีรายการ" aria-label="รายการตามหน้า"
className="flex flex-col gap-0.5 border-t border-slate-100 px-2 pb-2 pt-2" className="flex flex-col gap-0.5 border-t border-slate-100 px-2 pb-2 pt-2"
> >
{pages.map(([pi, b]) => ( {pages.map(([pi, b]) => (
@ -277,13 +277,13 @@ export default async function SummaryPage({
</p> </p>
</details> </details>
{/* สารบัญ (จอ ≥ lg) — สารบัญแบบจุดไข่ปลาของเอกสารราชการ anchor ล้วนไม่มี JS {/* รายการตามหน้า (จอ ≥ lg) — จุดไข่ปลาแบบสารบัญของเอกสารราชการ anchor ล้วนไม่มี JS
เป็นการ์ดชุดเดียวกับ <details> มือถือและการ์ดรายหน้า (แสดงเฉพาะหน้าที่มี เป็นการ์ดชุดเดียวกับ <details> มือถือและการ์ดรายหน้า (แสดงเฉพาะหน้าที่มี
รายการ ≥ 1 ตามหลัก minimize choices; max-h กันเอกสารหลายสิบหน้าสูงเกินจอ รายการ ≥ 1 ตามหลัก minimize choices; max-h กันเอกสารหลายสิบหน้าสูงเกินจอ
— ครึ่งล่างของ sticky กดไม่ได้ตลอดกาล) */} — ครึ่งล่างของ sticky กดไม่ได้ตลอดกาล) */}
<aside className="hidden rounded-xl border border-slate-200 bg-white p-4 shadow-sm lg:sticky lg:top-6 lg:block lg:max-h-[calc(100vh-3rem)] lg:overflow-y-auto"> <aside className="hidden rounded-xl border border-slate-200 bg-white p-4 shadow-sm lg:sticky lg:top-6 lg:block lg:max-h-[calc(100vh-3rem)] lg:overflow-y-auto">
<h2 className="text-sm font-semibold text-slate-800">สารบัญ</h2> <h2 className="text-sm font-semibold text-slate-800">รายการตามหน้า</h2>
<nav aria-label="สารบัญหน้าที่มีรายการ" className="mt-2 flex flex-col gap-1"> <nav aria-label="รายการตามหน้า" className="mt-2 flex flex-col gap-1">
{pages.map(([pi, b]) => ( {pages.map(([pi, b]) => (
<a <a
key={pi} key={pi}
@ -314,7 +314,7 @@ export default async function SummaryPage({
{/* การ์ดรายหน้า — 1 หน้า 1 การ์ด เรียงลงมาแยกด้วยช่องว่าง (คำขอผู้ใช้ {/* การ์ดรายหน้า — 1 หน้า 1 การ์ด เรียงลงมาแยกด้วยช่องว่าง (คำขอผู้ใช้
2026-09-17 แทนแผ่นกระดาษแผ่นเดียวคั่นเส้น); แต่ละการ์ดมีขอบ folio: 2026-09-17 แทนแผ่นกระดาษแผ่นเดียวคั่นเส้น); แต่ละการ์ดมีขอบ folio:
เลขหน้าใหญ่ + เส้นดิ่ง แบบเลขหน้าบนขอบกระดาษ (mt-5 lg:mt-0 — ระยะจาก เลขหน้าใหญ่ + เส้นดิ่ง แบบเลขหน้าบนขอบกระดาษ (mt-5 lg:mt-0 — ระยะจาก
สารบัญ <details> บนมือถือ; จอ lg กริดจัดให้) */} รายการตามหน้า <details> บนมือถือ; จอ lg กริดจัดให้) */}
<div className="mt-5 flex flex-col gap-4 lg:mt-0"> <div className="mt-5 flex flex-col gap-4 lg:mt-0">
{pages.map(([pi, b]) => { {pages.map(([pi, b]) => {
return ( return (

View file

@ -212,7 +212,7 @@
แปลงเป็นกรอบเส้นน้ำเงิน + ตัวอักษรน้ำเงินแทน (อ่านได้บนเครื่องพิมพ์ขาวดำ แปลงเป็นกรอบเส้นน้ำเงิน + ตัวอักษรน้ำเงินแทน (อ่านได้บนเครื่องพิมพ์ขาวดำ
ประหยัดหมึก) และไม่ผ่าหน้ากระดาษกลาง section ของหน้าเอกสาร (หน้าที่ยาวเกิน ประหยัดหมึก) และไม่ผ่าหน้ากระดาษกลาง section ของหน้าเอกสาร (หน้าที่ยาวเกิน
กระดาษเดียว browser เลื่อนทั้งก้อนขึ้นหน้าถัดไปเอง — break-inside เป็นคำ กระดาษเดียว browser เลื่อนทั้งก้อนขึ้นหน้าถัดไปเอง — break-inside เป็นคำ
แนะนำ ไม่ใช่กฎเหล็ก) / แถบ action กับสารบัญมือถือซ่อนด้วย print:hidden ใน JSX */ แนะนำ ไม่ใช่กฎเหล็ก) / แถบ action กับรายการตามหน้ามือถือซ่อนด้วย print:hidden ใน JSX */
@media print { @media print {
main.summary-page header { main.summary-page header {
background: #fff; background: #fff;