Talk:WMDE Technical Wishes/Finding and inserting templates

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search

Short descriptions[edit]

The search would be improved by displaying the template Short Description where it is defined — GhostInTheMachine talk to me 14:04, 27 March 2021 (UTC)Reply[reply]

@GhostInTheMachine: Do you mean like with "Cite book" in this example?
Improved template search.png
-- Johanna Strodt (WMDE) (talk) 09:04, 29 March 2021 (UTC)Reply[reply]
That is right. There is a need for comms with editors of each wiki so that the templates are updated to include descriptions — GhostInTheMachine talk to me 21:06, 15 April 2021 (UTC)Reply[reply]
  • @GhostInTheMachine: Thanks for clarifying! The description is already shown if it's added in TemplateData. But when we announce the feature before the deployment, we will point out that descriptions should be added in TemplateData (and ask people to spread this info in the appropriate spaces in their wikis). By the way, updating descriptions and other TemplateData will also become easier soon, with the deployment of the improvements for the TemplateData editor. I hope that helps. -- Wishing you a good weekend, Johanna Strodt (WMDE) (talk) 11:00, 16 April 2021 (UTC)Reply[reply]
  • How will this handle the situation where the Short description and the TemplateData description are different? Normal search in article space uses the Short description, but which takes priority here? — GhostInTheMachine talk to me 20:36, 9 July 2021 (UTC)Reply[reply]
@GhostInTheMachine: Thanks for your question. Our team has implemented CirrusSearch for this, and which one of the two descriptions it prioritizes is hard to tell because it's rather complex. We assume the contents of the short description as well as the TemplateData description are both "just text" and indexed via the normal full-text index. Our team did look into prioritizing the TemplateData description (phab:T274906) but didn't pursue it any further. Did that help? -- Johanna Strodt (WMDE) (talk) 09:45, 12 July 2021 (UTC)Reply[reply]
  • @GhostInTheMachine: Oh, I think I might have made your question more complicated than it really was. Sorry about that. Did you just want to know which text is used to show the descriptions in the search? If that's the question, the answer is: The descriptions in TemplateData are shown in the search. If there are other descriptions defined for the template, it's still the TemplateData description that appears in the typeahead. This is the behavior that already existed before our team started improving the interface and we didn't change anything about it. You can see this in action on English Wikipedia, for instance, when you add a template starting with "Oscars" (our changes haven't been deployed to English Wikipedia yet). Hope that helped. -- Best, Johanna Strodt (WMDE) (talk) 16:04, 14 July 2021 (UTC)Reply[reply]

Feedback and a suggestion[edit]

So, a small feedback and a suggestion. The new function is great, but there's something weird in the search results (at least at He-Wiki). They seem pretty random. For example, if I'll put the search word "Newspaper", the first results will be, indeed, temp:newspaper, but afterwards it gets kind of odd. random templates used to quote various newspapers (I haven't noticed any common denominator between them) pop up, then there's temp:cite-journal for some reason. I know it isn't something awful, but it's weird.

Anyway, I'd like to suggest another improvement for this tool, which I assume has already been suggested but I'll emphasize its necessity. The option to insert a template inside a template is critical. For example, when I add temp:ref I usually want to add another template inside the reference, but I have to do that manually using Wiki markup, and it's very uncomfortable, complicated and clumsy.

Thanks for this tool, it's great and super useful! שי אבידן (talk) 08:38, 16 July 2021 (UTC)Reply[reply]

Hello @שי אבידן: Thank you very much for reaching out. We appreciate your feedback.
The search results were adjusted so the first displayed result will be the auto-completion of the entered word from the beginning as in the old search mechanism. The following search results are generated from the entire template name and the template description which means there will also be search results that do not contain the typed letters in the title. This can at least account for certain randomness of the results.
Thank you also for addressing the template in a template problem. It’s a fundamental problem of the template system which we also found in our early research, but unfortunately cannot tackle within the scope of our work. Best --Timur Vorkul (WMDE) (talk) 14:17, 20 July 2021 (UTC)Reply[reply]
Hello @שי אבידן: The developers looked into the issue you raised earlier in this Phabricator ticket and left some comments there. Due to the specific algorithm of the new search, it comes down to the same as I wrote above.
They seem pretty random. For example, if I'll put the search word "Newspaper", the first results will be, indeed, temp:newspaper, but afterwards it gets kind of odd. random templates used to quote various newspapers (I haven't noticed any common denominator between them) pop up, then there's temp:cite-journal for some reason. I know it isn't something awful, but it's weird.
I guess I would hope that {{cite news}} displays prominently in such a search (and I would guess there's an infobox lying around, maybe "infobox publication", that might be nice to find). Izno (talk) 16:37, 10 September 2021 (UTC)Reply[reply]

subpages of templates[edit]

I think that subpages of templates need to be igniored un this search. Gopico (talk) 13:04, 26 August 2021 (UTC)Reply[reply]

@Timur Vorkul (WMDE), if you don't search in subpages, then how will I find content in the (transcluded) /doc documentation subpage of a template? WhatamIdoing (talk) 15:28, 26 August 2021 (UTC)Reply[reply]
@WhatamIdoing I apologize for the late reply. /doc subpages were already excluded from the search before our changes were made. The search index of CirrusSearch no longer searches the raw wikitext but the readable HTML. Therefore the documentation is visible for Cirrus on the template page even if it is located in a subpage. --Timur Vorkul (WMDE) (talk) 12:40, 8 September 2021 (UTC)Reply[reply]
Thanks. WhatamIdoing (talk) 15:37, 9 September 2021 (UTC)Reply[reply]
I would slightly uprank templates with TemplateData and downrank subpages slightly more than that uprank. That way you prioritize well documented templates and subtemplates and subpages dropdown in priority even more than undocumented templates. —TheDJ (talkcontribs) 09:56, 27 August 2021 (UTC)Reply[reply]
I am not sure I'm a fan of 'ignoring', but I do think a (significantly?) decreased weighting for such pages is founded. I know that there are some templates with slashes in the name (unfortunately would need quarry to find the set) that aren't your standard doc/test/sandboxes and are indeed templates for general use. Izno (talk) 16:36, 10 September 2021 (UTC)Reply[reply]
Thanks to everyone who participated in the discussion and provided feedback on this question.
The team has investigated different approaches to excluding or deprioritising subpages in the search results. However, each approach had pitfalls that would have either affected the performance of the search or potentially ignored relevant results. No final solution could be found without having to change the underlying search algorithm. Therefore, we will pass the concern on to WMF's Search Team, who can look into it further. Timur Vorkul (WMDE) (talk) 13:36, 22 February 2022 (UTC)Reply[reply]

Changing template types[edit]

Not exactly what's being discussed here, but it would be good if there was a way to swap out one template for another, while leaving all the parameters intact. This is really useful when there's families of similar temples, such as infoboxes and reference citations, and people often pick the wrong one.

For example, if somebody used en:Template:Infobox person it should be easy to swap in the more specific en:Template:Infobox officeholder. Many of the parameters are identical (name, image, caption, nationality, etc), but there's no easy way to do that using the visual tools (it's trivial using the source editor). I could see a U/I which auto-maps parameters with identical names, and gives you a list of unmapped parameters with the ability to manually map them to what they should be (as well as possibly overriding the auto-mappings). —The preceding unsigned comment was added by RoySmith (talk)

The best way to do more technical cleanup tasks like this is to quickly switch to source editing (via the pencil icon in the upper right corner), do the replacement, and switch back to visual editing. Tools to swap templates exist, including my own. The checkwiki project lists some more. --Thiemo Kreuz (WMDE) (talk) 11:41, 2 September 2021 (UTC)Reply[reply]

Bold[edit]

Tracked in Phabricator:
task T292977

Hello, when typing the exact name of a template, it does not appear in bold while other templates with that word are highlighted. This makes searching for templates more difficult. Could the bold be reversed and only be applied to the word one is searching ? Thanks ! Skimel (talk) 22:04, 6 October 2021 (UTC)Reply[reply]

@Skimel: Thanks for your suggestion. I'll take it back to our team and we'll discuss it. -- Have a good weekend, Johanna Strodt (WMDE) (talk) 07:22, 8 October 2021 (UTC)Reply[reply]
Thanks! Skimel (talk) 10:25, 8 October 2021 (UTC)Reply[reply]
@Skimel: The bold writing of the words other than the typed in term was an intentional design decision to actually help to see through the search results more easily. You can find more info in this Phabricator ticket.