Page MenuHomePhabricator

[web] Introduce danger zone route
ClosedPublic

Authored by tomek on May 19 2022, 8:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 10:22 AM
Unknown Object (File)
Mon, Oct 28, 3:03 AM
Unknown Object (File)
Mon, Oct 28, 3:03 AM
Unknown Object (File)
Mon, Oct 28, 3:03 AM
Unknown Object (File)
Mon, Oct 28, 3:02 AM
Unknown Object (File)
Mon, Oct 28, 2:50 AM
Unknown Object (File)
Sat, Oct 26, 10:56 PM
Unknown Object (File)
Fri, Oct 18, 5:40 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
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
web/sidebar/settings-switcher.react.js
17 ↗(On Diff #12955)

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 ↗(On Diff #12955)

Thanks for explaining

46 ↗(On Diff #12955)

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 ↗(On Diff #12955)

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.