Split the 2,000-line Settings page into section components

未关闭
#3,934 5 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@srnsksyp 已经在做这个了。

开始于 2026年11月29日。

  • #3938 来自 @srnsksyp —— 未关闭

评估

这个 Issue 还没有评估数据。

描述

level 2 level:intermediate status:assigned type:refactor
Summary

src/app/dashboard/settings/page.tsx is about 2,100 lines in one component. Every Settings change touches the same file, so contributors' PRs keep conflicting with each other (privacy, webhooks, sharing and translation PRs all hit it this week), and it's hard to review or test one section.

Expected outcome

Move each section into its own component under src/components/settings/ (for example Profile, Privacy and visibility, Notifications and Discord, Heatmap colours, Language, Integrations), keeping page.tsx as the layout that loads settings once and passes them down. Use the shared useUserSettings hook (#3913) instead of a separate fetch where it fits.

Pure move, no behaviour or design changes in this PR.

Acceptance criteria
  • page.tsx under ~300 lines
  • No visible change: before/after screenshots of Settings at 1280px and 390px
  • Existing settings e2e tests (e2e/settings.spec.js) and unit tests pass unchanged
  • Comment on this issue before starting; it touches a hot file, so only one person should take it
主要语言
TypeScript
星标
246
派生
436
平均合并
9 小时 33 分钟
30 天内合并 PR
213

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Priyanshu-byte-coder/devtrack 的其他 Issue

查看 Priyanshu-byte-coder/devtrack 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。