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)
Wed, Nov 13, 1:36 PM
Unknown Object (File)
Mon, Nov 11, 8:15 PM
Unknown Object (File)
Mon, Nov 11, 6:00 PM
Unknown Object (File)
Wed, Nov 6, 3:58 PM
Unknown Object (File)
Wed, Nov 6, 3:34 PM
Unknown Object (File)
Oct 27 2024, 2:16 PM
Unknown Object (File)
Sep 27 2024, 8:21 PM
Unknown Object (File)
Sep 27 2024, 8:21 PM

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
Branch
spoiler_web
Lint
No Lint Coverage
Unit
No Test Coverage

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