The wish and focus area view pages will have the HTML generated by the server. This would also include the voting button.
User story
As a wishlist participant, I want to be able to show my support to a wish so that the WMF knows which wish is important to me.
Enable supporting individual wishes. User should be able to support a wish with or without adding a comment and remove a support.
Acceptance criteria
- Add any necessary config settings, including one to control whether voting is enabled
- If enabled, add the voting button to the renderWish output
- In the BeforePageDisplay hook, load the voting module (if voting is enabled and we're on a wish or focus area page)
Designs:
Derived Requirement
Ensure that the voting Vue app is conditionally loaded on wish and focus area view pages. When voting is enabled via configuration, the page should display a voting button rendered by the Vue app, allowing users to support or remove support for a wish—with or without a comment. The voting module must be dynamically loaded using the BeforePageDisplay hook.
Test Steps
Test Case 1: Verify voting module is loaded and voting button is visible on wish page when voting is enabled
*Precondition: Voting feature flag is enabled via config ($wgCommunityRequestsWishVotingEnabled = true)*
- Log in to the beta wiki with a user account that has voting permissions.
- Navigate to a wish view page (e.g., Special:WishlistIntake/Community_Wishlist/Wishes/W1).
- ✅❓❌⬜ AC1: Verify that a voting button is visible inside the rendered wish view (as per Figma design).
- ✅❓❌⬜ AC2: Click the voting button and confirm that support is registered.
- ✅❓❌⬜ AC3: Optionally enter a comment and confirm that the comment is saved.
- ✅❓❌⬜ AC4: Click again to remove support and verify that the vote is withdrawn.
- ✅❓❌⬜ AC5: Reload the page and confirm that voting state persists as expected.
Test Case 2: Verify voting module is loaded and voting button is visible on focus area page when voting is enabled
- Navigate to a focus area view page (e.g., Community_Wishlist/Focus_areas/FA3).
- ✅❓❌⬜ AC6: Confirm that the Vue-based voting app is loaded.
- ✅❓❌⬜ AC7: Verify that a voting button is present and interactive.
- ✅❓❌⬜ AC8: Test supporting and removing support for the focus area.
- ✅❓❌⬜ AC9: Confirm UI updates immediately and is styled per Figma specs.
Test Case 3: Verify voting module is not loaded when voting is disabled
*Precondition: Voting is disabled via config ($wgCommunityRequestsWishVotingEnabled = false;, $wgCommunityRequestsFocusAreaVotingEnabled = false;)*
- Log in as any user in Local.
- Visit a wish or focus area view page.
- ✅❓❌⬜ AC10: AC10: Confirm that Vue voting app JavaScript is not loaded on the page.
QA Results - Commtech.toolforge/Local
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T388219#11059571 |
| 2 | ✅ | T388219#11059571 |
| 3 | ✅ | T388219#11069850 |
| 4 | ✅ | T388219#11059571 |
| 5 | ⬜ | T388219#11069850 |
| 6 | ✅ | T388219#11059571 |
| 7 | ✅ | T388219#11059571 |
| 8 | ⬜ | T388219#11069850 |
| 9 | ✅ | T388219#11069850 |
| 10 | ✅ | T388219#11069850 |

















