Page MenuHomePhabricator

[web] Introduce danger zone route
ClosedPublic

Authored by tomek on May 19 2022, 8:11 AM.
Tags
None
Referenced Files
F2206980: D4093.diff
Sun, Jul 7, 5:07 AM
Unknown Object (File)
Fri, Jul 5, 7:43 PM
Unknown Object (File)
Wed, Jul 3, 6:29 PM
Unknown Object (File)
Sat, Jun 29, 6:38 AM
Unknown Object (File)
Thu, Jun 27, 7:54 AM
Unknown Object (File)
Thu, Jun 27, 4:56 AM
Unknown Object (File)
Mon, Jun 24, 4:01 PM
Unknown Object (File)
Tue, Jun 18, 9:59 AM

Details

Summary

Add a new route for danger zone. It looks like this is the first time we introduce a route consisting of two words, but using hyphens sounds like a better approach compared to underscores.

danger_zone.png (786×904 px, 44 KB)

Depends on D4091

Test Plan

Open settings and check if two nav items are displayed. Try switching between them - always the active should be highlighted. When danger zone is opened, an empty page should be displayed.

Diff Detail

Repository
rCOMM Comm
Branch
ENG-835
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
web/sidebar/settings-switcher.react.js
17

This whitespace change is intentional: we're grouping callbacks and items together for each tab

tomek requested review of this revision.May 19 2022, 8:16 AM

Looks good!

web/sidebar/settings-switcher.react.js
17

Thanks for explaining

46

Maybe a newline after this one?

Little hard to see that there's another const declaration and lines 47-54 aren't part of the same block

This revision is now accepted and ready to land.May 19 2022, 11:07 AM
web/sidebar/settings-switcher.react.js
46

Lines 18-35 and 37-54 are grouped together: each group contains a callback and navigation item. For me it makes sense to keep this grouping. Do you suggest this code would be more readable if every variable declaration was separated by a newline from another? I don't think it is a good idea, but if you feel strongly I can do that.

@ashoat I'm adding a new route here and wanted to make sure that you're ok with /danger-zone

This revision now requires review to proceed.May 23 2022, 2:19 AM

Thanks!! Makes sense to me

This revision is now accepted and ready to land.May 23 2022, 10:33 AM
This revision was automatically updated to reflect the committed changes.