Forum:Better collapsible tables with Ajax functionality
The visibility of the collapse parameter on our collapsible tables currently could use a lot of improvement:
Even if the collapsible link is shown on the caption, its visibility is sorta meh: https://cdn.discordapp.com/attachments/269673599554551808/607360019217907738/chrome_klkBlLdor4.png https://cdn.discordapp.com/attachments/269673599554551808/607360027153530890/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: https://terraria.gamepedia.com/Template:Ajax
TL;DR - The way the Terraria wiki does collapsible tables looks way better than our current solution. Pls change. Thanks.
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.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:
- 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. 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 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.01:04, 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. -- 02:18, 11 August 2019 (UTC)