Ticket #177 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Remember collapsed sections in index.html / haddock-util.js

Reported by: liyang Owned by:
Priority: minor Milestone:
Version: 2.9.2 Keywords:
Cc: haskell.org@…

Description

This is an itch that's been scratching me for a while now. I open up the index.html for base and other packages in the Firefox sidebar for easy access, but every time I switch between packages, it forgets which sections I've collapsed. This is particularly problematic with base, which has quite a few large hierarchies that I don't really use, e.g. Distribution.*.

This patch to haddock-util.js remembers which sections have been collapsed in a cookie, and restores them on the next load. It works correctly even when the docs for multiple packages are hosted at the same domain. (Doesn't set path=/ for the cookie.) Every section is expanded by default when viewed for the first time, in line with existing behaviour.

Cheers, /Liyang

Attachments

persistent-collapsed.darcs (5.7 kB) - added by liyang 3 years ago.

Change History

Changed 3 years ago by liyang

Changed 3 years ago by liyang

  • cc haskell.org@… added

Changed 3 years ago by waern

  • status changed from new to closed
  • resolution set to fixed

Patch applied. Thanks!

Changed 2 years ago by anonymous

  • milestone 2.10.0 deleted

Milestone 2.10.0 deleted

Note: See TracTickets for help on using tickets.