Directory listings should extract <title> and summaries from documentation comments like MXR

RESOLVED FIXED

Status

Webtools
DXR
RESOLVED FIXED
3 years ago
a year ago

People

(Reporter: MattN, Assigned: new_one)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(firefox40 affected)

Details

(Whiteboard: mxr-parity, URL)

Attachments

(1 attachment)

MXR extracts metadata about files to display in the "description" column of directory listings to provide more information about a file. This is useful especially for test files to figure out which file one should add a test case to since people try to keep file names shorter and there was a bad habit of file names like "test_bug798843_pref.html". That name isn't useful for skimming initially but the description shown in MXR helps a lot: "Test that SVG glyph context-* values can be pref'ed off"

Off hand I think that MXR extracts from <title> and from doc-comments.
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1177125
(Assignee)

Comment 2

2 years ago
Useful information from bug 1177125:

"For directories that contain a file called README/README.txt the description is taken from the first non-empty line in that file.

For files that begin with a Doxygen style comment the description is taken from the first line of that comment."
(Assignee)

Comment 3

2 years ago
Digging deeper, it looks like MXR's implementation is governed by two routines.
fdescexpand (https://mxr.mozilla.org/webtools-central/source/mxr/Local.pm#27) pulls descriptions out of files.

descexpand (https://mxr.mozilla.org/webtools-central/source/mxr/Local.pm#251) describes folders in listings.
(Assignee)

Comment 4

2 years ago
Created attachment 8761677 [details] [review]
pull #561

https://github.com/mozilla/dxr/pull/561
Assignee: nobody → peter.elmers
(Assignee)

Updated

2 years ago
Status: NEW → ASSIGNED

Comment 5

a year ago
Commit pushed to master at https://github.com/mozilla/dxr

https://github.com/mozilla/dxr/commit/adc8428520efe88e4385f5a426fb3c272916387b
Add a descriptor plugin that emulates MXR's descriptor column.

Also add some framework for plugins to supply needles on folders and
adding headers to the browsing view.

Fixes bug 1157968.

Updated

a year ago
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.