Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Sports table) (bot |
m Archiving 1 discussion(s) from Module talk:Sports table) (bot |
||
Line 1,299:
: [[User:S.A. Julio|S.A. Julio]], fixed. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 16:11, 13 March 2023 (UTC)
::Great, thanks! [[User:S.A. Julio|S.A. Julio]] ([[User talk:S.A. Julio#top|talk]]) 18:17, 13 March 2023 (UTC)
== Edit link when transcluding from page ==
When you use the module on a page, you can use {{para|article_section}} to link to the specific section specific section on the source page (V), or the talk page (T), the edit link includes a <nowiki>#Section</nowiki> under the (E), which does not edit the specific section, but the whole page instead. Are there any browser/platform settings that this is supposed to work/not work for? {{ping|Frietjes}} I think you have been relatively active in dev for this lately. My worry is that a non-specific edit link does more harm than good, I for one would prefer to link to the section through V, and hit the section edit link on the article, rather than change a sports table with a preview of the whole page. <span style="border:1px solid maroon; padding:0 2px">[[User:CRwikiCA|<span style="font-family:'Courier';color:maroon">CRwikiCA</span>]] [[User talk:CRwikiCA|<i style="color:navy">talk</i>]]</span> 20:27, 9 March 2023 (UTC)
: {{u|CRwikiCA}}, it may be possible to engineer something where the VTE goes to the article section, but that would require the module to (1) read the page containing the module, and (2) count the sections to get the section number. my concern is that may be expensive string processing. as far as the {{para|article_section}} is concerned, I don't think it is used very frequently.[//en.wikipedia.org/w/index.php?go=Go&search=hastemplate%3AModule%3ASports_table+insource%3A%2Farticle_section%2F&title=Special%3ASearch&ns0=1] before, people were using {{para|template_name}} to hack a <nowiki>#Section</nowiki> for the view, with the difference now that the base part of the link is automatically determined. I believe you are suggesting to just omit the edit link when {{para|article_section}} is used, and scrub the <nowiki>#Section</nowiki> from the talk? [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 21:43, 9 March 2023 (UTC)
::{{u|Frietjes}}, I couldn't find a straightforward fix, e.g., there is no [[WP:MAGIC]] for the section number from the section name. I understand that {{para|article_section}} nor {{para|section}} are always used, but from experience I know defining stuff like this explicitly prevents some nasty to find bugs for users (like when there is multiple tables on a source page). The talk page already links correctly (there is no section link), but for editing, I don't know what is best to do, the result is the same whether you use <nowiki>#Section</nowiki> or not, you get to the full page edit anyway. The only better alternative would be to get the section number, but that's only realistic if there is an existing way to get that. <span style="border:1px solid maroon; padding:0 2px">[[User:CRwikiCA|<span style="font-family:'Courier';color:maroon">CRwikiCA</span>]] [[User talk:CRwikiCA|<i style="color:navy">talk</i>]]</span> 22:26, 9 March 2023 (UTC)
::: {{u|CRwikiCA}}, it is technically possible for the module to read the page and figure out which section number to use (for example see [[Module:Calendar TOC]]). however, it may result in performance limits for large pages. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 23:41, 9 March 2023 (UTC)
:::: {{u|Frietjes}} some of these pages are heavily used and shouldn't be slowed down for such a minor reason. Maybe the best thing is to leave it as it is for now. <span style="border:1px solid maroon; padding:0 2px">[[User:CRwikiCA|<span style="font-family:'Courier';color:maroon">CRwikiCA</span>]] [[User talk:CRwikiCA|<i style="color:navy">talk</i>]]</span> 02:30, 10 March 2023 (UTC)
::::: {{u|CRwikiCA}}, sounds good. one thing we could do would be to add say <code>id="sports-table-SECTION"</code> to the table if {{para|section|SECTION}} is used, and then automatically create an anchor link for the view button. that would cost basically nothing and eliminate the need for {{para|article_section}}. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 16:23, 10 March 2023 (UTC)
:::::: {{u|Frietjes}} What would this generate, especially if {{para|article_section}} and {{para|section}} are different? <span style="border:1px solid maroon; padding:0 2px">[[User:CRwikiCA|<span style="font-family:'Courier';color:maroon">CRwikiCA</span>]] [[User talk:CRwikiCA|<i style="color:navy">talk</i>]]</span> 17:55, 10 March 2023 (UTC)
::::::: {{u|CRwikiCA}}, I don't think you need {{para|article_section}} at all. the module would add the id to table, which would allow the anchor link to work. the anchor link would then send you to the table. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 18:00, 10 March 2023 (UTC)
::::::::{{u|Frietjes}} Okay, then I think that would be all that we need. I don't think the {{para|section}} is included in the current documentation, but I think it would be best practice to use it explicitly. <span style="border:1px solid maroon; padding:0 2px">[[User:CRwikiCA|<span style="font-family:'Courier';color:maroon">CRwikiCA</span>]] [[User talk:CRwikiCA|<i style="color:navy">talk</i>]]</span> 04:22, 11 March 2023 (UTC)
::::::::: {{u|CRwikiCA}}, now added, and tested with [[Field hockey at the 2020 Summer Olympics – Men's tournament]]. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 16:14, 13 March 2023 (UTC)
:::::::::: {{u|Frietjes}}, great work! <span style="border:1px solid maroon; padding:0 2px">[[User:CRwikiCA|<span style="font-family:'Courier';color:maroon">CRwikiCA</span>]] [[User talk:CRwikiCA|<i style="color:navy">talk</i>]]</span> 17:21, 13 March 2023 (UTC)
=== Error for other sections ===
{{u|Frietjes}} I tried using this for the tables in [[UEFA Euro 1980]] on the group pages. Although this worked (see edit history), it caused the pre-existing LST transclusion of the match results to break (show nothing) in the main article. Do you have any idea what is going on? <span style="border:1px solid maroon; padding:0 2px">[[User:CRwikiCA|<span style="font-family:'Courier';color:maroon">CRwikiCA</span>]] [[User talk:CRwikiCA|<i style="color:navy">talk</i>]]</span> 16:41, 27 March 2023 (UTC)
: {{u|CRwikiCA}}, you have to be careful when mixing [[WP:LST]] with {{tag|onlyinclude}}. basically, if you add {{tag|onlyinclude}} to a page, then any <code><nowiki>{{#lst:</nowiki></code> or <code><nowiki>{{#section:</nowiki></code> will only read what is inside the {{tag|onlyinclude}}. to fix this, you have two choices: (1) don't use {{tag|onlyinclude}} and instead wrap the table in {{tag|section}} or (2) switch the {{tag|section}} to use the [[Module:Transcludable section]] syntax. for an example of the [[Module:Transcludable section]] syntax, see links to that module. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 16:50, 27 March 2023 (UTC)
::{{u|Frietjes}}, I will play around with that, thanks! <span style="border:1px solid maroon; padding:0 2px">[[User:CRwikiCA|<span style="font-family:'Courier';color:maroon">CRwikiCA</span>]] [[User talk:CRwikiCA|<i style="color:navy">talk</i>]]</span> 16:57, 27 March 2023 (UTC)
|