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
F3197138: D3794.id11811.diff
Sat, Nov 9, 7:25 AM
F3185281: D3794.diff
Fri, Nov 8, 12:45 PM
Unknown Object (File)
Thu, Nov 7, 4:24 PM
Unknown Object (File)
Tue, Oct 22, 11:15 AM
Unknown Object (File)
Tue, Oct 22, 11:15 AM
Unknown Object (File)
Tue, Oct 22, 11:15 AM
Unknown Object (File)
Tue, Oct 22, 2:05 AM
Unknown Object (File)
Mon, Oct 21, 11:37 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.