Page MenuHomePhabricator

Hidden Categories below the templates in edit isn't greyed out while loading
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • During loading "This page is a member of a hidden category:" dropdown is not greyed out

T321032_RTP_Templates_GreyedOut.png (1Γ—1 px, 339 KB)

What should have happened instead?:

  • This section should be greyed out just like the "Templates used in this preview:" which is under the Please note: section in the edit screen while it's loading

Other information (browser name/version, screenshots, etc.):

OS: macOS 13.2
Browser: Chrome 111
Skin: Vector 2022

Event Timeline

Thanks for raising this @GMikesell-WMF. I've been looking into it a bit more…

I'm slightly confused about the purpose of this list of hidden categories: it doesn't update on preview (either nonlive, live, or realtime), but it does feel like perhaps it should. The label, however, would be wrong if it does update: "This page is a member of a hidden category" is clear considering that this doesn't update, but if it were changed to update then the label should be changed to make it clear (to fit alongside "Templates used in this preview").

Or is this list intended to be a list of current hidden categories (i.e. ignoring the currently-previewed edits)? I'm not sure what the purpose of that would be, considering we don't list non-hidden categories or other attributes of the unchanged page.

The category list is updated on preview and can optionally also display hidden categories (via the showhiddencats user preference).

Well, as you say, it's not actually in the category until you save it. What you suggest about changing the language and renaming the label to "Hidden categories this page will be in" or something makes sense, but I expect that comes with some backend work as well? If it does, I'd say this is out of scope for us, especially if it's preexisting behaviour even in normal non-live preview.

Yes, I agree this is out of scope for Realtime Preview work. Personally I think the list should just be removed, which wouldn't be much work. I don't think there's much point in changing the label, because if people want to see hidden cats they can enable that preview (although I guess people might want to see them but only while editing, in which case this makes sense β€” although it doesn't because that's not what it does at the moment).

KSiebert set the point value for this task to 2.May 2 2023, 1:23 PM

Change 924950 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/core@master] page.preview: Grey out `.hiddencats` while loading

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

I was going to initially remove the "This page is a member of a hidden category" list during the preview for the reasons mentioned above β€” however, it seems that although choosing to remove the list may be outside the scope of realtime preview (and might benefit from wider opinions..), the addition of the .hiddencats class to the "loading selectors" is both trivial and brings current behaviour back in line with expectations.

Change 924950 merged by jenkins-bot:

[mediawiki/core@master] page.preview: Grey out `.hiddencats` while loading

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

@TheresNoTime Only issue I came across is what I was talking to you about earlier which I created T338261: Minerva Skin: RTP, Please note section is still grey while the other skins are in black font.. Since I did not encounter any other issues, I will close this ticket. Thanks!

OS: macOS 13.3, Windows 11
Browsers: Safari 16.3. Chrome, 114. Firefox 113, Edge 113
Skins: Vector 2022, 2010, Monobook, Minerva, Timeless
Test link: https://en.wikipedia.beta.wmflabs.org/w/index.php?title=TemplateUsageArticle678&action=edit

During loading "This page is a member of a hidden category:" dropdown is now greyed out

T334518_RTP_Templates_HidCat_GreyedOutLoading.png (1Γ—1 px, 230 KB)

I was going to initially remove the "This page is a member of a hidden category" list during the preview for the reasons mentioned above β€” however, it seems that although choosing to remove the list may be outside the scope of realtime preview (and might benefit from wider opinions..), the addition of the .hiddencats class to the "loading selectors" is both trivial and brings current behaviour back in line with expectations.

Sorry, I should've clarified this before now, but I'm not sure that this works: the hidden-cats list is not dynamically loaded, and so it doesn't make sense to have it grey out during loading. (The task title here is wrong.)

The above patch definitely is simpler, and fulfils what the task says the problem is, but I think the actual problem is this mismatch of whether that list is live or not (people expect it to be, I think).

tl;dr from collab:

  • either update the hidden category list live OR;
  • hide the list entirely while editing

The hidden category list has been incorrectly retrieved from the database instead of the ParserOutput on the non-live preview page since the introduction of the feature in 5248b38e73e36932965723029c4aeae8d31b6475 (2008). For consistency, the hidden category list should be retrieved in the same way as adjacent data.

Change 931601 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/core@master] EditPage: Remove hidden categories list

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

Samwilson changed the point value for this task from 2 to 3.Jun 21 2023, 10:39 AM

There are a few other places referencing .hiddencats: https://codesearch.wmcloud.org/search/?q=%5B%5Ew%5Dhiddencats (excluding the leading 'w' to avoid the showhiddencats preference name).

After the above core patch is merged we should make patches/issues for them.

This task is actually about the lack of greying-out of the hidden cats link, and as that's now done it we decided in the collab meeting today that it'd be best to resolve this and continue the discussion in a new task (so that we can get wider input into the decision).

I've created T340606: Decide what to do about the edit-form's hidden categories list.