Forum:Better collapsible tables with Ajax functionality

From Old School RuneScape Wiki
Jump to: navigation, search
Forums: Redwood Grove > Better collapsible tables with Ajax functionality
Replacement filing cabinet.svg
This page or section is an archive.
Please do not edit the contents of this page.
This thread was archived on 11 August 2019 by Scuzzy Beta.

The visibility of the collapse parameter on our collapsible tables currently could use a lot of improvement: u4tiiQz.png

Even if the collapsible link is shown on the caption, its visibility is sorta meh: chrome_klkBlLdor4.png chrome_Z1YB2Wsb8s.png

However, I've recently been using a different wiki (Terraria's) that has much better looking collapsible tables imo, and it also only loads them on demand. We already subpage large tables (which would be the candidates for collapsing), so this would just increase the visibility of collapsible tables to users.

Here's how collapsible tables look on the Terraria wiki: bright as hell

And here's the relevant template link on their site:

Possible downsides are that it requires Javascript to run and may not work properly on some mobile devices (according to the Terraria wiki's documentation on their template).

TL;DR - The way the Terraria wiki does collapsible tables looks way better than our current solution. Pls change. Thanks.

Kanga (talk) 00:08, 4 August 2019 (UTC)


Support Ajax - I want it on rs3wiki too thanks Nericat (talk) 00:15, 4 August 2019 (UTC)

Oppose - While this may look nice, this means we're loading entire pages using an AJAX request and putting it inside of a collapsible container. There are drawbacks to doing this compared with just regular transclusions, including increased load if not cached properly, it would become harder to "purge" the content and have it update if we did use said caching (which we would almost definitely want to do to prevent requests from everyone viewing a specific page), compared to how MediaWiki would currently purge caches and send a request to Cloudflare to purge their cache too when the page is updated normally - thus also updating transclusions. We pull content dynamically on certain pages, for example on the RSW's Voice of Seren page, but that is done rarely. Our current collapsible tables and content aren't revolutionary, but I'd rather stick with that than potentially introducing problems. As mentioned also, for something that might not display on some mobiles - with no fallback - it is just simply less than ideal. jayden 00:47, 4 August 2019 (UTC)

Comment - With regards to the mobile thing, the implementation on the other wiki actually just links directly to the subpage if the display fails I think, so it may not be a big deal - specifically, this is the codeblock pertaining to a failed load of the module:
{{{nojs|This table requires JavaScript to be enabled and site tooltips to be turned on to be displayed.<br/>You can also [[{{{target|{{{1|Unknown}}}}}}|view the data]] on another page.}}}
Kanga (talk) 00:54, 4 August 2019 (UTC)
I understand that, but that’s a less ideal scenario than just displaying the content uncollapsed if the browser/device does not support JS. Don’t get me wrong, with anything that is an extra feature which uses JS it’s fair game - but this is a core feature that will impact the readability of pages for users if it doesn’t function properly. We can’t display the (sub)page content if the AJAX request fails, obviously, because we don’t know what it is unless we can grab it with JS. In the case of transclusions, it is added with PHP and thus doesn’t suffer this drawback. If you’d like to propose a better solution for collapsible containers and tables that’s fine, but the actual content within them should not be pulled with JS - there needs to be a form of fallback. jayden 01:02, 4 August 2019 (UTC)
Also to add on - Cook did mention this on Discord - lazy loading page content hidden in collapsible containers would not be good for our SEO at all, as Google’s crawler would not see the hidden page content. At a time where we are trying to improve our search ranking for all pages on the wiki after moving from Wikia, this does not seem like a smart idea jayden 09:37, 4 August 2019 (UTC)

Support - If Terraria's implementation isn't viable for technical reasons there should at least be some sort of exploration into emulating it with our current tools or at the very minimum improving how tables are collapsed. The current way collapsing works leaves many things to be desired and I feel could do with some sort of changes to benefit ease of use for users. Choose OptionTalk-to MitcheII Slayer of Imps (skill: 2,695)    Talk-to MitcheII Slayer of Imps (skill: 2,695) 01:04, 4 August 2019 (UTC)

Oppose - per Jayden. I don't particularly think how terraria wiki does it looks good either. iN008talk 09:50, 4 August 2019 (UTC)

Closed - Ajax table collapsing will not be implemented on this Wiki. Alternate solutions for the visibility of the Show/Collapse button may be discussed off-site. --dDbvitC.png Scuzzy Beta hib8CAd.png 02:18, 11 August 2019 (UTC)