Page MenuHomePhabricator

[native] Add spoiler style to native markdown styles
ClosedPublic

Authored by rohan on Oct 14 2022, 7:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 2, 10:06 PM
Unknown Object (File)
Thu, May 2, 10:06 PM
Unknown Object (File)
Thu, May 2, 10:06 PM
Unknown Object (File)
Thu, May 2, 10:05 PM
Unknown Object (File)
Thu, May 2, 10:05 PM
Unknown Object (File)
Thu, May 2, 10:05 PM
Unknown Object (File)
Thu, May 2, 8:24 PM
Unknown Object (File)
Mar 31 2024, 7:24 AM
Subscribers

Details

Summary

We add the styles for spoiler text on native by adding a style for both the text color and the background to make the spoilers uniquely
display.

https://linear.app/comm/issue/ENG-1984/add-spoiler-style-to-native-markdown-styles

Depends on D5347

Test Plan

Visually works as expected and the spoiler styles apply to only the spoiler text.

Spoiler Style.png (2×1 px, 246 KB)

Diff Detail

Repository
rCOMM Comm
Branch
spoiler
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: F200186: Spoiler Style.png. (Show Details)
Harbormaster returned this revision to the author for changes because remote builds failed.Oct 14 2022, 7:55 PM
Harbormaster failed remote builds in B12813: Diff 17597!
rohan requested review of this revision.Oct 14 2022, 8:03 PM
rohan edited the summary of this revision. (Show Details)
ginsu requested changes to this revision.Oct 15 2022, 10:51 AM

Code looks good, but I think about changing the black to something like a dark gray. I think the black looks a bit harsh with the black background outside the message container. Defer to @atul for second take as well

This revision now requires changes to proceed.Oct 15 2022, 10:51 AM
In D5373#158958, @ginsu wrote:

Code looks good, but I think about changing the black to something like a dark gray. I think the black looks a bit harsh with the black background outside the message container. Defer to @atul for second take as well

Good point I agree after taking another look at it

Update spoiler text color

Simulator Screen Shot - iPhone 14 Pro - 2022-10-15 at 19.49.06.png (2×1 px, 245 KB)

Not sure if this is the "final" styling for spoilers, but looks good for now.


I think we might want to round the corners and kind of match the styling of code blocks (eg same color)

I think this is a fine style for now, we can revisit later

native/themes/colors.js
78–79

Do we really need two separate styles for this? The whole point is to make the text not appear against the background, right?

color looks a lot better, I agree with @ashoat and I think we can get rid of spoilerText style. I would address that before landing

This revision is now accepted and ready to land.Oct 17 2022, 6:45 AM
native/themes/colors.js
78–79

So I was originally thinking yes, because we wanted the text-color and background-color to be the same. Though now that I'm thinking about it, we can just have one common color spoiler and make both the text-color and background-color properties reference that color. Thanks for pointing it out - I can update this diff to do that

Create just one style for the spoiler text and background

Rebase and resolve conflicts