Page MenuHomePhabricator

Show/hide memory in Wikipedia Mobile
Closed, ResolvedPublic

Description

Author: malrase

Description:
People are saying that they hit "show", follow a link in that paragraph, then when they hit "back", the subcategory is hidden. Is there a way to use cookies or whatever to remember which subcategories were open?


Version: unspecified
Severity: enhancement

Details

Reference
bz20053

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:49 PM
bzimport set Reference to bz20053.
bzimport added a subscriber: Unknown Object (MLST).

philinje wrote:

Sounds potentially problematic across platforms, but a good general principle of usability. Should be incorporated in a basic way, even if it doesn't work across devices and browsers.

The hash could be used here to maintain which categories are open.

e.g. if the hash was #Cat_1 Cat_2
this would mean category 1 and 2 (the div's with id cat_1 and cat_2) were open.

The browsers history would then take care of things when you hit back.
The current code does this but only supports one open category - taking the entire hash as the category element id.

Created attachment 10005
A suggested implementation for maintaining state of open/closed sections that respect browser navigation

Note that this will not work on legacy browsers where the Array prototype does not support the indexOf function.

Attached: