Page MenuHomePhabricator

[landing] introduce multi paragraph functionality in CompetitorFeature
ClosedPublic

Authored by ginsu on Jul 18 2023, 1:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 11, 12:24 PM
Unknown Object (File)
Thu, Apr 11, 9:51 AM
Unknown Object (File)
Thu, Apr 11, 9:51 AM
Unknown Object (File)
Thu, Apr 11, 9:51 AM
Unknown Object (File)
Mar 27 2024, 11:54 PM
Unknown Object (File)
Feb 10 2024, 7:04 PM
Unknown Object (File)
Feb 10 2024, 7:04 PM
Unknown Object (File)
Feb 10 2024, 7:02 PM
Subscribers

Details

Summary

The new copy for the long matrix feature comparison descriptions introduces multiple paragraphs. This diff introduces new logic in CompetitorFeature so that it can handle spacing multiple paragraphs the "right way" (not using spaces/newlines, but instead using separate elements and spacing them through margin/padding)

Depends on D8024

Test Plan

Please see the screenshots/demo below:

Single paragraph:

Screenshot 2023-07-18 at 4.36.35 PM.png (2×3 px, 1020 KB)

multi paragraph:

Screenshot 2023-07-18 at 4.36.32 PM.png (2×3 px, 1011 KB)

demo:

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu requested review of this revision.Jul 18 2023, 1:36 PM
kamil added inline comments.
landing/competitor-feature.react.js
62 ↗(On Diff #28790)

nit: reduce indentation (there is no need for else if you using return in if)

78–92 ↗(On Diff #28790)

can you refactor this to an outside function, taking description and styles as arguments to reduce code duplication?

This revision is now accepted and ready to land.Jul 19 2023, 5:21 AM
ginsu edited the test plan for this revision. (Show Details)

rebase before landing and address comments