Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

适配移动端UI界面 #928

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

适配移动端UI界面 #928

wants to merge 24 commits into from

Conversation

1pone
Copy link

@1pone 1pone commented Jan 22, 2025

保留桌面端页面结构不变,对移动端UI界面进行适配

  1. 添加移动端响应式兼容
  2. 使用 react-calendar-heatmap 替代 react-activity-calendar
  3. 修改移动端重定向,原本的移动端跳转页面改为产品介绍页面,现在点击 logo 进行跳转
  4. 词典语言 flag 图片改为 emoji
  5. 更新部分依赖包版本

Copy link

vercel bot commented Jan 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
qwerty-learner ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 9:46am

@RealKai42
Copy link
Owner

非常感谢贡献!
这是个较大的 PR,我会尽快开始 review

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 56 out of 69 changed files in this pull request and generated no comments.

Files not reviewed (13)
  • package.json: Language not supported
  • src/index.css: Language not supported
  • src/pages/Analysis/components/calendar-heatmap-styles.css: Language not supported
  • src/components/DonateCard/index.tsx: Evaluated as low risk
  • src/pages/ErrorBook/RowDetail/DataTag.tsx: Evaluated as low risk
  • src/pages/ErrorBook/HeadWrongNumber.tsx: Evaluated as low risk
  • src/index.tsx: Evaluated as low risk
  • src/pages/Analysis/components/LineCharts.tsx: Evaluated as low risk
  • src/pages/ErrorBook/index.tsx: Evaluated as low risk
  • src/pages/ErrorBook/ErrorRow.tsx: Evaluated as low risk
  • src/components/Tooltip/index.tsx: Evaluated as low risk
  • src/pages/Analysis/components/KeyboardWithBarCharts.tsx: Evaluated as low risk
  • src/pages/ErrorBook/RowDetail/index.tsx: Evaluated as low risk
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CleanShot 2025-01-22 at 22 51 30@2x
更换热力图的原因是? 看起来不如之前的美观

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

更换的主要原因是原本的热力图组件在低版本 safari 可能会导致白屏,刚好在我的电脑和手机设备都会报错,导致无法进行开发,具体可以参考这两个issues #919grubersjoe/react-activity-calendar#162
新的组件美观上可以对样式再进行微调,如果是功能上还有需求的话可以也可以考虑使用 cal-heatmap,这个组件看起来可自定义程度更高,例如滚动翻页等可能在移动端会用得上

@@ -16,17 +13,18 @@ export type LanguageTabOption = {
}

const options: LanguageTabOption[] = [
{ id: 'en', name: '英语', flag: enFlag },
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里使用图片是为了避免 emoji 在不同平台渲染方式的不同

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我认为emoji可能会更好,不同平台渲染可能有区别,但是表达的意思应该是一致且明确的,这就足够了。而且后续新加的语言应该都可以在emoji中找到对应的,不需要重新找图片素材,也避免了找的图片尺寸或者分辨率不一致导致的不统一问题(例如现在的印度尼西亚flag尺寸就和其他的不一致,看起来特别怪)

@1pone
Copy link
Author

1pone commented Jan 24, 2025

对部分遗漏的页面补充了移动端适配
恢复了 dexie 等相关的包版本
同步当前master分支并解决冲突

同步过程中看到了一个新的变更,新增的导出按钮在移动端展示效果不好,而且在 table header 中放操作按钮感觉有点怪,是否考虑移动这个按钮到别的地方
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants