Page MenuHomePhabricator

frwiktionary search config does not properly set showDescription to false
Closed, ResolvedPublic

Description

Ever since the new Vue.js search experience was deployed to French Wiktionary (T249297), it was supposed to disable descriptions:

'wgVectorWvuiSearchOptions' => [
    'default' => [
        'showThumbnail' => true,
        'showDescription' => true,
    ],
    '+frwiktionary' => [
        'showDescription' => false,
    ],

However, as @Michael and I found out, specifying false in a +overriding block actually has no effect: it’s treated the same as if the key had not been specified, and the default value remains in effect.

lucaswerkmeister-wmde@mwdebug2002:~$ mwscript shell.php frwiktionary
Psy Shell v0.11.8 (PHP 7.4.33 — cli) by Justin Hileman
>>> $wgVectorWvuiSearchOptions
=> [
     "showThumbnail" => true,
     "showDescription" => true,
   ]

The only reason that most frwiktionary search results don’t show a description is simply that the pages have no description, neither local (why would they?) nor central (the Wiktionary main namespace is not connected to Wikidata items):

image.png (279×578 px, 52 KB)

However, pages that have a description still show it in the search:

image.png (279×578 px, 63 KB)

Event Timeline

If frwiktionary shouldn’t show any descriptions, not even for pages that have descriptions, then the config needs to be set up differently, without the + operator:

'frwiktionary' => [
    'showThumbnail' => true,
    'showDescription' => false,
]

However, I think the current behavior (show descriptions only if available) might also be acceptable; in that case, the +frwiktionary block should just be removed from the config to avoid confusion. What do you think?

ovasileva added a subscriber: alexhollender_WMF.

If frwiktionary shouldn’t show any descriptions, not even for pages that have descriptions, then the config needs to be set up differently, without the + operator:

'frwiktionary' => [
    'showThumbnail' => true,
    'showDescription' => false,
]

I'm okay with the current behavior as well - descriptions can be helpful where relevant and I don't think would be confusing to users. Closing this for now. (cc @alexhollender_WMF)

However, I think the current behavior (show descriptions only if available) might also be acceptable; in that case, the +frwiktionary block should just be removed from the config to avoid confusion. What do you think?

I don't think would be confusing to users

@ovasileva Thank you for your input, but I think there is a misunderstanding here.

The explicit configuration for frwiktionary as it exists right now says that descriptions are disabled. However, that configuration has no effect, as described in this ticket, and the descriptions are still shown.

That mismatch between explicit configuration and actual (desired) behavior is what is confusing. It is confusing not to users, but to developers interacting with that configuration. Therefore, the suggestion to make the explicit configuration match the desired and actual behavior by removing that +frwiktionary block.

(Also, at some point someone should fix that unintuitive edge case in +wikiname behavior in general, to prevent issues like this. Not sure who ownes mediawiki/core: includes/SiteConfiguration.php?)

I don't think would be confusing to users

@ovasileva Thank you for your input, but I think there is a misunderstanding here.

The explicit configuration for frwiktionary as it exists right now says that descriptions are disabled. However, that configuration has no effect, as described in this ticket, and the descriptions are still shown.

That mismatch between explicit configuration and actual (desired) behavior is what is confusing. It is confusing not to users, but to developers interacting with that configuration. Therefore, the suggestion to make the explicit configuration match the desired and actual behavior by removing that +frwiktionary block.

(Also, at some point someone should fix that unintuitive edge case in +wikiname behavior in general, to prevent issues like this. Not sure who ownes mediawiki/core: includes/SiteConfiguration.php?)

Got it, thanks for the clarification! Reopening.

Change 879664 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[operations/mediawiki-config@master] Remove redundant block for search descriptions

https://gerrit.wikimedia.org/r/879664

Change 879664 merged by jenkins-bot:

[operations/mediawiki-config@master] Remove redundant block for search descriptions

https://gerrit.wikimedia.org/r/879664

Mentioned in SAL (#wikimedia-operations) [2023-01-26T21:39:03Z] <thcipriani@deploy1002> Started scap: Backport for [[gerrit:884055|Increase threshold for table of contents collapsing (T328045)]], [[gerrit:879664|Remove redundant block for search descriptions (T324859)]]

Mentioned in SAL (#wikimedia-operations) [2023-01-26T21:40:42Z] <thcipriani@deploy1002> thcipriani and jdlrobson: Backport for [[gerrit:884055|Increase threshold for table of contents collapsing (T328045)]], [[gerrit:879664|Remove redundant block for search descriptions (T324859)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-01-26T21:47:53Z] <thcipriani@deploy1002> Finished scap: Backport for [[gerrit:884055|Increase threshold for table of contents collapsing (T328045)]], [[gerrit:879664|Remove redundant block for search descriptions (T324859)]] (duration: 08m 49s)

Jdlrobson claimed this task.
Jdlrobson subscribed.

Done.