Page MenuHomePhabricator

[web] Move `onDelete` up from `ThreadSettingsModal` to `ConnectedThreadSettingsModal`
ClosedPublic

Authored by atul on Apr 20 2022, 2:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 5, 1:10 AM
Unknown Object (File)
Wed, Sep 4, 11:50 PM
Unknown Object (File)
Mon, Aug 26, 12:17 PM
Unknown Object (File)
Mon, Aug 26, 12:17 PM
Unknown Object (File)
Mon, Aug 26, 12:17 PM
Unknown Object (File)
Mon, Aug 26, 12:17 PM
Unknown Object (File)
Tue, Aug 20, 11:53 AM
Unknown Object (File)
Aug 13 2024, 10:50 PM

Details

Summary

Move onDelete out from inner class component to outer "Connected" functional component.

As part of the work to refactor ThreadSettingsModal... specifically to turn it into a functional component


Depends on D3783

Test Plan
  1. Create delete-able thread
  2. Navigate to ThreadSettingsModal and go to "Delete" tab
  3. Try to delete thread and ensure that it works as expected

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Apr 20 2022, 2:25 PM
tomek added inline comments.
web/modals/threads/thread-settings-modal.react.js
466 ↗(On Diff #11678)

Why do we prevent default here and not in the other places?

This revision is now accepted and ready to land.Apr 21 2022, 3:20 AM
web/modals/threads/thread-settings-modal.react.js
466 ↗(On Diff #11678)

It looks like we do event.preventDefault() for onDelete and onSubmit which are callbacks that are passed to the onClick prop of <Button /> components.

It looks like we don't do event.preventDefault()for the onChange callbacks passed to the <Input /> components.