Page MenuHomePhabricator

Retain bold text formatting while adding a Wikipedia Preview
Closed, ResolvedPublic

Description

Problem

When adding a Wikipedia Preview to bold text, the bold formatting is lost, affecting the visual emphasis intended by the editor. Italicized or underline text is not affected by this issue.

Solution

Modify the Wikipedia Preview plugin to preserve the original text formatting when a preview is added.

Test Scenarios
  • Add a Wikipedia Preview to bold text; verify the bold formatting is preserved.
  • Add a Wikipedia Preview to italicized text; confirm italics remain intact.
  • Add previews to text with both bold and italicized formatting; both formats should be preserved.
Acceptance Criteria:
  • Text formatting is retained when a Wikipedia Preview is added.
  • The solution does not impact the plugin's performance or interfere with other formatting features.

QA Results - Wordpress Dev 6.5

Event Timeline

PWaigi-WMF triaged this task as Medium priority.Mar 13 2024, 1:38 PM

@hueitan I'm on the latest WordPress and Wikipreview as seen below but I'm still coming across the same issue with bold not working when selecting Wikipreview. Am I missing something?

Status: ❌ FAIL
Environment: WordPress Dev- 6.5; Wikipreview: 1.12.0; Commit: 72f4c09a097ddeb58e96d82e411a53cb43c77a10, Fri Apr 5 12:38:09 2024 -0400
OS: macOS Sonoma 14.2
Browser: Chrome 123
Skins. N/A
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://dev-test.local/philadelphia-eagles-test/

❌AC1: https://phabricator.wikimedia.org/T360002

@hueitan Both bold and italicized formats are both preserved as seen in the video below. I just need to ran npm build to have it fully integrated compared to without which is the video previously. I will move this to design sign-off. Thanks for all your work!

Status: ✅PASS
Environment: WordPress Dev- 6.5; Wikipreview: 1.12.0; Commit: 72f4c09a097ddeb58e96d82e411a53cb43c77a10, Fri Apr 5 12:38:09 2024 -0400
OS: macOS Sonoma 14.2
Browser: Chrome 123
Skins. N/A
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://dev-test.local/philadelphia-eagles-test/

✅AC1: https://phabricator.wikimedia.org/T360002