Last modified: 2014-08-14 22:29:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47951, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45951 - Add button to "expand all" sections of a page (Mobile view)
Add button to "expand all" sections of a page (Mobile view)
Status: ASSIGNED
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
Smartphone other
: Low enhancement
: ---
Assigned To: Nobody - You can work on this!
: design, mobile
: 49202 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-10 08:17 UTC by Bert
Modified: 2014-08-14 22:29 UTC (History)
12 users (show)

See Also:
Web browser: Apple Safari
Mobile Platform: iOS 6.x
Assignee Huggle Beta Tester: ---


Attachments

Description Bert 2013-03-10 08:17:28 UTC
On a smartphone, when viewing a Wikipedia page (Mobile view), add a "Expand all" button at the top of the page which expands all sections of the page.

This will allow an easy text search through the entire page, which is especially useful on a mobile device when trying to navigate to relevant parts of a page. 

Note: this can be achieved by switching to Desktop view, but that means loosing the mobile view and it's more friendly formatting.
Comment 1 Bert 2013-03-10 08:25:20 UTC
Note: currently, sections have to be expanded manually one by one before a text search can be performed throughout the page
Comment 2 Jon 2013-04-09 21:16:39 UTC
This is an interesting suggestion. I'd worry about a button at the top of the page however. I wonder if any of the design team can provide some input on how a user might be able to open all sections easily but not in a way that intrudes on users who have no need for it.

I'm pretty sure in javascript we could detect a blur event on the window object and toggle open sections.

$( window ).on( 'blur', function(){ $('h2').click(); } )
Comment 3 Pragun Bhutani 2013-04-18 14:42:54 UTC
What is the status of this bug as of now? Do we have any more information as to how we want this 'button' to be included?
Comment 4 Jon 2013-04-18 16:20:19 UTC
It's an enhancement so it requires discussion/interest which there seems to have been none of yet (if it exists it should be on this bug report). It's also not necessarily the best solution to the problem of allowing 'find on this page' to work so we should at least consider several other solutions.
Comment 5 Jon 2013-06-05 18:25:35 UTC
*** Bug 49202 has been marked as a duplicate of this bug. ***
Comment 6 Jon 2013-06-05 18:27:55 UTC
Another way to look at this bug is to determine when a user has come from a search engine and in that situation toggle open all sections or even better toggle the section that contains the content and goes to it.

Note google already allows you to jump directly to the section that it found the content (Jump to Climate – San Francisco's climate is characteristic of the cool-summer Mediterranean climate of California's coast, "generally characterized by ...)
Comment 7 dr0ptp4kt 2013-06-05 18:52:28 UTC
It seems that Google provides the Jump to <section> link if the search terms match neatly, after reducing the section title word/phrase down (e.g., de-pluralizing). So, for example, a search for _giraffe subspecies_ will yield a Jump to Subspecies hyperlink, but _giraffe genetics_ won't yield a similar Jump to link. Maybe the trick would be to see if there are no matching sections for the Referer and in that case, if the canonicalized text (e.g., _genetics_ or failing that _giraffe genetics__ which incidentally contains the article title) is present, land the user in the appropriate section?

As a user I would like both the option to Expand All/Collapse All and to be landed in the appropriate section from search for the case where an #anchor isn't already in the document.location. For the former, it's nice to be able to use Find in Page in the case an idea strikes me while and I want to see if there's page text that matches what I'm looking for. For the latter, ending up at the place I intended is really slick.
Comment 8 Jon 2013-06-05 19:53:21 UTC
As pointed out above this is all possible it just needs some design thought. Could we somehow incorporate a in page search into the existing search bar?

It seems right now the main motivation for an expand all / collapse all is to do a find on page operation. Now if we could only bind an event to the find on page browser function ... :( [1]

I found this post on usability issues with collapsed sections in general [2]

[1] http://stackoverflow.com/questions/6680213/is-there-a-way-to-detect-find-on-the-page-searches-in-javascript
[2] http://idratherbewriting.com/2013/03/25/evaluating-the-usability-of-collapsible-sections-or-jquerys-content-toggle/
Comment 9 dr0ptp4kt 2013-06-05 23:23:46 UTC
Ah, that's a neat idea. The other options may work nicely with this feature, or this feature may be good enough (dev time at a premium, so it's not like all of it can necessarily be built). I think maybe if the <input> area has something like "Search Wikipedia and *NEW!* this page" may do it in time, once users become familiar with it (probably after their first few searches). I wonder if differently shaded snippets plus "...[in this article]" for current page search hits would make sense. Clicks on the searched items could be captured to an event log to see the percentage of same article versus different article clicks.
Comment 10 Juliusz Gonera 2013-06-11 00:40:29 UTC
When I talked to a few people annoyed by collapsed sections, they did not mention find on page specifically. I assume, some people just might want them unfolded all the time. Possibly we could have an option in Settings for this in future.
Comment 11 Jon 2013-07-24 18:48:07 UTC
This is still a commonly requested feature.

Seems to be several ways to surface unfolding all sections:
* a button somewhere in the page
* a link (view this page with all sections open)
* a gesture (e.g. shake) that opens them all
* a setting in the user preferences/ site settings
* learning based on behaviour (if a user opens 3 sections in a given period of time open them all)

We should collect some data on this.
Comment 12 Ryan Kaldari 2013-07-25 17:59:50 UTC
Adding a button/link to every page would be UI cruft (especially since doing a full page search on mobile is an edge case). The idea of having a user preference to always expand all sections seems like a good idea though.
Comment 13 Ryan Kaldari 2013-07-25 18:23:50 UTC
The UI implementation in change Ib5ab3af7 isn't bad. For the functional implementation, it should probably be done in Javascript rather than on the PHP side, so we don't have more cache fragmentation.
Comment 14 dr0ptp4kt 2013-07-25 19:01:33 UTC
Is the user option going to make a "[ + ]" (toggles to "[ - ]") button _available_, or is it going to autoexpand every section every time? I can see the pros and cons of either approach, I guess, although I like the concept of the preference being labeled "Show expand/collapse button".
Comment 15 Jon 2013-07-25 20:25:15 UTC
You could also make a case for opening all sections by default.

Would be good to analyse section toggling a bit more to see what is the preferred desired behaviour.
Comment 16 Alexander Lippert 2013-10-27 08:59:48 UTC
It took me a while to find this bug: I STRONGLY support this feature as full page search on mobile is a very common case for me, and "expand all" with help of the brower's "find in page" function seems like a simple solution. I'd actually prefer the "expand all" button on the top of an article, but I would be happy with a setting as well that automatically expands all articles for me. -- Any ETA?

Thank you so much for your hard work!
Comment 17 Gerrit Notification Bot 2013-12-28 04:53:19 UTC
Change 74922 had a related patch set uploaded by Pcc:
Add an "always expand all sections" option

https://gerrit.wikimedia.org/r/74922
Comment 18 Gerrit Notification Bot 2014-01-13 19:06:29 UTC
Change 74922 merged by jenkins-bot:
Add an "always expand all sections" option

https://gerrit.wikimedia.org/r/74922
Comment 19 Jon 2014-01-22 18:58:22 UTC
This is now in alpha so we can play with this and make a decision on whether this is the right kind of solution.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links