Page MenuHomePhabricator

Do not use nested tables for displaying JSON data in MediaWiki:*.json pages (because mobile resolutions)
Open, LowPublic

Description

Currently MediaWiki:*.json pages use nested tables to display the JSON data.

Nested tables are generally evil - low accessibility, longer code, longer render time, bigger RAM consumption, more difficult DOM/XPath/CSS selector addressing etc. etc...

Use more reasonable representation, for instance something like (my favourite) jQuery Based Pretty Collapsible JSON Tree Viewer (demo). It's an idea how it should look, the script itself would need to be modified, since we need the page to display the JSON data even without JS (like static <ul> in this particular example).

Developer notes

Test URL: https://meta.wikimedia.org/w/index.php?title=Schema:NavigationTiming&oldid=21012083&

Event Timeline

Danny_B raised the priority of this task from to Needs Triage.
Danny_B updated the task description. (Show Details)
Danny_B added subscribers: Danny_B, Krinkle.
jhobs set Security to None.
Aklapper renamed this task from Use more reasonable displaying of JSON data in MediaWiki:*.json pages than nested tables to Do not use nested tables for displaying JSON data in MediaWiki:*.json pages (because mobile resolutions).Jul 24 2021, 2:13 PM
Aklapper edited projects, added Mobile; removed JavaScript.

This product is not really in the scope of the readers web team but given the lack of attention and how it impacts desktop improvements, we're willing to consider it in future alongside other planned mobile fixes. A HTML/CSS only patch that improves the mobile experience by removing nested tables will be considered.

We do not wish to be involved in any plans to add a JavaScript library at this point.

In mobile, it has horizontal scrolling:

Screen Shot 2021-07-26 at 3.06.24 PM.png (1×846 px, 127 KB)

In desktop it spills out the page:

Screen Shot 2021-07-26 at 3.07.40 PM.png (1×736 px, 102 KB)