Repository navigation
feat(reader): EPUB canonical spine reading order inspector and test fixtures - #3
Merged
intxdv merged 3 commits intoNov 16, 2026
Merged
Conversation
intxdv
deleted the
feature/016-epub-spine-order-inspector-and-fixtures
branch
November 16, 2026 03:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Ringkasan Perubahan Utama (Summary)
PR ini menghadirkan fitur visualisasi dan inspeksi urutan baca resmi (Spine Reading Order) di antarmuka XHTML Reader Previewer, serta menyediakan automated test fixture khusus di mana urutan spine sengaja dibuat berbeda dari urutan alfabetis nama berkas. Fitur ini memastikan bahwa pembaca dan pengembang EPUB dapat memverifikasi bahwa alur buku dijelajahi berdasarkan spesifikasi kanonikal
<spine>pada file OPF (bukan berdasarkan urutan abjad berkas di direktori maupun urutan deklarasi<manifest>), lengkap dengan indikator kelinieran bacaan (linear="yes"vslinear="no"), badge non-linear, tab switcher pada sidebar, serta rich metadata pada toolbar reader.✨ Fitur Baru & Pembaruan (Features & Updates)
linearpada tag<itemref linear="...">dipetakan secara akurat (linear: boolean) ke dalamEpubSpineItemdisrc/epub.ts.ReaderNavInfodisrc/reader-shell.tsdengan metadatacurrentFileName,isLinear, dan arrayspineItems(dengan indeks, href, label, fileName, dan flag linear).src/extension.ts.Contents(Daftar Isi) vsSpine Order(Urutan Spine resmi lengkap dengan counter jumlah item).z_cover.xhtml), serta badge penandaNON-LINEARjika bab bersifat non-linear (linear="no").#toc-searchyang otomatis menyaring konten pada kedua tab.toggleToc).Spine 3/15 • ch02.xhtml.Non-lineardi toolbar jika bab yang sedang dibuka bertipe non-linear.🧪 Fixtures & Testing (Automated Test Suite)
unordered-spine:test/fixtures/unordered-spine/dengan berkas bab yang sengaja tidak berurutan secara alfabetis:z_cover.xhtml,m_prologue.xhtml,b_chapter2.xhtml,a_chapter1.xhtml.<spine>berbeda dari urutan manifest dan abjad berkas, serta menandaiz_cover.xhtmldenganlinear="no".test/epub.test.mjsuntuk memverifikasi bahwa parser OPF setia 100% pada urutan<itemref>di<spine>dan mengekstraklinear="no"secara tepat.test/reader-shell.test.mjsuntuk memverifikasi struktur tab switcher, daftar spine item, badge non-linear, dan metadata toolbar spine.