Page MenuHomePhabricator

Add spoiler rule to native in fullMarkdownRules
ClosedPublic

Authored by rohan on Oct 11 2022, 11:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 12:08 AM
Unknown Object (File)
Sat, Nov 30, 9:42 AM
Unknown Object (File)
Fri, Nov 29, 1:25 AM
Unknown Object (File)
Fri, Nov 29, 1:24 AM
Unknown Object (File)
Fri, Nov 29, 12:12 AM
Unknown Object (File)
Thu, Nov 28, 11:09 PM
Unknown Object (File)
Nov 25 2024, 10:49 AM
Unknown Object (File)
Nov 25 2024, 10:29 AM
Subscribers

Details

Summary

Add the spoiler rule for native to use the capture and parse functions from the previous diff, and return a <Text> ... </Text> React element with a spoiler style.

Linear Issue: https://linear.app/comm/issue/ENG-1983/add-spoiler-rule-to-fullmarkdownrules-in-nativemarkdownrulesreactjs

Depends on D5346

Test Plan

Tested the spoiler text being captured with a temporary spoiler style, and I will attach the photos below. ENG-1984 will handle the styling for the spoiler text.

Example:

Simulator Screen Shot - iPhone 14 Pro - 2022-10-11 at 14.39.22.png (2×1 px, 232 KB)

Simulator Screen Shot - iPhone 14 Pro - 2022-10-11 at 14.39.33.png (2×1 px, 276 KB)

Diff Detail

Repository
rCOMM Comm
Branch
spoiler
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu requested changes to this revision.Oct 11 2022, 12:41 PM
ginsu added inline comments.
native/markdown/styles.js
14–18 ↗(On Diff #17497)

I would get rid of this until this is more complete. From what I have been told, a diff should be able to be landed at any time, so we probably don't want any placeholder code

This revision now requires changes to proceed.Oct 11 2022, 12:41 PM
native/markdown/styles.js
14–18 ↗(On Diff #17497)

Good point - I'm going to be doing some testing for the previous diff to address some comments this afternoon, so once that's done I'll update this diff to remove the placeholder color.

Use the parse and match methods already present in SimpleMarkdown.

@ashoat This is what we discussed in our sync today

atul added a reviewer: ashoat. atul removed 1 blocking reviewer(s): atul.Oct 12 2022, 4:33 PM

Adding @ashoat as reviewer since

A.

It might be best for me to do a second-pass review of all Markdown diffs until @atul is able to get up to speed with the codebase
(https://phab.comm.dev/D4999)

And I'd still not consider myself fully up to speed with the markdown area of the codebase.

B.

@ashoat This is what we discussed in our sync today

Looks like there's already been some discussion about this approach

This revision is now accepted and ready to land.Oct 13 2022, 1:37 PM

Rebase and resolve conflicts