frontend: Split Settings page into tabbed sub-pages - #444
Conversation
The settings page had grown into a single ~560-line component mixing account info, profile, timezone, sustaining membership, MFA devices, and API keys. Split it into Profile, Security, API Keys, and Billing tabs, each in its own component, so future settings features have a natural place to live instead of growing the monolith further. Each tab only mounts (and fetches its data) when selected, instead of all four fetching eagerly on page load as before. Closes pschlan#256.
|
Looks good in principle, however the first tab looks a bit odd UI-wise, since the tab header component visually attaches to the first box only. This is slightly confusing as it's not obvious that the other two boxes below are also part of the tab. We should probably use a single box per tab and group contents by fieldsets instead of boxes, e.g. like in the job editor. |
Addresses review feedback on pschlan#444: the Profile tab previously used three separate Paper boxes, and the tab's underline only visually connected to the first one, making it unclear that the other two belonged to the same tab. Now the whole tab content lives in a single Paper, with each section (Account, Profile, Timezone) grouped by a fieldset/legend, matching the pattern already used in JobEditor.
|
Good catch, thanks. Fixed in e7f6126: the Profile tab now lives in a single |
|
Thanks, but I'm not really happy yet with how it looks and the inconsistency between the different tabs. But right now, I also don't have a good idea how to resolve it. Will have to spend some time experimenting. |
|
Sounds good, no rush. I'll keep an eye on this PR — happy to try out different layout approaches or run tests on my end whenever you have something you'd like to experiment with. |
Summary
Closes #256.
The Settings page had grown into a single ~560-line component mixing account info, profile, timezone, sustaining membership, MFA devices, and API keys. This splits it into four tabs, each in its own component:
SettingsProfile.jsx)SettingsSecurity.jsx)SettingsApiKeys.jsx)Config.sustainingMembership.enableis true (SettingsBilling.jsx)Settings.jsxis now a thin container: breadcrumbs, heading actions (change email/password, delete account — these stay global since they're account-wide, not tab-specific), and the tab bar. Each tab component only mounts (and fetches its data) when selected, rather than all four fetching eagerly on every page load as happened with the original single-loading-gate design.This follows the existing local-state
Tabspattern already used inJobEditor.jsxandJobTestRun.jsx, rather than introducing routed sub-pages — happy to switch to/settings/security-style routes instead if you'd prefer deep-linkable tabs.New i18n strings (
settings.tabs.*) were added toenanddeonly, following the convention from recent PRs (#421, #423, #429, #441) — other locales will fall back to English until translated.Test plan
npm test— all 141 existing tests pass (pre-existing, unrelatedApp.test.jsfailure due to a Jest/recharts ESM parsing issue, confirmed present onmastertoo)npm run build— compiles cleanly, no new warnings