Module talk:Location map/Archive 11: Difference between revisions

Content deleted Content added
m Archiving 2 discussion(s) from Module talk:Location map) (bot
m Archiving 2 discussion(s) from Module talk:Location map) (bot
Line 601:
::{{ping|User:Jonesey95}}Yes, it wasn't calibrated. Should be better now. Please advise if there are issues. <span style=" 0.2em 0.2em 0.1em; class=texhtml">[[User:पाटलिपुत्र|<span style="color:green">पाटलिपुत्र</span>]][[User:पाटलिपुत्र|<span style="color:blue"> (Pataliputra)</span>]]</span> [[User talk:पाटलिपुत्र|'''(talk)''']] 15:53, 6 December 2023 (UTC)
:::That looks much better. Thanks for the quick fix. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 16:48, 6 December 2023 (UTC)
 
== Edit request 31 December 2023 ==
 
{{Edit template-protected|answered=yes}}
 
[[File:Location map pin background fix.png|thumb|Preview of the changes on the Android app.]]
 
Currently, an unsightly black box appears behind the red dot of the ___location map on the Android app whenever the map is inside of an infobox (such as in [[Plymouth Rock]]). This is because of styles specific to the [[mw:Page Content Service]] (PCS), which serves our content on the apps. Specifically, the <code><nowiki><div></nowiki></code> tags which wrap the dot inherit the background color from elements up in the tree, which happens to have their backgrounds set to dark/black when the reader requests it and when an infobox wraps the ___location map. There's a [https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/services/mobileapps/+/refs/heads/master/pagelib/docs/pcs/pcs.md#themes very obscurely-placed way to disable this] ([[phab:T236137]]) that's officially supported, which is adding the "notheme" class to any element that shouldn't be styled by PCS. By adding the class to the outer div (div with class <code>od</code>), it suppresses the background color from being set to it and its children divs (which explicitly inherits the infobox's cell background color by default).
 
This change is visible only for the app view ''on dark/black mode''. You will have to open [[Special:PermanentLink/1192790784]] on the Wikipedia apps with dark/black mode enabled or view the Mobile HTML directly in your browser ([https://en.wikipedia.org/api/rest_v1/page/mobile-html/User:Chlod%2Fsandbox/1192790784?theme=black preview]) to see the difference.
 
'''Diff:''' (active in the [[Module:Location map/sandbox|sandbox]], [https://en.wikipedia.org/w/index.php?title=Special%3AComparePages&page1=Module%3ALocation+map&page2=Module%3ALocation+map%2Fsandbox diff])
{| class="wikitable"
! Old
! New
|-
|<syntaxhighlight lang="lua" line="1" start="295">
:addClass('od')
:cssText('top:' .. round(y, 3) .. '%;left:' .. round(x, 3) .. '%')
</syntaxhighlight>
|<syntaxhighlight lang="lua" line="1" start="295">
:addClass('od')
:addClass('notheme') -- T236137
:cssText('top:' .. round(y, 3) .. '%;left:' .. round(x, 3) .. '%')
</syntaxhighlight>
|} <span style="background:#ffff55">'''''[[User:Chlod|Chlod]]'''''</span>&nbsp;<small style="font-size:calc(1em - 2pt)">([[User talk:Chlod|say&nbsp;hi!]])</small> 10:50, 31 December 2023 (UTC)
:{{re|Chlod}} {{done}}, good job! [[User:Est. 2021|Est. 2021]] ([[User talk:Est. 2021|talk]] <b>·</b> [[Special:Contribs/Est. 2021|contribs]]) 15:37, 31 December 2023 (UTC)
::Thank you! Hope you have a happy 2024, Est. 2021! :D <span style="background:#ffff55">'''''[[User:Chlod|Chlod]]'''''</span>&nbsp;<small style="font-size:calc(1em - 2pt)">([[User talk:Chlod|say&nbsp;hi!]])</small> 15:47, 31 December 2023 (UTC)
 
== Aligning caption parameter center ==
 
Can the caption parameter be aligned center? See [[ATP Masters 1000 tournaments#Tournaments|example]]. [[User:Qwerty284651|Qwerty284651]] ([[User talk:Qwerty284651|talk]]) 13:19, 10 February 2024 (UTC)
:[https://en.wikipedia.org/w/index.php?title=ATP_Masters_1000_tournaments&diff=1206261236&oldid=1206068877 Yes]. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 17:30, 11 February 2024 (UTC)
::That simple, huh? I went to <code><nowiki><div style="text-align:center"> map code </div></nowiki></code> lengths and all it took was a little {{tl|center}}. Funny how the simplest solutions are the hardest to find. [[User:Qwerty284651|Qwerty284651]] ([[User talk:Qwerty284651|talk]]) 18:59, 11 February 2024 (UTC)