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)
Sun, Nov 17, 2:19 AM
Unknown Object (File)
Sun, Nov 17, 1:35 AM
Unknown Object (File)
Sun, Nov 17, 1:35 AM
Unknown Object (File)
Sun, Nov 17, 1:35 AM
Unknown Object (File)
Sat, Nov 16, 11:27 PM
Unknown Object (File)
Oct 22 2024, 3:19 PM
Unknown Object (File)
Oct 17 2024, 3:03 AM
Unknown Object (File)
Oct 17 2024, 3:03 AM
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