Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove confusing navigation bar from stdlib documentation #10139

Merged
merged 8 commits into from Jan 22, 2021

Conversation

johnwhitington
Copy link
Contributor

Here is a page from the current manual, accessed from index.html --> "The Standard Library" --> "Module bool: boolean values":

https://ocaml.org/releases/4.11/htmlman/libref/Bool.html

It contains a navigation bar, added by ocamldoc when ocaml is built (not when the main manual is built), with "Previous", "Up", and "Next" buttons.

Clicking the "Up" button does not take the user back to the standard library list of modules (from where they have just come), but to an otherwise-unlinked ocamldoc index of modules:

https://ocaml.org/releases/4.11/htmlman/libref/index.html

This is unexpected, and confusing -- the user was browsing the reference manual and is now lost.

This PR simply removes the navbar, and so removes this confusion. In practice, the "Up" button is just the "Back" button in the browser, most of the time. The "Previous" and "Next" buttons are of limited use, since browsing the stdlib module by module is an unusual activity, and can be achieved with the browser back button anyway.

If we want to re-instate "Up", and have it point somewhere sensible (i.e back to the list of stdlib modules in the reference manual), this could be done by the HTML post processor #9755

But I think we should get rid of it.

(This PR also includes two tiny HTML manual related commits which were too small to be separate PRs).

(The change to manual/manual/Makefile removes content which is in fact redundant)

Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -nonavbar option to ocamldoc warrants a Changes entry, along with a note that it's being used (if someone happens to miss it, they may look in Changes to see why)

Comment on lines -7 to -11
OCAMLDOC = $(if $(wildcard $(SRC)/ocamldoc/ocamldoc.opt),\
$(SRC)/ocamldoc/ocamldoc.opt,\
$(SET_LD_PATH) $(SRC)/runtime/ocamlrun $(SRC)/ocamldoc/ocamldoc)\
-hide Stdlib -lib Stdlib -nostdlib \
-pp "$(AWK) -v ocamldoc=true -f $(SRC)/stdlib/expand_module_aliases.awk"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a clean-up following #9996

ocamldoc/odoc_html.ml Outdated Show resolved Hide resolved
ocamldoc/odoc_messages.ml Outdated Show resolved Hide resolved
@johnwhitington
Copy link
Contributor Author

Added Changes twice, with differing wording: once it Tools, to mention ocamldoc, once in Documentation, to mention effect.

@johnwhitington
Copy link
Contributor Author

All changes requested made.

ocamldoc/odoc_misc.ml Outdated Show resolved Hide resolved
Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @Octachron ?

@Octachron
Copy link
Member

This seems fine to me (even if I use the next link during reviews from time to time, this is not exactly a feature for most users). Moreover, this navigation bar is also removed by #9755 .

@johnwhitington
Copy link
Contributor Author

Ok, all done.

@Octachron Octachron merged commit 6ab0da6 into ocaml:trunk Jan 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants