HomePhabricator
Diffusion Comm 6d618d08d183

[web] Introduce `styleStatementBasedOnValidity` to `EnumSettingsOptionInfo`

Tags
None
Referenced Files
F61753: 4005.png
May 25 2022, 8:08 AM
F61754: 30ce.png
May 25 2022, 8:08 AM
Subscribers
None

Description

[web] Introduce styleStatementBasedOnValidity to EnumSettingsOptionInfo

Summary:
We introduce the styleStatementBasedOnValidity prop to EnumSettingsOptionInfo so we can re-use the EnumSettingsOption and EnumSettingsOptionInfo component for both the NotificationsModal (which indicates whether statements are factual) and the ThreadSettingsPrivacyTab of the ThreadSettingsModal (which doesn't style statements based on whether they're true or false.. because they're all true).

This diff replaces D4047 which was more brittle and depended on the valid prop being optional. We were essentially trying to encode three different states into a boolean which was hacky. We decided that instead we should introduce a new prop that explicitly determines whether a statement is styled or not.

Test Plan:
Here's how the NotificationsModal looks:

4005.png (1×852 px, 97 KB)

Here's how the ThreadSettingsPrivacyTab looks:

30ce.png (986×700 px, 68 KB)

Reviewers: palys-swm, def-au1t, benschac

Reviewed By: palys-swm

Subscribers: ashoat, Adrian, yayabosh

Differential Revision: https://phabricator.ashoat.com/D4116

Details

Provenance
atulAuthored on May 24 2022, 8:06 AM
Reviewer
tomek
Differential Revision
D4116: [web] Introduce `styleStatementBasedOnValidity` to `EnumSettingsOptionInfo`
Parents
rCOMMb25f0b3ef65f: [services] Backup - Database manager - Add findLogItem
Branches
Unknown
Tags
Unknown