Page MenuHomePhabricator

Do not prompt for password when deleting thread
ClosedPublic

Authored by marcin on Dec 29 2022, 6:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 23, 1:12 AM
Unknown Object (File)
Fri, Dec 20, 7:43 AM
Unknown Object (File)
Fri, Dec 20, 7:25 AM
Unknown Object (File)
Fri, Dec 20, 7:20 AM
Unknown Object (File)
Fri, Dec 20, 7:12 AM
Unknown Object (File)
Fri, Dec 20, 7:07 AM
Unknown Object (File)
Fri, Dec 20, 6:47 AM
Unknown Object (File)
Fri, Dec 20, 1:24 AM
Subscribers

Details

Summary

This differential prevents native UI from prompting for password when deleting thread for any account

Test Plan

Test plan is the same as for previous differential in the stack, but now we expect password prompt not to show (so do not have to provide any password)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested changes to this revision.Dec 29 2022, 7:11 AM
tomek added inline comments.
native/chat/settings/delete-thread.react.js
62 ↗(On Diff #20340)

Can we delete this parameter?

67 ↗(On Diff #20340)

It seems like we can delete the state completely

This revision now requires changes to proceed.Dec 29 2022, 7:11 AM

Remove all password references from delete-thread compoment

tomek requested changes to this revision.Dec 29 2022, 7:33 AM
tomek added inline comments.
native/chat/settings/delete-thread.react.js
120–121 ↗(On Diff #20341)

We can probably merge these now - a button is always enabled

171–172 ↗(On Diff #20341)

We shouldn't mention password at all. It seems like we can always go to the default branch.

This revision now requires changes to proceed.Dec 29 2022, 7:33 AM

Update styles and text displayed to the user

Adding @ashoat as a reviewer since now it involves changes in text displayed to the user.

native/chat/settings/delete-thread.react.js
171–172 ↗(On Diff #20341)

Not necessarily - when user does not have appropriate permissions invalid_credentials error is thrown. We should update if statement and alert message.

tomek added inline comments.
native/chat/settings/delete-thread.react.js
180 ↗(On Diff #20342)

As this is the only delete button class the name can be shortened

This revision is now accepted and ready to land.Dec 29 2022, 7:48 AM

Simplify delete thread button CSS name

Text seems okay. Given this is a visual diff, would be good to share a screenshot of the updated DeleteThread screen

Text seems okay. Given this is a visual diff, would be good to share a screenshot of the updated DeleteThread screen

New Delete Thread Screen

Zrzut ekranu 2022-12-30 o 12.24.52.png (2×1 px, 124 KB)

Message when permission is not sufficient

Zrzut ekranu 2022-12-30 o 12.27.22.png (2×1 px, 179 KB)

Although those screen shots are for SIWE accounts, conventional accounts work the same.