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

オープン
#38 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
59/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
matlab, xml

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
MATLAB
スター
10
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mathworks/docmaker のほかの issue

mathworks/docmaker の issue をすべて見る

似ている issue

MATLAB の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。