`docindex`: no way to create a collapsible-only (no target) TOC node; empty links open a directory listing in the web-based Help Browser

Aperta
#38 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
59/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
matlab, xml

Direzione di ricerca

Start by reading resources/helptoc.xsl and trace how docindex turns an empty Markdown link into a tocitem target. Check how the web-based Help Browser handles targetless nodes; the issue notes the Java-based behavior is unverified. Done when a section with children can expand and collapse without opening a directory listing or duplicating the child page’s selection and dropdown indicators.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

In helptoc.md, a section header that should only group child pages is usually written with an empty link:

* [Overview](Overview.md)
  * [Getting Started]()
    * [Setup](Setup.md)

docindex transforms this with resources/helptoc.xsl, which always emits target="{a/@href}":

<tocitem target="Overview.html">Overview
    <tocitem target="">Getting Started
        <tocitem target="Setup.html">Setup</tocitem>

The web-based Help Browser (default from 24b) handle target="" badly: clicking the node navigates to the doc folder itself and shows a directory listing. I think Java-based Help Browser rendered the same node as a collapsible folder, which is the desired behavior, but I haven't been able to verify this.

Current workaround: link each section header to its first child page, e.g.:

* [Overview](Overview.md)
  * [Getting Started](Setup.md)
    * [Setup](Setup.md)

This works by stopping the directory listing, but it has visible side effects in the web-based Help Browser:

  • Double selection highlight: when the page is open, the section header (Getting Started) and its first child (Setup) are both highlighted in blue, because they point to the same target.
  • Extra dropdown on the child: the first child (Setup) now shows an expand/collapse dropdown arrow, as though it had children of its own. It's a leaf page.
  • The header is no longer a pure folder: clicking it opens a page instead of just expanding or collapsing.

See the screenshot below showing this result after the workaround:
Screenshot_AfterWorkaround

Lingua principale
MATLAB
Stelle
10
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mathworks/docmaker

Tutte le issue di mathworks/docmaker

Issue simili

Altre issue su MATLAB

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.