Page MenuHomePhabricator

[web] Make `failed` `boolean` in `PendingMultimediaUpload`
ClosedPublic

Authored by abosh on Aug 19 2022, 2:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 4:20 PM
Unknown Object (File)
Sun, Apr 21, 4:20 PM
Unknown Object (File)
Sun, Apr 21, 4:20 PM
Unknown Object (File)
Sun, Apr 21, 4:20 PM
Unknown Object (File)
Sun, Apr 21, 4:18 PM
Unknown Object (File)
Fri, Apr 19, 10:51 AM
Unknown Object (File)
Sat, Apr 13, 8:03 PM
Unknown Object (File)
Sat, Apr 13, 8:02 PM
Subscribers

Details

Summary

The same as D4890, but for web. Since we were already using failed as a truthy/falsy type (with the exception of when we wanted to store an error message), converting it to a boolean makes more sense.

Doesn't actually depend on D4890, but adding it to the stack since they're closely related.

Test Plan

Searched through the codebase for all usages of PendingMultimediaUpload for this refactor. Sent some messages on web and console.log(...)'d some things, and everything looked as expected.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

abosh added inline comments.
web/input/input-state-container.react.js
867 ↗(On Diff #15797)

I think using a ternary here is fine since we're not returning JSX, only strings, and it isn't too long or complicated.

Remove failureMessage prop (see discussion on D4890).

This revision is now accepted and ready to land.Aug 25 2022, 2:27 AM