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)
Fri, Nov 22, 7:22 AM
Unknown Object (File)
Fri, Nov 22, 1:39 AM
Unknown Object (File)
Fri, Nov 8, 5:05 AM
Unknown Object (File)
Fri, Nov 8, 3:43 AM
Unknown Object (File)
Mon, Oct 28, 5:09 AM
Unknown Object (File)
Mon, Oct 28, 5:08 AM
Unknown Object (File)
Mon, Oct 28, 5:08 AM
Unknown Object (File)
Mon, Oct 28, 5:05 AM
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