Page MenuHomePhabricator

Wish and focus area integration
Closed, ResolvedPublic8 Estimated Story Points

Assigned To
Authored By
MusikAnimal
Jun 26 2025, 5:52 PM
Referenced Files
F65717916: 2025-08-05_12-37-34.png
Aug 5 2025, 7:51 PM
F65717914: 2025-08-05_12-39-11.png
Aug 5 2025, 7:51 PM
F65717911: 2025-08-05_12-38-40.png
Aug 5 2025, 7:51 PM
F65717909: 2025-08-05_12-36-01.png
Aug 5 2025, 7:51 PM
F65589134: 2025-07-22_09-54-05.png
Jul 22 2025, 6:22 PM
F65589417: 2025-07-22_11-00-51.png
Jul 22 2025, 6:22 PM
F65589413: 2025-07-22_10-59-40.png
Jul 22 2025, 6:22 PM
F65589409: 2025-07-22_10-59-15.png
Jul 22 2025, 6:22 PM

Description

With T387958: Parser tag <wish> to save wish data to db and T388207: Add <focus-area> parser function to save focus area data out of the way, it's time to fit the pieces together. Currently the codebase has TODO comments or uses empty values where the focus area should go.

Technical notes

  • There needs to be a hidden input outside the "is wishlist manager" check, so that the focus area value gets submitted even for non-staff.

Acceptance criteria

  • Add a "Focus area" input to Special:WishlistIntake, visible only to users with the manage-wishlist right (such as admins on CommTechWiki)
    • The Lookup component should do fine here
  • The wikitext value for the focus area in the source of the wish page should be the autogenerated subtitle, i.e. FA123
  • When viewing a wish, you should see a link to the focus area with the localized title, i.e. "My first focus area!"

Derived Requirement
Integrate wish and focus area data by allowing users with the manage-wishlist right to assign a focus area (via subtitle, e.g., FA123) to a wish when using Special:WishlistIntake. Ensure the assigned focus area is stored and rendered as wikitext in the wish page source, and that the localized focus area title appears as a link when viewing the wish.

Test Steps

Test Case 1: Ensure 'Focus area' input is visible only to users with manage-wishlist rights

  1. Log in as a user with the manage-wishlist right.
  2. Navigate to Special:WishlistIntake.
  3. ✅❓❌⬜ AC1: Confirm that a "Focus area" input field is visible.
  4. Log in as a user without the manage-wishlist right.
  5. ✅❓❌⬜ AC2: Confirm that the "Focus area" field is not visible, but that its value is still submitted in the form (hidden input present in markup).

Test Case 2: Ensure Lookup component allows selecting a valid focus area

  1. While logged in as a wishlist manager, click into the "Focus area" input field.
  2. Use the Lookup field to select an existing focus area (e.g., "My first focus area!").
  3. ✅❓❌⬜ AC3: Confirm the focus area is selected and assigned to the wish prior to submission.

Test Case 3: Ensure correct subtitle (e.g., FA123) is saved in wikitext

  1. Submit a wish using Special:WishlistIntake with a selected focus area.
  2. Navigate to the newly created wish page (e.g., Community Wishlist/Wishes/W456).
  3. View the page source.
  4. ✅❓❌⬜ AC4: Confirm that the focus-area wikitext parameter is set to the subtitle (e.g., FA123), not the localized name.

Test Case 4: Ensure localized focus area title is shown as link on wish view

  1. Open a wish page that has a focus area assigned.
  2. ✅❓❌⬜ AC5: Confirm that the focus area is rendered as a clickable link showing its localized title (e.g., "My first focus area!") and linking to the correct focus area page.

QA Results - commtech.toolforge

Event Timeline

MusikAnimal set the point value for this task to 8.Jun 26 2025, 9:38 PM
MusikAnimal removed MusikAnimal as the assignee of this task.EditedJun 27 2025, 10:01 PM

Sorta kinda partially done in r1162055, but not enough for me to claim this. I would wait for that to get merged before starting work on this task, however.

I'm going to knock out T397488 first.

Change #1167723 had a related patch set uploaded (by Tim Starling; author: Tim Starling):

[mediawiki/extensions/CommunityRequests@master] Wish and focus area backend integration

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

MusikAnimal updated Other Assignee, added: tstarling.
MusikAnimal added a subscriber: tstarling.

Change #1167723 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Wish and focus area integration; use a PageIdentity for Wish::focusArea

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

TODO: We need a "Unassigned" option in the focus area dropdown. Otherwise there's no way to remove a wish from a focus area.

@MusikAnimal English seems to be fine as seen in the videos and screenshots but can you review some of the RTL issues I might have found at the bottom? I know some are not related to the task but just pointing them out. If there are any separate tasks you want me to create, just let me know.

Test Result - commtech.toolforge

Status: ✅ PASS / ❓Need More Info / ❌ FAIL
Environment: commtech.toolforge
OS: macOS Sequoia 15.5
Browser: Chrome 138
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Ensure 'Focus area' input is visible only to users with manage-wishlist rights

  1. Log in as a user with the manage-wishlist right.
  2. Navigate to Special:WishlistIntake.
  3. AC1: Confirm that a "Focus area" input field is visible.

2025-07-14_12-42-20.png (970×1 px, 179 KB)

  1. Log in as a user without the manage-wishlist right.
  2. AC2: Confirm that the "Focus area" field is not visible, but that its value is still submitted in the form (hidden input present in markup).

2025-07-14_12-41-52.png (1×1 px, 211 KB)

Test Case 2: Ensure Lookup component allows selecting a valid focus area

  1. While logged in as a wishlist manager, click into the "Focus area" input field.
  2. Use the Lookup field to select an existing focus area (e.g., "Google Pixel!").
  3. AC3: Confirm the focus area is selected and assigned to the wish prior to submission.

Test Case 3: Ensure correct subtitle (e.g., FA123) is saved in wikitext

  1. Submit a wish using Special:WishlistIntake with a selected focus area (e.g., "Google Pixel!").
  2. Navigate to the newly created wish page (e.g., Community Wishlist/Wishes/W456).
  3. View the Edit source.
  4. AC4: Confirm that the focus-area wikitext parameter is set to the subtitle (e.g., FA123), not the localized name.
video- Create Wish w/FocusEdit Source
2025-07-14_13-22-58.png (887×940 px, 162 KB)

Test Case 4: Ensure localized focus area title is shown as link on wish view

  1. Open a wish page that has a focus area assigned.
  2. AC5: Confirm that the focus area is rendered as a clickable link showing its localized title (e.g., "My first focus area!") and linking to the correct focus area page.

RTL possible issues

❌ Boxes stayed on the right❓ Focus Area all stays in English❌ Edit Wish button Stays in English❌ Wikitext- some are RTL vs LTR (e.g., title and focusarea)
2025-07-14_13-31-59.png (1×1 px, 165 KB)
2025-07-14_13-33-34.png (731×1 px, 108 KB)
2025-07-14_13-38-48.png (1×1 px, 169 KB)
2025-07-14_13-39-53.png (1×1 px, 168 KB)
❓HE Intake to specific wish that stays English and not RTL and Clicking on the focus area, everything is in English except "Support in the field of focus"
GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF moved this task from QA to In Development on the Community-Tech (Sea Lion Squad) board.
KSiebert changed the task status from Open to In Progress.Jul 16 2025, 9:50 AM

English seems to be fine as seen in the videos and screenshots but can you review some of the RTL issues I might have found at the bottom? I know some are not related to the task but just pointing them out. If there are any separate tasks you want me to create, just let me know.

RTL possible issues

❌ Boxes stayed on the right

Legit bug, but I think we're removing the Projects field anyway, so there's probably no need to create a task.

❓ Focus Area all stays in English

Are there Hebrew translations for those focus areas?

❌ Edit Wish button Stays in English
❓HE Intake to specific wish that stays English and not RTL and Clicking on the focus area, everything is in English except "Support in the field of focus"

I think there was job queue slowness on CommTechWiki. I see now that W8 correctly shows everything in Hebrew (except "Voting" which has not been translated yet).

❌ Wikitext- some are RTL vs LTR (e.g., title and focusarea)

This is expected, since the parser function params and syntax are in LTR, while the values are RTL. This is a caveat of the standard algorithm that browsers use in bidirectional text, and something RTL users are used to.

@MusikAnimal Can you review the "Focus Area all stays in English" part?

English seems to be fine as seen in the videos and screenshots but can you review some of the RTL issues I might have found at the bottom? I know some are not related to the task but just pointing them out. If there are any separate tasks you want me to create, just let me know.

RTL possible issues

❌ Boxes stayed on the right

Legit bug, but I think we're removing the Projects field anyway, so there's probably no need to create a task.

✅ Ok, sounds good.

❓ Focus Area all stays in English

Are there Hebrew translations for those focus areas?

❌ So I translated FA3 title, which was "Google Pixel". Focus Area now translates to Hebrew when I change the language to Hebrew but when I switch back to English, the Focus Area stays on Hebrew, as seen from the screenshots below.

HebrewFA in 3 languagesFA3 in EnglishEnglish
2025-07-22_10-57-19.png (855×1 px, 146 KB)
2025-07-22_10-59-15.png (587×1 px, 138 KB)
2025-07-22_10-59-40.png (568×1 px, 124 KB)
2025-07-22_11-00-51.png (689×1 px, 106 KB)

❌ Edit Wish button Stays in English
❓HE Intake to specific wish that stays English and not RTL and Clicking on the focus area, everything is in English except "Support in the field of focus"

I think there was job queue slowness on CommTechWiki. I see now that W8 correctly shows everything in Hebrew (except "Voting" which has not been translated yet).

✅ That is correct, the job queue was just slow. As you said, only "Voting" is not translated and dates

2025-07-22_09-54-05.png (1×1 px, 169 KB)

>> ❌ Wikitext- some are RTL vs LTR (e.g., title and focusarea)

This is expected, since the parser function params and syntax are in LTR, while the values are RTL. This is a caveat of the standard algorithm that browsers use in bidirectional text, and something RTL users are used to.

⬜  Ok, sounds good!

Change #1174831 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CommunityRequests@master] SpecialWishlistIntake: use blank value for an unassigned focus area

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

Change #1174831 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] SpecialWishlistIntake: use blank value for an unassigned focus area

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

@MusikAnimal Can you review the "Focus Area all stays in English" part?

❌ So I translated FA3 title, which was "Google Pixel". Focus Area now translates to Hebrew when I change the language to Hebrew but when I switch back to English, the Focus Area stays on Hebrew, as seen from the screenshots below.

I believe I have fixed this. CommTechWiki didn't have $wgNamespacesWithSubpages set for the mainspace, so translations were not being stored for the correct wish/FA!

Could you test again? I had to nuke all the wishes/FAs again, sorry. At the time of writing, FA1 is an example of a FA written in Hebrew with an English translation, and I now see the English title in the dropdown at https://commtech.toolforge.org/Special:WishlistIntake

@MusikAnimal Can you review the "Focus Area all stays in English" part?

❌ So I translated FA3 title, which was "Google Pixel". Focus Area now translates to Hebrew when I change the language to Hebrew but when I switch back to English, the Focus Area stays on Hebrew, as seen from the screenshots below.

I believe I have fixed this. CommTechWiki didn't have $wgNamespacesWithSubpages set for the mainspace, so translations were not being stored for the correct wish/FA!

Could you test again? I had to nuke all the wishes/FAs again, sorry. At the time of writing, FA1 is an example of a FA written in Hebrew with an English translation, and I now see the English title in the dropdown at https://commtech.toolforge.org/Special:WishlistIntake

@MusikAnimal Looks like we are good to go now, as seen in the screenshots below. I will now resolve this. Thanks for all your work!

Focus Area- EnglishFA1- Page InfoFA1- CategoryFocus Area- Hebrew
2025-08-05_12-36-01.png (621×1 px, 122 KB)
2025-08-05_12-38-40.png (796×918 px, 142 KB)
2025-08-05_12-39-11.png (867×965 px, 156 KB)
2025-08-05_12-37-34.png (630×1 px, 107 KB)
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)