Page MenuHomePhabricator

[web] Navigate to the settings on click
ClosedPublic

Authored by tomek on Mar 4 2022, 9:18 AM.
Tags
None
Referenced Files
F3295888: D3343.diff
Sat, Nov 16, 11:40 PM
Unknown Object (File)
Thu, Nov 14, 8:50 AM
Unknown Object (File)
Thu, Nov 14, 8:50 AM
Unknown Object (File)
Tue, Nov 5, 9:44 PM
Unknown Object (File)
Sun, Nov 3, 1:22 PM
Unknown Object (File)
Oct 14 2024, 2:18 AM
Unknown Object (File)
Oct 14 2024, 2:18 AM
Unknown Object (File)
Oct 14 2024, 2:18 AM

Details

Summary

Navigate a user to account settings when an option is clicked.
Depends on D3342

Test Plan

Render the component instead of AppSwitcher. Open chat route - the My Account button shouldn't be highlighted. Click it - verify that the button is now highlighted and the the current route is settings/account.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Mar 4 2022, 9:23 AM
web/sidebar/settings-switcher.react.js
16 ↗(On Diff #10085)

nit: settings section feels a bit too specific. Would section make more sense?

This revision is now accepted and ready to land.Mar 7 2022, 6:59 AM
web/sidebar/settings-switcher.react.js
16 ↗(On Diff #10085)

In this case I think that being specific makes sense, as we would like this field to only have values available for the settings. If we plan to introduce a new tab with sections, then we need to limit valid values for that tab, so either introduce a new field, or create more complicated nav structure

{ tab: 'settings', section: 'account' | ... } | { tab: anotherTab, section: '...' }

But I'm not sure if that makes sense as we plan to use react navigation (or some other library) in near future

This revision was automatically updated to reflect the committed changes.