Template talk:Stack

(Redirected from Template talk:Stack end/doc)
Latest comment: 5 months ago by Great Brightstar in topic FYI: Breaks mobile display when used with infobox

FYI: Breaks mobile display when used with infobox

edit

I'm not 100% sure of the purpose of this template but the floating that it applies breaks display of the infobox in the mobile site. See phabricator ticket. Would appreciate some help fixing this! Jdlrobson (talk) 18:44, 6 February 2017 (UTC) Jdlrobson (talk) 18:44, 6 February 2017 (UTC)Reply

Jdlrobson, as far as I can tell, the old sandbox version doesn't have the same problem. the new version was introduced by User:Matt Fitzpatrick last year. Frietjes (talk) 16:00, 5 March 2017 (UTC)Reply
TemplateStyles will make this an easy fix. In the meantime, I added .mobile-float-reset to the sandbox version as a stopgap measure, will that be a little less broken? Matt Fitzpatrick (talk) 05:20, 6 March 2017 (UTC)Reply
Matt Fitzpatrick, that looked better on my device, so I went ahead and added it to the main template. someone should probably comment at the phabricator ticket? Frietjes (talk) 15:37, 6 March 2017 (UTC)Reply
This is broken again; see Kliment Voroshilov tank. Hairy Dude (talk) 12:38, 13 May 2023 (UTC)Reply
This is fixed now. -- Great Brightstar (talk) 23:56, 6 June 2024 (UTC)Reply

Articles not using stack

edit

I'm seeing lots of articles e.g. Jörg Müller which use the syntax

{| style="float:right; background:transparent;"

or similar. Other examples are Violet_(color), Addiction and Princess Ayako of Takamado. It seems these can all be switched to use the stack template. Doing that would make all our infoboxes render consistently - either as a top level element or an element wrapped inside a mw-stack element. This is important as it allows mobile sites to identify the infobox correctly and either collapse them (as they do on apps) or reposition them to improve the time a reader can read our content (As we do on mobile web). Is there a bot we can use or any reasons we would not do this? Jdlrobson (talk)

Jdlrobson, yes we should fix them. if we can find them (search 1), we can fix them. it seems like you have a way to generate a list. Frietjes (talk) 17:24, 18 January 2018 (UTC)Reply
I've generated a list here: User:Jdlrobson/List_of_pages_not_using_stack_template. The script I have is based on pages being rendered/edited, so I'll have to add to it as I find new examples. It's not a comprehensive list! If you want you can track edits to that page - I'll update it as I review the logs. Jdlrobson (talk) 22:18, 18 January 2018 (UTC)Reply
Jdlrobson, I fixed some of them, and I will watch the page. some of them seem to be false positives, or there is a deeper issue (e.g., Diakofto–Kalavryta Railway, where we really need to split the infobox from the route diagram). there are also repeated entries in the list. Frietjes (talk) 23:30, 18 January 2018 (UTC)Reply
interesting... Is that a navbox or an infobox? (It looks like a navbox but is not tagged as such but equally could be an infobox:))) wouldn't a stack template have the same effect of keeping them separate but stacked? I'll keep out repeated versions in follow up edits. Sorry about that!! Jdlrobson (talk) 06:37, 19 January 2018 (UTC)Reply
Jdlrobson, not exactly sure what is going on there, but I will sort it out soon. also, there appears to be matches from the copyvio banner like in Richard Enraght? fyi, I have now completed a first pass through all the articles in your list and fixed about 90 percent. the ones that haven't been fixed are the ones with the strange route-map infobox and the copyvio banners. another type with an unclear fix are seen in List of Big Ten Conference football standings (1959–present) and p38 mitogen-activated protein kinases. ping me when you have an updated list. Frietjes (talk) 20:05, 19 January 2018 (UTC)Reply
I'm seeing lots of improvement here! Thank you so much! My logs show 10 complaints per hour. Considering those complaints were almost 1000 only a week ago this seems like a huge win. :) On a more general note, it seems like a tool for identifying inconsistencies and known problems in templates and page layout would be very helpful for making our content more mobile friendly and parse-able. Jdlrobson (talk) 16:45, 22 January 2018 (UTC)Reply

Margins

edit

When left/right stacking elements that don't have a margin, it may be advantageous to add a right/left margin of the same size used by other floating objects (typically 1em). I have implemented this feature with |margin=y or |margin=1 or |margin=true. please let me know if this broke something. Frietjes (talk) 17:15, 14 July 2020 (UTC)Reply

Dropping mobile-float-reset class

edit

The template currently used mobile-float-reset class for mobile view, however I think apply the similar style for stack-container is enough, so I removed the mobile-float-reset class and made new implementation in the template sandbox. -- Great Brightstar (talk) 18:03, 8 September 2020 (UTC)Reply

Please confirm what possible changes (if any) this will make to the output of the template? — Martin (MSGJ · talk) 12:09, 11 September 2020 (UTC)Reply
Yes, I confirmed, this change removed the mobile-float-reset class, and the relevant CSS properties were transferred to stack-container class, but doesn't change the visual appearance on mobile view, i.e. no regression will happen. -- Great Brightstar (talk) 12:35, 11 September 2020 (UTC)Reply
  Done please confirm I have done this correctly. It wasn't a simple of case of copying from the sandboxes because you had left various sandbox links in. — Martin (MSGJ · talk) 13:14, 11 September 2020 (UTC) — Martin (MSGJ · talk) 13:14, 11 September 2020 (UTC)Reply
Yes, that's good. Thanks. -- Great Brightstar (talk) 01:05, 12 September 2020 (UTC)Reply

Bug

edit

Hi - can someone respond as to why this template isn't working on mobile versions of Wikipedia? See the maps at Chicago and Columbus, Ohio, for instance. This display issue is a major barrier to mapframe implementation on city articles. ɱ (talk) 17:13, 14 July 2021 (UTC)Reply

Template-protected edit request on 10 October 2021

edit

Hey, there. A small grammatical change request. I noticed, that in the Floating portal boxes subsection in the penultimate paragraph, 3rd line, it says: "their" instead of "they are". Could you, please, make the suggested change? Thanks. Qwerty284651 (talk) 18:04, 10 October 2021 (UTC)Reply

  Not done: According to the page's protection level you should be able to edit the page yourself. If you seem to be unable to, please reopen the request with further details. – Jonesey95 (talk) 18:48, 10 October 2021 (UTC)Reply
Okay, got it. Had to look for the stack documentation template to correct the text. Thanks for the advice. Qwerty284651 (talk) 12:46, 12 October 2021 (UTC)Reply

Request to update Template:Stack begin

edit

This template should be update to adapt recent changes on Template:Stack/styles.css, also follow Template:Stack, the source code can be copied from here:

<templatestyles src="Stack/styles.css"/><div class="stack {{#switch:{{{float|right}}}|left=stack-{{#switch:{{{margin|}}}|1|true|y|yes=margin-}}{{#switch:{{{clear|}}}|left|true=clear-}}left|right=stack-{{#switch:{{{margin|}}}|1|true|y|yes=margin-}}{{#switch:{{{clear|}}}|right|true=clear-}}right}}"><!--
--><div {{#if:{{{cellspacing|}}}|style="margin: {{{cellspacing}}}px"}}><!--
-->{{#invoke:Check for unknown parameters|check|unknown=[[Category:Pages using stack with unknown parameters|_VALUE_{{PAGENAME}}]]|preview=Page using [[Template:Stack begin]] with unknown parameter "_VALUE_"|ignoreblank=y| cellspacing | clear | float | margin }}<noinclude>
{{stack end}}
{{documentation}}
</noinclude>

-- Great Brightstar (talk) 19:58, 19 February 2023 (UTC)Reply

The only change I can see is mw-stack stack-container replaced with stack. Is that correct? — Martin (MSGJ · talk) 14:41, 22 February 2023 (UTC)Reply
Yes. After the last commit Template:Stack got simpler structure, but the editor missed Template:Stack begin, so these two templates having inconsistent behaviors from then on. This will fix that. -- Great Brightstar (talk) 16:16, 22 February 2023 (UTC)Reply
  Done — Martin (MSGJ · talk) 16:55, 23 February 2023 (UTC)Reply

Request to add a missing class

edit

I found {{stack}} has two classes stack and mw-stack, the latter is missing in {{stack begin}}. I hope the missing class would be added soon. -- Great Brightstar (talk) 14:49, 6 June 2024 (UTC)Reply

With this fix it's possible to fix a problem that break content layout on mobile view, which looks as this. -- Great Brightstar (talk) 15:23, 6 June 2024 (UTC)Reply
Also compare to Simple English Wikipedia here. -- Great Brightstar (talk) 15:53, 6 June 2024 (UTC)Reply
  Done. SilverLocust 💬 17:40, 6 June 2024 (UTC)Reply