Template talk:Talk quote block
Template:Talk quote block is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Edit of 30 May 2012
editI believe that this edit broke the template, see WT:N#Proposal to remove "and list" from a sentence in the lede of WP:N, which has two examples where the background has been reduced to a single line, and the text is now pushed down onto the second line without a background color. Unscintillating (talk) 00:31, 31 May 2012 (UTC)
- I have reverted my previous edit. Both edits discussed at Wikipedia:Village pump (technical)#Two paragraphs in wikitext rendered as one. The wikitext parser gets confused when the closing blockquote tag does not start on a new line if the template is called with a wikilist (and no final newline) in the calling parameter. — Richardguk (talk) 01:37, 31 May 2012 (UTC)
oldid/newid
editIs it possible to accommodate a diff with both oldid
and newid
parameters for instances where an editor posts a comment and then makes corrections/edits to their comment, so that the link can show the final version was posted by the quoted user? Currently, there's only provision for the oldid
so you have to choose between specifying the first edit (which does not reflect the final version that the editor intended) or the last one (which only shows the last edit marked up). —sroc 💬 02:36, 27 February 2014 (UTC)
- Well, it is possible to use the
diff=
parameter to give the URL of a diff, so you can to link to any diff you like. For example: The timestamp links to a diff that includes both your comment and a post from an earlier commenter on this page. 02:36, 27 February 2014 (UTC)
- Here's the code:
{{talkquote|...|ts=02:36, 27 February 2014 (UTC)|diff=//en.wikipedia.org/w/index.php?title=Template_talk:Talkquote&diff=597315913&oldid=495219808}}
– PartTimeGnome (talk | contribs) 22:15, 27 February 2014 (UTC)- Perfect. Thanks! —sroc 💬 15:11, 7 March 2014 (UTC)
RfC: Change the TQ template font colour
editThere is an RfC at Template talk:Tq#RfC: Change the TQ template font colour proposing the change the formatting of both {{tq}} and {{talkquote}} to unify their format/colours and distinguish from the colour of the {{xt}} template. Comments would be most welcome there. —sroc 💬 18:42, 15 April 2014 (UTC)
Contents
editAm I doing something wrong here? For some reason the contents box is recognizing my talkquote sections as headings in the page itself. But it only does it for the first talkquote and not the second. I'm confused.
Also, while I'm already here. Is there a reason spans nuke a talkquote? Is there additional markup needed to use a span within a talkquote? TimothyJosephWood 14:57, 17 April 2016 (UTC)
Play nice with ordered and unordered lists
editLorem ipsum
Is there a way to get this template to function when used at the beginning of a list item? For instance * {{talkquote|Lorem ipsum}}
will turn the bullet (or number) into a regular indent, rather than showing the bullet/number. It's fine if you put something between the bullet and template, but it'd be nice if it didn't need the hack. czar 23:05, 6 February 2017 (UTC)
- @Czar: As you can see by your own example above, this is now fixed. (It was fixed some time ago, I'm not sure exactly when.) Lists now play nicely with the
{{tq}}
templates, or vice versa. You can even colon-indent them on Talk pages, now!- 👏👏👏 Thanks! czar 20:11, 20 July 2019 (UTC)
Color
editIt'd be nice to have a few different color options—say blue/red/yellow—in lieu of just the green when comparing quotes czar 22:24, 9 June 2017 (UTC)
Requested move 16 January 2018
edit- The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review. No further edits should be made to this section.
The result of the move request was: Moved. No opposition and it has been relisted. (non-admin closure) –Ammarpad (talk) 13:06, 31 January 2018 (UTC)
— Rationale: I have never once remembered which of these templates is the block and which is inline. Moving the templates (and keeping the redirects) would make it easier for editors to save those extra few seconds of brainpower without adversely affecting editors with a better memory than mine.
Note: If this gains consensus, I would anticipate that
- {{talkquote}} and its aliases {{talk quote}} and {{tq2}} would be updated to point directly to Template:Talk quote block
- {{talk quotation}} and its aliases {{tq}} and {{tqi}} would be updated to point directly to Template:Talk quote inline
- The navbox {{Quotation templates}} would be updated to refer to the new names
— OwenBlacker (talk; please {{ping}} me in replies) 18:38, 16 January 2018 (UTC)--Relisting. samee talk 19:21, 23 January 2018 (UTC)
- Support This drives me nuts, too. — SMcCandlish ☏ ¢ 😼 19:10, 19 January 2018 (UTC)
- Support as per nom. Definitely clearer than the status quo; and the short versions ({{tq}}) aren't changed. power~enwiki (π, ν) 21:17, 24 January 2018 (UTC)
- SUPPORT – It's a little thing, but it's so annoying. 142.161.81.20 (talk) 08:05, 29 January 2018 (UTC)
- Support Don't generally get them confused (using aliases of tq and tq2 only), but it is still confusing as hell. Galobtter (pingó mió) 06:34, 31 January 2018 (UTC)
Documentation updated
editI noticed that Template:Talk quote inline/doc had been updated to reflect the new canonical name ({{Talk quote inline}}), but Template:Talk quote block/doc had not, and still referred to the template as {{talkquote}}. Should be all fixed up now. -- FeRDNYC (talk) 06:36, 18 October 2018 (UTC)
Colors don't preview in Visual Editor
editI noticed that when this template is used with the Visual Editor (even in wikitext source mode), the background coloring doesn't show up in the "Show preview" rendering. Presumably this is due to the use of Template Styles, specifically Template:Talk quote block/styles.css. Regardless the reason, it's still fairly disconcerting. Is there any way we could get the styles to be applied correctly in the preview? -- FeRDNYC (talk) 06:49, 18 October 2018 (UTC)
Quoted URLs with query strings break the template
editI'm having trouble quoting URLs that contain query strings, like: http://example.com/over/there?name=ferret
This is particularly a problem when quoting Wikipedia diff URLs, like: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977
For example, this:
{{tq2|
This here article: https://en.wikipedia.org/wiki/1927_Chicago_mayoral_election
}}
Shows up ok as:
This here article: https://en.wikipedia.org/wiki/1927_Chicago_mayoral_election
While this:
{{tq2|
This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977
}}
Doesn't display at all:
The same goes if I use square brackets for the URLs. Am I doing something wrong? As a workaround, I used:
{{tq2|
This here diff: [[Special:Diff/904785977/904787385|https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977]]
}}
Which displays ok, though it's inconvenient and looks different (doesn't have the external link pointer):
This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977
Can this be fixed? --IamNotU (talk) 15:12, 4 July 2019 (UTC)
- @IamNotU: When your template arguments contain an equals sign, you can't use implicit positional parameters because everything preceding the first equals sign gets parsed as the parameter name. The trick, in those situations, is to make the assignment explicit, so that your entire argument is unambiguously parsed as the value being assigned to that parameter. IOW:
{{tq2|1=This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977 }}
This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977
- Writing the transclusion as
{{tq2|1=...}}
puts the entire URL on the right-hand side of an assignment to the first unnamed parameter, rather than it being parsed as a template parameter namedThis here diff: https://en.wikipedia.org/w/index.php?title
that's being assigned the valueUser:IamNotU/sandbox&diff=904787385&oldid=904785977
-- FeRDNYC (talk) 16:25, 5 July 2019 (UTC)
- FeRDNYC, that makes sense, thanks for the tip! --IamNotU (talk) 13:50, 6 July 2019 (UTC)
Background color
editIt would useful if the background color could be set for this template. I see that one other editor has brought this up before (Czar) Does anyone have any objections to adding such a parameter? If not, I would like to submit an edit request. - MrX 🖋 17:38, 12 April 2020 (UTC)
Template-protected edit request on 13 June 2020
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Overhaul
edit<includeonly><templatestyles src="Talk quote block/styles.css"/><!--
--><blockquote class="talkquote"<!--
---->{{#if:{{{style|}}}|<!-- In-line style handling.
------> style={{{style}}}<!--
---->}}><!--
---->{{{text|{{{1|<p><br/></p>}}}}}}<!-- Quoted text.
Attribution:
---->{{#if:{{{by|{{{2|}}}}}}|<!--
---- [Clause 0] User:
------><br/><span class="talkquote-by">— [[User:{{{by|{{{2}}}}}}]]</span><!-- User name.
------>{{#if:{{{ts|}}}|<!-- Timestamp.
--------> <small><!--
-------->{{#if:{{{oldid|}}}|<!-- Revision to display. (as the main document)
------ [Clause 1] Linked Timestamp:
---------->[[Special:Diff<!--
---------->{{#if:{{{diff|}}}|<!-- Revision to compare, explicit.
------------>/{{{diff}}}<!--
---------->}}/{{{oldid}}}|{{{ts}}}]]|<!--
------ [Clause 1] Unlinked Timestamp:
---------->{{{ts}}}<!--
-------->}}</small><!--
------>}}|<!--
---- [Clause 0] Source:
------>{{#if:{{{source|}}}|<!--
--------><br/><span class="talkquote-source">— {{{source}}}</span><!--
------>}}<!--
---->}}<!--
--></blockquote></includeonly><noinclude>
<blockquote class="talkquote">
{{lorem ipsum}}<br/>
<span class="talkquote-by">— [[User:Example User]]</span> <small>[[Special:Diff/{{REVISIONID}}|{{#time:H:i, j F Y|{{REVISIONTIMESTAMP}}}} (UTC)]]</small>
</blockquote>
{{Documentation}}
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
</noinclude>
- Revised logic. (see the testcases)
- Enhanced capability. (
diff
,style
) - And a bit more to come. (if granted permission)
— Wikipedian Right (talk) 21:12, 13 June 2020 (UTC)
- Not done (yet). Please take a look at the testcases page and adjust the sandbox appropriately. If you are proposing new functionality, add more test cases to the testcases page. – Jonesey95 (talk) 21:30, 13 June 2020 (UTC)
Getting this template to function decently
editI was trying to get this template to function just now in a situation where I wanted the first line to be text, the next to be a bullet, and all of it to be indented. After playing around with it for several minutes and reading through a bunch of the documentation here (again, as I've encountered trouble frequently, as I'm sure many Wikipedians have), I gave up and just left out the indentation. This is a pretty absurd situation – to be useful, this template needs to actually work as expected, not break anytime you try to indent it or use a list item unless you fiddle with it to get it formatted in a special way. Is there really no way to do that? I see Wikipedian Right proposed some changes above — would those do anything to help? {{u|Sdkb}} talk 05:31, 24 July 2020 (UTC)
Emphasis added and the like
editSometimes you just want to put something after the timestamp like {{ea}}. Should that feature be added here? –MJL ‐Talk‐☖ 20:52, 27 February 2021 (UTC)
Reflist
editIs there a way to make {{reflist}} work inside this template as with {{quote frame}} (see example below)? It seems to break indentation when used like this (example diff).
Thanks. --Sangdeboeuf (talk) 23:16, 18 October 2021 (UTC) edited 18:54, 24 August 2022 (UTC)
"Talkquote" listed at Redirects for discussion
editAn editor has identified a potential problem with the redirect Talkquote and has thus listed it for discussion. This discussion will occur at Wikipedia:Redirects for discussion/Log/2022 March 13#Talkquote until a consensus is reached, and readers of this page are welcome to contribute to the discussion. Veverve (talk) 10:07, 13 March 2022 (UTC)
Template-protected edit request on 23 August 2022
editThis edit request to Template:Talk quote block/styles.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could the italics please be removed from the "talkquote-source" style in the CSS? It seems like an odd deviation. And it's preventing me from using the field to cite the book from which I'm quoting. Thanks, Graham (talk) 03:55, 23 August 2022 (UTC)
- Don't understand. Clue me in editor Graham – if you are quoting from a book, shouldn't its title be italicized? as in Grimms' Fairy Tales? P.I. Ellsworth , ed. put'r there 04:53, 23 August 2022 (UTC)
- (edit conflict) @Paine Ellsworth: The title should be italicized, but to cite a book you would at least have to include the author's name, and preferably also the publisher, year of publication, and page number (or section/paragraph/folio/etc. number, depending on the work). Graham (talk) 05:01, 23 August 2022 (UTC)
...man evolved on the African continent from carnivorous, predatory ancestors who distinguished themselves from apes by the use of weapons.
— African Genesis- To editor Graham: what I wonder is why the italics style has been used since the css style subpage was created in July 2018? Could it be that only titles that are italicized are supposed to be used in the
|source=
parameter? Also, what widespread effects might a change like this have? P.I. Ellsworth , ed. put'r there 05:57, 23 August 2022 (UTC)- (edit conflict) My guess is the parameter was originally created with the intention of being used solely for pages on Wikipedia (policies, guidelines, maybe articles) and the italics were intended to be decorative. I don't think the parameter was originally intended for the title of a book because how often does one quote a book without even including the author's name?
- But this decoration renders the template unusable for anything else (without hackily using {{no italics}}, I suppose, which most of the template's users probably wouldn't think to do).
- Here's an example of what I was trying to do:
Graham (talk) 06:17, 23 August 2022 (UTC)The "childfree" (as they now styled themselves) viewed parenting as an all-or-nothing proposition. They defined parenting as a zero-sum game, only available by giving up on something else, and that something else was almost always called "freedom." Having children, they reported, would come at the cost of just about everything they cared about: a job, a good marriage, financial solvency, even competence. ...
Furthermore, American child-free advocates began to argue that childlessness was not only an acceptable path but also a better choice than parenthood.
— Rachel Chrastil, How to Be Childless: A History and Philosophy of Life Without Children (New York: Oxford University Press, 2020), p. 75 - Re the addition to your reply (
Also, what widespread effects might a change like this have?
): I had thought about that, and I can't conceive of any effects beyond the obvious (i.e., that where a quotation would have previously ended with "— Wikipedia:Verifiability", it will now read "— Wikipedia:Verifiability"). Graham (talk) 06:24, 23 August 2022 (UTC)- Seems harmless enough. Shall cede the final word to editor Izno, who created {{Talk quote block/styles.css}} back in 2018. P.I. Ellsworth , ed. put'r there 06:32, 23 August 2022 (UTC)
- The italics of interest have been present since the parameter was introduced in 2012. I simply transferred them to the TemplateStyles. Izno (talk) 17:45, 23 August 2022 (UTC)
- Seems harmless enough. Shall cede the final word to editor Izno, who created {{Talk quote block/styles.css}} back in 2018. P.I. Ellsworth , ed. put'r there 06:32, 23 August 2022 (UTC)
- (edit conflict) @Paine Ellsworth: The title should be italicized, but to cite a book you would at least have to include the author's name, and preferably also the publisher, year of publication, and page number (or section/paragraph/folio/etc. number, depending on the work). Graham (talk) 05:01, 23 August 2022 (UTC)
- @Graham: If quoting an external source such as a book, in a talk page discussion, it may be more appropriate to just use
<blockquote>
and provide a citation externally. The "talk quote" formatting templates seems as though they were intended to style internal quotes, in the manner of a "quoted reply" in email or a forum discussion. (Hence the colored border line on the left edge of the quoted block, commonly associated with quoted text in email threads.) The attribution styling is just that, attribution to the source (wikilink to a user or policy page), not really a citation per se. FeRDNYC (talk) 07:07, 23 August 2022 (UTC)The "talk quote" formatting templates seems as though they were intended to style internal quotes
Which is why the existence of this parameter in this template confuses me personally, since I got pinged above. It is more or less outside the scope I perceive also. Izno (talk) 17:46, 23 August 2022 (UTC)
- Then since we have an editor, Graham, who would like to off the italics, we can try that and see if it brings more input.
- Done. P.I. Ellsworth , ed. put'r there 22:03, 23 August 2022 (UTC)
- Thanks, Paine Ellsworth! Graham (talk) 02:06, 24 August 2022 (UTC)
- my pleasure! Paine 04:39, 24 August 2022 (UTC)
- Thanks also. This was a good change. This idea of italicizing entire blocks of attribution data is some nonsense that WHATWG came up with, and it makes no sense to anyone but them. — SMcCandlish ☏ ¢ 😼 03:37, 4 July 2023 (UTC)
Happy to help!Happy to help! Paine 05:30, 4 July 2023 (UTC)
- Thanks also. This was a good change. This idea of italicizing entire blocks of attribution data is some nonsense that WHATWG came up with, and it makes no sense to anyone but them. — SMcCandlish ☏ ¢ 😼 03:37, 4 July 2023 (UTC)
- my pleasure! Paine 04:39, 24 August 2022 (UTC)
- Thanks, Paine Ellsworth! Graham (talk) 02:06, 24 August 2022 (UTC)
Comment links support
editNow that there are comment links (they work in enwiki already, but timestamps are not linked yet, but will be soon I suppose), we can make a link from the timestamp to the comment in this template. I suggest to add an |id=
parameter for that purpose.
Two more points:
- When there is a comment link, you can easily access the quoted comment. No point to make the author into a link then – it would just contribute to MOS:SEAOFBLUE.
- Actually, there is no point to link the author when a oldid or diff is linked (using
|oldid=
and|diff=
) as well. Seeing the author's userpage is not the most relevant link for me when I see their quote.
P.S. There is a mistake in the docs currently: they state
|diff=
: The revision ID of the diff comparing target.
But |diff=
currently requires a full link. Jack who built the house (talk) 10:47, 10 February 2024 (UTC)
- I'm going to implement the
|id=
parameter. It seems that phab:T365974 will be released any day now (but the links are already working). I'll also add the|noping=
parameter to allow to suppress pings. Now I think it's probably a good idea to have it by default because people likely want to know when they are quoted. At the same time, when the author can know it without a ping (when someone replies to them, for example), people likely don't specify|by=
generally, so the author won't be bothered by a ping. In Convenient Discussions, I made it so that regular replies use {{tq}}, whereas {{tqb}} is used when the quoted comment is not the one you're replying to. Jack who built the house (talk) 17:20, 4 June 2024 (UTC)
Ugly bottom padding
editIs there a way to remove the ugly bottom padding
e.g: look how the top space and bottom space are unequal!
while still being accessibility-friendly? Aaron Liu (talk) 23:21, 22 February 2024 (UTC)
- I think this is a side effect of the fix for T352875 that did not account for this case. I have adjusted the css for this template, which is a hack, but it doesn't seem to have worked (I don't see the change applied when I inspect the style; a real fix is welcome). If that bug gets another patch, my attempted css change may have to be adjusted or removed. See also Template talk:Quote_box#bottom-of-box sizing. – Jonesey95 (talk) 06:12, 23 February 2024 (UTC)
- I think the selector should be
.talkquote p
.
Or something like (based on the loader's css in my debug console)Aaron Liu (talk) 15:12, 23 February 2024 (UTC).mw-body blockquote > :last-child { padding-bottom: 0.2em; }
- Hey @Jonesey95, would you kindly take a look at this? Aaron Liu (talk) 20:21, 25 February 2024 (UTC)
- I have tried to implement this change in the sandbox, but it is not doing anything for me; I still get padding-bottom=0.5em. I don't really understand CSS as well as I should. You are welcome to fiddle with the sandbox version of the template and the sandbox version of styles.css. – Jonesey95 (talk) 00:30, 26 February 2024 (UTC)
- @Jonesey95 I think I've fixed it! (insert happy child squealing )Aaron Liu (talk) 03:11, 26 February 2024 (UTC)
- I have put that version in the live CSS page. I think the resulting bottom padding may be too small now. What do others think? As far as I know, we are trying to work around a change to MediaWiki that amounts to a bug in an edge case, but I could be wrong. – Jonesey95 (talk) 04:05, 26 February 2024 (UTC)
- @Jonesey95 I think I've fixed it! (insert happy child squealing )Aaron Liu (talk) 03:11, 26 February 2024 (UTC)
- I have tried to implement this change in the sandbox, but it is not doing anything for me; I still get padding-bottom=0.5em. I don't really understand CSS as well as I should. You are welcome to fiddle with the sandbox version of the template and the sandbox version of styles.css. – Jonesey95 (talk) 00:30, 26 February 2024 (UTC)
- I think the selector should be
This edit request to Template:Talk quote block/styles.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
- @Jonesey95 What would you think of changing the bottom padding to 0? It seems like the top has a padding of 0 too, and the bottom had a padding of 0 before the change. Aaron Liu (talk) 15:27, 14 April 2024 (UTC)
- If it works, it's fine with me. The WMF developers are still working on vertical spacing (I think the main task is T360917), so further changes to this template might be necessary if they ever untangle their spacing mess. If you use the sandbox and testcases page, you should be able to figure out if your proposal is safe at this time. – Jonesey95 (talk) 15:35, 14 April 2024 (UTC)
- Alright, I've started an edit request and put that in Template:Talk quote block/sandbox/styles.css. Aaron Liu (talk) 19:11, 14 April 2024 (UTC)
- Aaron Liu the edit request you opened is for the sandbox. Did you mean to open one for the live version? SWinxy (talk) 23:47, 14 April 2024 (UTC)
- @SWinxy: Whoops, corrected! Aaron Liu (talk) 00:54, 15 April 2024 (UTC)
- Done * Pppery * it has begun... 02:26, 15 April 2024 (UTC)
- Welp, that's not what I thought I was endorsing. I really don't think we should have skin-specific CSS styling in our templates. Didn't we learn that this was a bad idea in the Internet Explorer / Netscape days? That way lies madness. – Jonesey95 (talk) 02:36, 15 April 2024 (UTC)
- I personally have no opinion on this, just copied to code from the sandbox since it seemed technically OK. And I don't see why what I just did is at all the gateway to madness. And we already have had logic that like Template:Skip to talk/styles.css that hides entire templates on certain skins, which makes this seem trivial. * Pppery * it has begun... 02:44, 15 April 2024 (UTC)
- It's skin-specific because the bottom padding problem only exists in Vector 2022. Aaron Liu (talk) 03:35, 15 April 2024 (UTC)
- There are very few (16 pages at this writing) templatestyles pages that apply styling to the Vector or Vector 2022 skins. Some of them are TOC-related, which is understandable, and some appear to be working around bugs. I hope that we will be able to remove the skin-specific styling from this template when the WMF developers get their heads around the rather complex vertical spacing issues. – Jonesey95 (talk) 04:01, 15 April 2024 (UTC)
- Not sure what's happening, but the change works in testcases but not on this very talk page. Aaron Liu (talk) 03:38, 15 April 2024 (UTC)
- Welp, that's not what I thought I was endorsing. I really don't think we should have skin-specific CSS styling in our templates. Didn't we learn that this was a bad idea in the Internet Explorer / Netscape days? That way lies madness. – Jonesey95 (talk) 02:36, 15 April 2024 (UTC)
- Done * Pppery * it has begun... 02:26, 15 April 2024 (UTC)
- @SWinxy: Whoops, corrected! Aaron Liu (talk) 00:54, 15 April 2024 (UTC)
- Aaron Liu the edit request you opened is for the sandbox. Did you mean to open one for the live version? SWinxy (talk) 23:47, 14 April 2024 (UTC)
- Alright, I've started an edit request and put that in Template:Talk quote block/sandbox/styles.css. Aaron Liu (talk) 19:11, 14 April 2024 (UTC)
- If it works, it's fine with me. The WMF developers are still working on vertical spacing (I think the main task is T360917), so further changes to this template might be necessary if they ever untangle their spacing mess. If you use the sandbox and testcases page, you should be able to figure out if your proposal is safe at this time. – Jonesey95 (talk) 15:35, 14 April 2024 (UTC)
IP users
editIs it possible to extend the "by" parameter to cover IP users? This would be helpful in highlighting talking points in discussions with them. Thanks. UaMaol (talk) 21:48, 10 April 2024 (UTC)
- It looks like it works fine. See the testcases page, specifically the "with IP user" case. What makes you think that it doesn't work? – Jonesey95 (talk) 05:17, 11 April 2024 (UTC)
Edit request 22 June 2024
editThis edit request to Template:Talk quote block/styles.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Description of suggested change: Add CSS per mw:Recommendations for night mode compatibility on Wikimedia wikis Diff:
− | + | html.skin-theme-clientpref-night .talkquote {
background-color: #0d261f;
}
@media (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .talkquote {
background-color: #0d261f;
}
} |
Andumé (talk) 19:50, 22 June 2024 (UTC)
- Done Sohom (talk) 20:16, 22 June 2024 (UTC)
Dark mode issue
editIn dark mode, the text should be white. When a discussion is wrapped in {{archive top}} and {{archive bottom}} templates, the text becomes black and is unreadable. Example added at: Template:Talk quote block/testcases#Archived If the issue is with {{archive top}}, feel free to move this comment, Rjjiii (talk) 04:12, 29 July 2024 (UTC)
- @Rjjiii That's a tricky one. I think it is somewhat the fault of
{{Archive top}}
, though I think it can be fixed in{{Talk quote block}}
. {{Archive top}}
doesn't use TemplateStyles for its color schemes; its code forces style attributes with hardcoded colors, and for dark-mode support it seems to rely on the fact that, as mw:Recommendations for night mode compatibility on Wikimedia wikis says,The Wikipedia night mode gadget uses the invert CSS filter property to style content.
- Unfortunately, I think what's happening is that
{{Talk quote block}}
is getting caught up in that color-inversion, and its dark-mode colors get re-inverted to light colors. - But that same page also says,
You can prevent an element from having colors inverted by adding the
, which if applied to themw-no-invert
class.{{Talk quote block}}
wrapper<div>
should hopefully protect its dark-mode styles from being inverted when they're nested inside an{{Archive top}}
. I'll try that out in the Sandbox. FeRDNYC (talk) 14:16, 26 August 2024 (UTC) - Grumf. No effect at all.
- It's almost definitely this invert rule, which is found in the Vector skin CSS:
html.skin-theme-clientpref-os .skin-invert-image img,html.skin-theme-clientpref-os .skin-invert,html.skin-theme-clientpref-os .oo-ui-iconElement-icon:not(.oo-ui-image-progressive):not(.oo-ui-image-destructive):not(.oo-ui-checkboxInputWidget-checkIcon):not(.oo-ui-image-invert):not(.mw-no-invert),html.skin-theme-clientpref-os .oo-ui-indicatorElement-indicator { color-scheme: light; filter: invert(1) hue-rotate(180deg); } }
- Because if I turn off that
filter: invert(1) hue-rotate(180deg);
in my browser's inspector view, the{{Archive top}}
colors swap back to light-mode-ish, and the{{Talk quote block}}
swaps to dark. But it looks like that CSS will only acceptmw-no-invert
to disable if the element in question has the classoo-ui-iconElement-icon
. Not clear whether that's intentional or not, but it seems to makemw-no-invert
useless for the general case of page elements getting incorrectly inverted. - The other issue is that the TemplateStyles proposed by I Am Andumé above don't quite comply with the recommendations, which also say:
- Always define color when defining background
When defining a background color, it may be tempting not to define the color if it is the same as the article text color. However, when different themes e.g. night mode are applied, this could have unintended consequences (e.g. white text on a yellow background). It is thus recommended that you always define the two together.
- The styles above only set the
background-color
, which I think is part of the problem. If they setcolor
as well, then at least when getting inverted they'd result in readable colors. FeRDNYC (talk) 15:01, 26 August 2024 (UTC)
This edit request to Template:Talk quote block/styles.css has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
- Description of suggested change:
- As above, update CSS per mw:Recommendations for night mode compatibility on Wikimedia wikis, which says:
- Always define color when defining background
When defining a background color, it may be tempting not to define the color if it is the same as the article text color. However, when different themes e.g. night mode are applied, this could have unintended consequences (e.g. white text on a yellow background). It is thus recommended that you always define the two together.
- Diff:
− | @media screen {
html.skin-theme-clientpref-night .talkquote {
background-color: #0d261f;
}
} | + | @media screen {
html.skin-theme-clientpref-night .talkquote {
background-color: #0d261f;
color: white;
}
}
@media screen and (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .talkquote {
background-color: #0d261f;
color: white;
}
} |
FeRDNYC (talk) 15:14, 26 August 2024 (UTC)
- I've also reported the issue with
mw-no-invert
not working at the MediaWiki page for reporting dark-mode errors. FeRDNYC (talk) 15:43, 26 August 2024 (UTC)
- I've also reported the issue with
- Not done: Color is set in the block above. Sohom (talk) 16:38, 26 August 2024 (UTC)
- @Sohom Datta That's true, but
background-color
is also set in the block above. The styles in question are overridingbackground-color
to an opposing color, and when that's done, my understanding is thatcolor
needs to be overridden to a contrasting color, to prevent issues like the ones that can be seen currently at Template:Talk quote block/testcases#Archived when using dark mode. FeRDNYC (talk) 20:01, 26 August 2024 (UTC) - As the quoted text from mw:Recommendations for night mode compatibility on Wikimedia wikis says (emphasis added)
It is thus recommended that you always define the two together.
FeRDNYC (talk) 20:03, 26 August 2024 (UTC)- @FeRDNYC I think the context here is more important. The advice is not given for templatestyles, but rather for inline css in divs. For inline css in divs, it is very important to include the color parameters due to the bryzantine cascading rules that CSS uses which lead to frustrating edge cases (I speak from experience), less so for a CSS file where the color is defined using CSS variables a few lines above. Sohom (talk) 22:34, 26 August 2024 (UTC)
- @Sohom Datta Okey-dokey. FeRDNYC (talk) 22:45, 26 August 2024 (UTC)
- @Sohom Datta I mean, I'm open to the idea that there's a better solution, but here's what I see happening at Template:Talk quote block/testcases#Archived currently:
- The outer
{{Archive top}}
wrapper<div>...</div>
hasclass="skin-invert"
set on it, which switches thecolor-mode
tolight
and appliesfilter: invert(1) hue-rotate(180deg);
to everything inside it — including the TemplateStyles for{{Talk quote block}}
. TemplateStyles don't protect the styled elements from being affected by a cascadingclass="skin-invert"
. - Since those TemplateStyles set
background-color: #0d261f;
only for dark mode, that background color gets inverted to whatever light color is the inversion of#0d261f
. - Since those TemplateStyles also set
color: var(--color-base, #202122);
unconditionally, that color becomes--color-base
from the light-mode palette, which is#202122
, not the dark-mode--color-base
of#eaecf0
. - Both colors then get inverted by the surrounding
<div class="skin-invert">...</div>
, causing them to both become relatively-similar light shades of their assigned colors.
- The outer
- AIUI, applying
color: white;
(or some other light color) in the dark-mode CSS for.talkquote
would cause that color to be inverted toblack
in the same conditions where the background color gets inverted from#0d2612f
to whatever light shade is its inversion. - But I'm sure that's not the only solution. I'd just like to see some solution. FeRDNYC (talk) 23:11, 26 August 2024 (UTC)
- I've gone ahead and made a fix for it in the {{archive top}} template. If anything breaks let me know. Sohom (talk) 02:20, 27 August 2024 (UTC)
- @Sohom Datta Looks good from here, thanks! FeRDNYC (talk) 17:29, 29 August 2024 (UTC)
- I've gone ahead and made a fix for it in the {{archive top}} template. If anything breaks let me know. Sohom (talk) 02:20, 27 August 2024 (UTC)
- @FeRDNYC I think the context here is more important. The advice is not given for templatestyles, but rather for inline css in divs. For inline css in divs, it is very important to include the color parameters due to the bryzantine cascading rules that CSS uses which lead to frustrating edge cases (I speak from experience), less so for a CSS file where the color is defined using CSS variables a few lines above. Sohom (talk) 22:34, 26 August 2024 (UTC)
- @Sohom Datta That's true, but
Urgent: Please fix this template for printed content Template:Talk quote block/sandbox/styles.css.
editFirstly, apologies for writing in English if this is not your first language (this is an automated message).
This template has been detected as one of 436 pages using styles that break the page when printed when the user is using dark mode. The fix is very straightforward - all your styles relating to dark mode must be scoped to. Since there is a high risk of this templates being copied to other wikis it is important this notice is acted on ASAP.
To fix this:
- Update `@media (prefers-color-scheme: dark` to `@media screen and (prefers-color-scheme: dark`
- Wrap any styles relating to `html.skin-theme-clientpref-night` in `@media screen`
If this message has not been acted on in 7 days, this will be fixed by an automated script. Thank you for your help fixing this important issue.
For any questions feel free to ask them at phab:T369874.
Jon (WMF) (talk) 18:17, 2 August 2024 (UTC) on behalf of the web team.Edit request 8 August 2024
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please merge the sandbox, which extracts the posting user and timestamp from the comment's ID, into the main template. See Template:Talk quote block/testcases § Named parameters for effects. Thanks. Aaron Liu (talk) 15:54, 8 August 2024 (UTC)
- Completed. P.I. Ellsworth , ed. put'er there 20:29, 9 August 2024 (UTC)
More apparent on mobile?
editOn the mobile app, this template renders as a bare pseudo-paragraph—I imagine this creates considerable confusion in situations and with users where additional friction is absolutely worth avoiding if we can help it. Anything we can do with a mobile-specific presentation here? Remsense ‥ 论 05:17, 23 August 2024 (UTC)
- @Remsense I think you'll have to be a little more specific than "on mobile", because here's how the template looks in Chrome on my Samsung A53 running Android 14:
- https://imgur.com/a/rmPoScM
- What mobile device were you using to access Wikipedia? Via what method? (Browser, app, ...) With what site skin? FeRDNYC (talk) 17:08, 23 August 2024 (UTC)
- Sorry, obviously should've specified: the "native" talk page thread viewer on the iOS and (I assume) Android apps. I tried digging through Phabricator to see if anything similar has been mentioned on that end, but couldn't tell. Remsense ‥ 论 17:28, 23 August 2024 (UTC)
- @Remsense Aha, thanks. Hmm. That's a tricky one. If the mobile app ignores TemplateStyles (which is what it sounds like), I'm not sure how much can really be done on the individual template level — nor how much should be done, since the obvious solution seems to be "make TemplateStyles work in the mobile app", and then the issue is solved for every template at once.
- Wikipedia stats show that unlike mobile browser use (which has been growing by leaps and bounds in recent years, now regularly exceeding double the number of monthly desktop pageviews), mobile Wikipedia app usage remains vanishingly small at around 2%–3% of total monthly pageviews. Granted, that's still almost 200 million pageviews a month, but it's a tiny percentage of the total reader base. FeRDNYC (talk) 13:21, 26 August 2024 (UTC)
- Oh, I didn't realize it was that small! I guess it'll remain a "keep in mind some real percentage of readers can't see the green" thing. Remsense ‥ 论 20:22, 26 August 2024 (UTC)
- Sorry, obviously should've specified: the "native" talk page thread viewer on the iOS and (I assume) Android apps. I tried digging through Phabricator to see if anything similar has been mentioned on that end, but couldn't tell. Remsense ‥ 论 17:28, 23 August 2024 (UTC)