do something about the size of the table of contents
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 245
- Forks
- 80
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 2
Description
In ecma262, the table of contents is 400kb of HTML to represent 76kb of text plus a little structure. We can cut that down.
A lot of the overhead is that every link includes a title attribute which effectively duplicates its contents. That's almost certainly not worth the cost (if not actively harmful).
Another big chunk is the inclusion of classes on many elements which could be matched by broader selectors. For example, all the section numbers in the ToC have <span class="secnum">, which, a) #menu-toc a > span matches exactly those elements, so they don't need to have classes added manually and b) that class doesn't even do anything in this context. That's 30kb by itself.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the ecma262 table-of-contents generation and measuring the emitted HTML, focusing on link title attributes and the manually added secnum classes. Confirm that broader selectors such as #menu-toc a > span still match the intended elements. Done means reducing redundant markup while preserving the table of contents text, structure, links, and styling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100