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
F3174376: D3794.diff
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
Unknown Object (File)
Mon, Oct 14, 6:14 PM
Unknown Object (File)
Sep 19 2024, 9:31 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
Branch
actuallylandapril21 (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

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.