Page MenuHomePhabricator

Add Special:EditFocusArea to create and edit focus areas
Closed, ResolvedPublic8 Estimated Story Points

Assigned To
Authored By
MusikAnimal
Jun 19 2025, 10:38 PM
Referenced Files
F65718347: FA_EditForm2.webm
Aug 5 2025, 11:46 PM
F65718343: FA_EditForm.webm
Aug 5 2025, 11:46 PM
F65718332: 2025-08-05_16-29-53.png
Aug 5 2025, 11:46 PM
F65718328: 2025-08-05_16-26-24.png
Aug 5 2025, 11:46 PM
F65718331: 2025-08-05_16-26-07.mp4
Aug 5 2025, 11:46 PM
F64405169: URL_Edit_focus.webm
Jul 14 2025, 7:03 PM
F64403643: Edit_focus.webm
Jul 14 2025, 7:03 PM
F64398745: 2025-07-14_10-36-07.png
Jul 14 2025, 7:03 PM

Description

Focus area equivalent of T394355: Add Special:WishlistIntake to save and edit wishes

In the old gadget/bot-based system, we had a clunky system of manually creating focus areas. In the extension, we want auto-incrementing page titles (T392001), necessitating us to use the backend to create new focus areas.

Fortunately, with Special:WishlistIntake now fully functional, it should be straightforward to copy/refactor the code to do the same for focus areas.

Acceptance criteria

  • Should be able to create new wishes using Special:EditFocusArea
  • The wishes should be saved to Community Wishlist/Focus areas/FA123 where 123 is the auto-incrementing wish title (T392001)
  • The Codex-styled success message should be shown after saving, just like as is done for wishes
  • Should be able to edit a focus area by browsing to i.e. Special:EditFocusArea/F123.

Derived Requirement
Ensure that users can create and edit focus areas using Special:EditFocusArea, with each focus area saved to Community Wishlist/Focus areas/FA### using an auto-incrementing ID, and that a Codex-styled success message is displayed upon saving. Users must also be able to edit existing focus areas by navigating directly to Special:EditFocusArea/###.

Test Steps

Test Case 1: Ensure new focus area can be created via Special\:EditFocusArea

  1. Navigate to Special:EditFocusArea on the beta wiki.
  2. Fill in all required fields in the form.
  3. Submit the form.
  4. ✅❓❌⬜ AC1: Confirm that a new page is created at Community Wishlist/Focus areas/FA###, where ### is the next available number.
  5. ✅❓❌⬜ AC2: Confirm that a Codex-styled success message is shown after saving.

Test Case 2: Ensure focus area is saved to correct path with auto-incrementing title

  1. Submit a new focus area through Special:EditFocusArea.
  2. ✅❓❌⬜ AC3: Confirm that the page is saved under the correct path and follows the FA### naming convention.

Test Case 3: Ensure existing focus area can be edited using 'Edit with form' tab

  1. Navigate to an existing focus area page (e.g., Community Wishlist/Focus areas/FA123).
  2. Click the "Edit with form" tab.
  3. Make edits and submit.
  4. ✅❓❌⬜ AC4: Confirm that the changes are saved and reflected on the focus area page.

Test Case 4: Ensure existing focus area can be edited by visiting Special\:EditFocusArea/### directly

  1. Visit a known focus area (e.g., Community Wishlist/Focus areas/FA2).
  2. Navigate to Special:EditFocusArea/22.
  3. Make updates in the form and submit.
  4. ✅❓❌⬜ AC5: Confirm the updates are saved and reflected correctly on the corresponding focus area page.

QA Results -commtech.toolforge

Event Timeline

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

[mediawiki/extensions/CommunityRequests@master] Further abstract wishes and focus areas, add Special:EditFocusArea

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

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

[mediawiki/extensions/CommunityRequests@master] SpecialEditFocusArea

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

Change #1164638 abandoned by MusikAnimal:

[mediawiki/extensions/CommunityRequests@master] Further abstract wishes and focus areas and add Special:EditFocusArea

Reason:

squashed into I50a9798806d5963706f6d972837bea0e86a4d1ae

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

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

[mediawiki/extensions/CommunityRequests@master] DescriptionSection: use props instead of isWish checks

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

Change #1165637 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] Add SpecialEditFocusArea and focus area detail page; add voting sections

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

Change #1167305 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] DescriptionSection: use props instead of isWish checks

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

@MusikAnimal Please review AC2-AC5, thanks!

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):
https://commtech.toolforge.org/Special:EditFocusArea
https://commtech.toolforge.org/Community_Wishlist/Focus_areas/FA2
https://commtech.toolforge.org/Community_Wishlist/Focus_areas/FA3

Test Steps

Test Case 1: Ensure new focus area can be created via Special\:EditFocusArea

  1. Navigate to Special:EditFocusArea on the commtech.toolforge.
  2. Fill in all required fields in the form.
  3. Submit the form.
  4. AC1: Confirm that a new page is created at Community Wishlist/Focus areas/FA###, where ### is the next available number.

  1. AC2: Confirm that a Codex-styled success message is shown after submitting.

No Success message is shown after submitting
See AC1

Test Case 2: Ensure focus area is saved to correct path with auto-incrementing title

  1. Submit a new focus area through Special:EditFocusArea.
  2. AC3: Confirm that the page is saved under the correct path and follows the FA### naming convention.

Should the numbers (e.g. 3) be lined up with the rest or is that fine as it is?

2025-07-14_10-36-07.png (1×936 px, 161 KB)

Test Case 3: Ensure existing focus area can be edited using 'Edit with form' tab

  1. Navigate to an existing focus area page (e.g., Community Wishlist/Focus areas/FA123).
  2. Click the "Edit with form" tab.
  3. Make edits and submit.
  4. AC4: Confirm that the changes are saved and reflected on the focus area page.

Are you talking about the "Edit with form" tab, that it would be "Edit" and "Edit source" like the video? Also when editing a focus area, should the "Your edit was saved" stick out more? Maybe a different background color?

Test Case 4: Ensure existing focus area can be edited by visiting Special\:EditFocusArea/### directly

  1. Visit a known focus area (e.g., Community Wishlist/Focus areas/FA123).
  2. Navigate to Special:EditFocusArea/123.
  3. Make updates in the form and submit.
  4. AC5: Confirm the updates are saved and reflected correctly on the corresponding focus area page.

After editing, I did not see a save edit message.

GMikesell-WMF updated the task description. (Show Details)
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.

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

[mediawiki/extensions/CommunityRequests@master] init.js: show post-edit success message for focus areas

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

  1. AC2: Confirm that a Codex-styled success message is shown after submitting.

Fixed with r1169759

Should the numbers (e.g. 3) be lined up with the rest or is that fine as it is?

2025-07-14_10-36-07.png (1×936 px, 161 KB)

That's just the font we use, it's expected. See https://en.wikipedia.org/wiki/A3 for example.

Are you talking about the "Edit with form" tab, that it would be "Edit" and "Edit source" like the video? Also when editing a focus area, should the "Your edit was saved" stick out more? Maybe a different background color?

Sorry, I thought I had removed that acceptance criterion. I'll add the "Edit with form" tab in a different task/patch.

For this task though, I will add a "Edit focus area" button to parity what is done for wishes. This button should only be shown for wishlist managers.

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

[mediawiki/extensions/CommunityRequests@master] ApiFocusAreaEdit: Require manage-wishlist right to use

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

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

[mediawiki/extensions/CommunityRequests@master] FocusAreaSection.vue: add 'Unassigned' option to remove FAs from wishes

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

Change #1170201 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] ApiFocusAreaEdit: Require manage-wishlist right to use

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

Change #1171257 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] FocusAreaSection.vue: add 'Unassigned' option to remove FAs from wishes

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

Change #1169759 merged by jenkins-bot:

[mediawiki/extensions/CommunityRequests@master] init.js: show post-edit success message for focus areas

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

Note that there are no longer buttons for "Edit focus area" and "Discuss this focus area" on focus area pages. That will be superseded by T400187.

MusikAnimal changed the task status from Open to In Progress.Aug 4 2025, 7:10 PM

@MusikAnimal Everything looks pretty good as seen in the screenshots/videos. I did come across one minor possible issue in AC2 though.

Test Result - commtech.toolforge

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

Test Artifact(s):
https://commtech.toolforge.org/Special:EditFocusArea
https://commtech.toolforge.org/Community_Wishlist/Focus_areas/FA2
https://commtech.toolforge.org/Community_Wishlist/Focus_areas/FA4

Test Steps

Test Case 1: Ensure new focus area can be created via /Special:EditFocusArea

  1. Navigate to /Special:EditFocusArea on the commtech.toolforge.
  2. Fill in all required fields in the form.
  3. Submit the form.
  4. AC1: Confirm that a new page is created at Community Wishlist/Focus areas/FA###, where ### is the next available number.

  1. AC2: Confirm that a Codex-styled success message is shown after submitting.

UPDATE: ✅ per T397488#11063108
Message now shows but is that check mark supposed to look like that or a green circle check like the wishes?

2025-08-05_16-26-24.png (530×877 px, 98 KB)

Test Case 2: Ensure focus area is saved to correct path with auto-incrementing title

  1. Submit a new focus area through Special:EditFocusArea.
  2. AC3: Confirm that the page is saved under the correct path and follows the FA### naming convention.

2025-08-05_16-29-53.png (693×1 px, 171 KB)

Test Case 3: Ensure existing focus area can be edited using 'Edit with form' tab

  1. Navigate to an existing focus area page (e.g., Community Wishlist/Focus areas/FA#).
  2. Click the "Edit with form" tab.
  3. Make edits and submit.
  4. AC4: Confirm that the changes are saved and reflected on the focus area page.

Test Case 4: Ensure existing focus area can be edited by visiting Special\:EditFocusArea/### directly

  1. Visit a known focus area (e.g., Community Wishlist/Focus areas/FA#).
  2. Navigate to /Special:EditFocusArea/FA4.
  3. Make updates in the form and submit.
  4. AC5: Confirm the updates are saved and reflected correctly on the corresponding focus area page.

@MusikAnimal Everything looks pretty good as seen in the screenshots/videos. I did come across one minor possible issue in AC2 though.

  1. AC2: Confirm that a Codex-styled success message is shown after submitting.

Message now shows but is that check mark supposed to look like that or a green circle check like the wishes?

F65718328

This is a Codex bug, T398529: Message: icons can get cut off depending on message text length, so you can disregard it for now.

Ok, that sounds great, I'll mark this task as Resolved then. Thanks for all your work!

GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF updated the task description. (Show Details)