Template talk:Sister project links: Difference between revisions

Content deleted Content added
Czar (talk | contribs)
Line 27: Line 27:
::#If a sister link is default (i.e., either an explicit or implicit "yes"), and there is no Wikidata entry, then put it in a different category. These cases may have a bad search, but that requires manual checking.
::#If a sister link is default (i.e., either an explicit or implicit "yes"), and there is no Wikidata entry, then put it in a different category. These cases may have a bad search, but that requires manual checking.
::Are these the two cases you had in mind, Czar? — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 03:58, 21 December 2020 (UTC)
::Are these the two cases you had in mind, Czar? — [[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 03:58, 21 December 2020 (UTC)
::: Lua away! :)
::: My read of this template's (admittedly weird?) defaults is that the more obscure sister links only need to show when specified. To me the logic is:
:::# If Wikidata has a relevant sister link, show it
:::# If the template has an override to prefer a different link or hide an entry, honor it
:::#* If this suppresses an otherwise valid sister link from Wikidata, put it in a maintenance category for review
:::# If the Wikidata-supplied links match the template-supplied links, put it in a maintenance category for someone to remove the manual parameters
:::# This is the fun one, for preserving expected behavior. If Wikidata has NO relevant sister link but this template would normally default to showing the seven default sister projects anyway (as search links), let it.
:::#* Put these in a maintenance category for someone to review whether those default search links are providing any value (and we can take next steps based on how we find it's in use). I can't think of a valid use case for using this template for generic searches but I also haven't looked hard enough.
::: This is basically what you recommended, just more specific. Open to feedback. <span style="background:#F3F3F3; padding:3px 9px 4px">[[User talk:Czar|<span style='font:bold small-caps 1.2em sans-serif;color:#871E8D'>czar</span>]]</span> 04:34, 21 December 2020 (UTC)


== Fix template distortion when the skin is Minerva Desktop or Timeless ==
== Fix template distortion when the skin is Minerva Desktop or Timeless ==

Revision as of 04:34, 21 December 2020

Autopopulate from Wikidata

This template is always a pain to configure. Is there a version of this that pulls sister projects based off of what is linked in Wikidata? czar 01:49, 12 August 2019 (UTC)[reply]

I wish. I have manually added this hundreds of times. :/ ―Justin (koavf)T☮C☺M☯ 01:53, 12 August 2019 (UTC)[reply]
Isn't that what the "in other projects" section of the sidebar does? --Redrose64 🌹 (talk) 07:57, 12 August 2019 (UTC)[reply]
Nobody sees that or uses it. I really think this needs to use Wikidata, and could easily! Right now it's a lot of work, but could be automatic. ɱ (talk) 20:11, 6 July 2020 (UTC)[reply]
@Mike Peel: is this something we can accomplish, in line with {{ccat}} and its related templates? Pharos recommended your help. ɱ (talk) 20:28, 6 July 2020 (UTC)[reply]
@: Yes, this would be possible. I think the implementation would be quite straightforward, but we need to figure out how it should work. In particular, I think the defaults should change to 'if locally defined or if on Wikidata', but there may be cases where this removes links if they aren't on Wikidata. Thanks. Mike Peel (talk) 17:42, 7 July 2020 (UTC)[reply]
Okay, so what do you think should happen? Given the low usage of this template compared to other sister link templates, I wouldn't think the loss too big a deal, and some might be gained? Is there even a way to prevent that while switching to Wikidata, which would be much better for links in the future? ɱ (talk) 18:18, 7 July 2020 (UTC)[reply]

Partially implemented Commons links are pulled from wikidata if neither |c= nor |commons= are specified. Implementation in Module:Commons link. — hike395 (talk) 08:34, 15 December 2020 (UTC)[reply]

 Implemented Now pulling all of the sensible iw links from wikidata (if they exist). Updated the documentation, too, which had fallen behind the template. — hike395 (talk) 19:24, 15 December 2020 (UTC)[reply]
 Implemented for real now. I originally misunderstood Czar's request --- now I think I've implemented it with |auto=. If |auto=1, then the default becomes either find a sitelink in Wikidata, or if missing from Wikidata, just drop the link. As Mike Peel says, if we turned on |auto=1 for all uses of this template, some number of links would disappear. So I made it be an optional. If you always want |auto=1, you can also just use {{Sister project auto}} instead (since |auto=1 is just a wrapper around {{Sister project auto}}). — hike395 (talk) 23:47, 20 December 2020 (UTC)[reply]
  • Thanks for doing this! But isn't it a faux pas to fork the template? And wouldn't it be better to have this template form a maintenance category for fixing the instances whose links do not match those of Wikidata? I'm thinking of how many templates are going to be marked as "auto" and then need to be undone when "auto" invariably becomes the default. czar 00:16, 21 December 2020 (UTC)[reply]
@Czar: I can work to unify the templates: the code will get uglier. At some point, I will be tempted to Lua-ify it.
There are two cases for tracking:
  1. If a sister link is specified, and it isn't "yes" and isn't "no", and if it doesn't match the Wikidata entry (e.g., even if the Wikidata entry is missing), then put it into a tracking category. These cases should have wikidata sitelinks copied over to wikidata.
  2. If a sister link is default (i.e., either an explicit or implicit "yes"), and there is no Wikidata entry, then put it in a different category. These cases may have a bad search, but that requires manual checking.
Are these the two cases you had in mind, Czar? — hike395 (talk) 03:58, 21 December 2020 (UTC)[reply]
Lua away! :)
My read of this template's (admittedly weird?) defaults is that the more obscure sister links only need to show when specified. To me the logic is:
  1. If Wikidata has a relevant sister link, show it
  2. If the template has an override to prefer a different link or hide an entry, honor it
    • If this suppresses an otherwise valid sister link from Wikidata, put it in a maintenance category for review
  3. If the Wikidata-supplied links match the template-supplied links, put it in a maintenance category for someone to remove the manual parameters
  4. This is the fun one, for preserving expected behavior. If Wikidata has NO relevant sister link but this template would normally default to showing the seven default sister projects anyway (as search links), let it.
    • Put these in a maintenance category for someone to review whether those default search links are providing any value (and we can take next steps based on how we find it's in use). I can't think of a valid use case for using this template for generic searches but I also haven't looked hard enough.
This is basically what you recommended, just more specific. Open to feedback. czar 04:34, 21 December 2020 (UTC)[reply]

Fix template distortion when the skin is Minerva Desktop or Timeless

Hi. I'm here to propose a fix for the template distortion when the user's chosen skin is either Minera or Timeless. You can observe the distortion here:

The reason for this distortion is the mixture of static and elastic CSS units of measurement. Paddings are given in em, which is different in each skin. When a skin uses a bigger font size, the em padding is bigger. In addition, the F12 Developer Tool shows that the CSS of these two skins add their own paddings of 0.5em to unordered lists. What I did was to ensure that no CSS designator adds elastic paddings to the template. Here is what I did in the sandbox:

  • Comparison of the template at revision 900539700, with template sandbox at revision 912847145

The result can be seen in the two links above.

So, I suppose this is a pull request for revision 912847145, sandbox branch, into master branch? By the way, thanks for Xaosflux's help. flowing dreams (talk page) 08:05, 28 August 2019 (UTC)[reply]

@Flowing dreams: you have a wonderful edit request above, I wish everyone's was like that! Someone will likely get to this in the next few days (the backlog isn't that big). — xaosflux Talk 11:09, 28 August 2019 (UTC)[reply]
@Flowing dreams: If you're comfortable with CSS, why don't you start a WP:TemplateStyles page at Template:Sister project links/styles.css? I've set this to answered for now, which you can flip back to unanswered if you would rather not spend the extra time, but that's a correct-or fix here. --Izno (talk) 14:16, 28 August 2019 (UTC)[reply]
@Izno: Hi. 😊 I'm gonna need to give you a little background for what I'm going to write. You're the fourth registered user I talk to since signing up, the fourth admin, and the fourth person with smashing personality. So, I'm a little embarassed writing this: Sadly, I've reached my capacity. I'm dead tired and I'm not going to be able to edit until Saturday. On top of that, I absolutely have no idea WP:TemplateStyles is until I read it. I would love to put the extra time, it is just that I absolutely can't. Since you say my fix is the correct one, please do perform the pull. Please! It'll give me a sense of accomplishment. Hopefully, we will work together in the future and I do the TemplateStyles thing next time. flowing dreams (talk page) 19:52, 28 August 2019 (UTC)[reply]
No worries. I'm reactivating the edit request. I did not however mean to imply it was the correct fix. --Izno (talk) 20:23, 28 August 2019 (UTC)[reply]
 Done @Flowing dreams: I've implemented the request, due to caching this may take a little time to propagate, you can WP:PURGE a page if you think there is an issue. Thank you for being being communicative and collegial in this! As with most my tech changes, if any admin or template editor sees an immediate new problem, please revert without waiting to discuss. Izno's tempaltestyles suggestion is a good idea and a way the page could be further improved, but it is a hefty task someone would need to do. — xaosflux Talk 13:03, 29 August 2019 (UTC)[reply]
@Izno and Xaosflux: 👍 Thank you both. 👍 And, Izno, sorry for misunderstanding your "that's a correct-or fix here". 😉 My bad. flowing dreams (talk page) 04:40, 31 August 2019 (UTC)[reply]
By the way, I'll communicate here when I am done with the Wikipedia:TemplateStyles article. flowing dreams (talk page) 05:53, 31 August 2019 (UTC)[reply]

Default values wrong

1.The template appears to be case sensitive, but the default values are "No" rather than "no", or "Yes" rather than "yes", causing links to be shown when they should not be. 2.The search string in "1=" is ignored in some of the links but shown in the heading Example aiming not to show wikinews etc :

  • Using "No" for everything

{{Sister project links|1=Frank Sinatra|m=No |mw=No|species=No|species_author=No|author=No|q=No|wikt=No|d=No|c=No|n=No|s=No|b=No|v=No|voy=No|commonscat=No}}

  • Using "no" for everything

{{Sister project links|1=Frank Sinatra|m=no|mw=no|species=no|species_author=no|author=no|q=no|wikt=no|d=no|c=no|n=no|s=no|b=no|v=no|voy=no|commonscat=no}}


  • Using "yes" for everything - 15 items

{{Sister project links|1=Frank Sinatra|m=yes|mw=yes|species=yes|species_author=yes|author=yes|q=yes|wikt=yes|d=yes|c=yes|n=yes|s=yes|b=yes|v=yes|voy=yes|commonscat=yes}}

</nowiki>

author is not there

  • Using defaults (currently "No")

Amousey (they/them pronouns) (talk) 13:37, 5 July 2020 (UTC)[reply]

Amousey, I have no clue what you are trying to explain here. What is the problem and what do you think is the solution? ―Justin (koavf)T☮C☺M☯ 20:31, 5 July 2020 (UTC)[reply]
Ita a case sensitivity coding problem. I've edited to display the code. The template code has the test ="no" but the default values are "No" rather than "no" (case-sensitive) so it fails. Updating the default values in the template data is probably the best way forward. Amousey (they/them pronouns) (talk)
@Amousey: I still don't know what you want. What needs to be changed? Every time I have used this template and written "wikt=no" I got exactly the behavior I wanted which is not having a link to Wiktionary. Nothing seems broken and everything is fine. If you can explicitly say "change [x] to [y] in [the template/the documentation]" then I can help you. Otherwise, I cannot. ―Justin (koavf)T☮C☺M☯ 21:25, 5 July 2020 (UTC)[reply]

Using {{yesno}} instead of code like {{#ifeq:{{{wikt|}}}|no|| would allow for case-insensitive values of "yes" and "no" to be used, as well as short values like "y" and "n" - Evad37 [talk] 23:50, 5 July 2020 (UTC)[reply]

 Donehike395 (talk) 05:39, 15 December 2020 (UTC)[reply]

Default to category when no page for primary article exists?

Wikisource, Wikibooks, and Wikiversity all have categories for California, but none of them have a primary page named California. Can this template be modified to look for a corresponding category whenever the sister project does not contain a match for the article name? Currently when you select the Wikisource sister project from within the California article, it provides a search list. It would be more useful if it brought you to the "Category:California" page. I can do this with the "Subject bar" template by entering an alternate search term, but it doesn't appear I can do this with the "Sister Project links" template. OvertAnalyzer (talk) 00:30, 7 October 2020 (UTC)[reply]

Template-protected edit request on 14 December 2020

The Wikiversity logo was updated in 2017 to File:Wikiversity logo 2017.svg, but this template still uses the old logo. The Wikiversity logo used in this template also has the "WIKIVERSITY" wordmark underneath it (despite the wordmark being barely visible at the size used), unlike the logos used for all the other sister projects. Therefore, please replace [[File:Wikiversity-logo-Snorky.svg|27x27px|middle|link=|alt=]] with [[File:Wikiversity logo 2017.svg|27x27px|middle|link=|alt=]], making it consistent with the other sister projects and also updating the logo. Thanks. GreenComputer (talk) 02:49, 14 December 2020 (UTC)[reply]

 DoneJonesey95 (talk) 04:36, 14 December 2020 (UTC)[reply]