Page MenuHomePhabricator

[web] Add spoiler rule to simpleMarkdownRules
ClosedPublic

Authored by rohan on Nov 7 2022, 11:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 31 2024, 8:53 AM
Unknown Object (File)
Mar 31 2024, 8:53 AM
Unknown Object (File)
Mar 31 2024, 8:53 AM
Unknown Object (File)
Mar 31 2024, 8:48 AM
Unknown Object (File)
Feb 27 2024, 5:58 AM
Unknown Object (File)
Feb 20 2024, 12:56 PM
Unknown Object (File)
Feb 19 2024, 9:53 PM
Unknown Object (File)
Feb 18 2024, 2:58 AM

Details

Summary

We add the rule to web/markdown/rules.react.js in order to parse content enclosed within the || ... || characters to be spoilers. This is the web implementation of the spoiler feature.

Linear: https://linear.app/comm/issue/ENG-2190/add-spoiler-rule-to-simplemarkdownrules-in-webmarkdownrulesreactjs

Test Plan

Looked at the output in the inspect element tab on a specific message that has spoiler content. For now, until the next diff, the spoiler content is enclosed within span tags, signifying that the spoiler parse rule is working.

Spoiler Rule.png (1×2 px, 508 KB)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan edited the test plan for this revision. (Show Details)
rohan attached a referenced file: F226270: Spoiler Rule.png. (Show Details)
rohan requested review of this revision.Nov 7 2022, 11:57 AM

Looks like it matches D5347 (would've been helpful to link since the changes to native/markdown/rules.react.js haven't been landed in the repo)

This revision is now accepted and ready to land.Nov 8 2022, 7:14 AM
In D5546#164711, @atul wrote:

Looks like it matches D5347 (would've been helpful to link since the changes to native/markdown/rules.react.js haven't been landed in the repo)

Makes sense, thanks for the heads up