Skip to content

Fix Issue #113 and Issue #114#115

Merged
yyg-max merged 6 commits intolinux-do:masterfrom
gophlet:master
Aug 31, 2025
Merged

Fix Issue #113 and Issue #114#115
yyg-max merged 6 commits intolinux-do:masterfrom
gophlet:master

Conversation

@gophlet
Copy link
Contributor

@gophlet gophlet commented Jul 23, 2025

例行检查

  • 我已阅读并理解 贡献者公约
  • 我已阅读并同意 贡献者许可协议 (CLA),确认我的贡献将根据项目的 MIT 许可证进行许可;
  • 我知晓如果此 PR 并不做出实质性更改,或可被认为是为了PR被合并而提交PR的,则可能不会被合并。

关联信息

resolves #113
resolves #114

变更内容

主要改动:

  • 完善主题切换按钮的渲染逻辑;
  • 完善宽屏幕模式下“主题切换”按钮交互细节。

原因分析:这是由于使用了 title 作为 key,当 title 发生变化时,导致按钮被销毁,继而引发动画状态消失;
解决办法:在兼容原有 title 属性的基础上,添加 tooltip 属性作为替代。

其他改动:

  • 使用 useCallback 和 React.memo 优化组件性能;
  • 包名不符合命名规范,由于是 private 包,故此改动不具有破坏性;
  • 添加 lint:fix-staged 脚本,避免全量 lint:fix;
  • 集中管理重复配置项。

变更原因

  • 缺陷修复;
  • 性能优化;
  • 提升项目规范性和可维护性。

附加信息

图片

@chenyme chenyme self-requested a review July 23, 2025 09:04
@github-actions
Copy link

github-actions bot commented Aug 8, 2025

此 PR 长期无活动,将在 14 天后自动关闭。如需继续讨论请回复

@github-actions github-actions bot added the Stale label Aug 8, 2025
@github-actions github-actions bot removed the Stale label Aug 12, 2025
@github-actions
Copy link

此 PR 长期无活动,将在 14 天后自动关闭。如需继续讨论请回复

@github-actions github-actions bot added the Stale label Aug 29, 2025
@yyg-max yyg-max merged commit ef65fba into linux-do:master Aug 31, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: 宽屏幕模式下“主题切换”按钮交互异常 bug: 主题切换按钮的渲染逻辑有误

3 participants