HomePhabricator
Diffusion Comm e752e3692d6d

[web] Replace `EnumSettingsOption` `description` prop with `statements` prop

Description

[web] Replace EnumSettingsOption description prop with statements prop

Summary:
description was a $ReadOnlyArray<[string, boolean]> with a statement and a boolean indicating whether the statement was true.

Replaced description with statements which has type: $ReadOnlyArray<{statement: string, isStatementValid: boolean}>

I think this is a more accurate prop name, since description makes me think we have a continuous blob of text when we really have discrete statements and maybe (depending on whether isStatementValid isn't null/undefined) some associated styling to indicate whether the statement is true or false.

Also explicitly named and typed the contents of the $ReadOnlyArray so things are a bit more "self-documenting"


Depends on D4047

Test Plan:

  1. Opened the NotificationsModal
  2. Ensured that things worked and looked as expected.

Reviewers: def-au1t, palys-swm, benschac

Reviewed By: palys-swm

Subscribers: ashoat, Adrian, yayabosh

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

Details

Provenance
atulAuthored on May 15 2022, 11:57 AM
Reviewer
tomek
Differential Revision
D4048: [web] Replace `EnumSettingsOption` `description` prop with `statements` prop
Parents
rCOMMf997677296b6: [services] Move generateUUID to global tools
Branches
Unknown
Tags
Unknown