Page MenuHomePhabricator

[web] Introduce danger zone route
ClosedPublic

Authored by tomek on May 19 2022, 8:11 AM.
Tags
None
Referenced Files
F2181879: D4093.id13047.diff
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
Unknown Object (File)
Tue, Jun 18, 9:59 AM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.