Page MenuHomePhabricator

[web] Navigate to the settings on click
ClosedPublic

Authored by tomek on Mar 4 2022, 9:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 12, 4:26 AM
Unknown Object (File)
Nov 17 2024, 1:41 AM
Unknown Object (File)
Nov 16 2024, 11:40 PM
Unknown Object (File)
Nov 14 2024, 8:50 AM
Unknown Object (File)
Nov 14 2024, 8:50 AM
Unknown Object (File)
Nov 5 2024, 9:44 PM
Unknown Object (File)
Nov 3 2024, 1:22 PM
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
Lint Not Applicable
Unit
Tests Not Applicable

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.