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

feat: add dumi-theme-mobile #287

Merged
merged 35 commits into from
Sep 11, 2020
Merged

feat: add dumi-theme-mobile #287

merged 35 commits into from
Sep 11, 2020

Conversation

xiaohuoni
Copy link
Member

@xiaohuoni xiaohuoni commented Aug 17, 2020

2020-08-28 16 23 51

@codecov
Copy link

codecov bot commented Aug 17, 2020

Codecov Report

Merging #287 into master will increase coverage by 1.29%.
The diff coverage is 92.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #287      +/-   ##
==========================================
+ Coverage   88.15%   89.44%   +1.29%     
==========================================
  Files          81       87       +6     
  Lines        1570     1706     +136     
  Branches      548      565      +17     
==========================================
+ Hits         1384     1526     +142     
+ Misses        182      176       -6     
  Partials        4        4              
Impacted Files Coverage Δ
packages/preset-dumi/src/index.ts 100.00% <ø> (ø)
packages/preset-dumi/src/plugins/features/demos.ts 88.88% <ø> (ø)
packages/preset-dumi/src/routes/getRouteConfig.ts 83.33% <ø> (ø)
...ages/preset-dumi/src/theme/hooks/useLocaleProps.ts 100.00% <ø> (ø)
packages/preset-dumi/src/theme/hooks/useRiddle.ts 40.81% <0.00%> (+3.31%) ⬆️
packages/preset-dumi/src/theme/hooks/useSearch.ts 95.23% <ø> (ø)
...s/preset-dumi/src/transformer/remark/sourceCode.ts 100.00% <ø> (ø)
packages/preset-dumi/src/plugins/features/404.ts 50.00% <50.00%> (ø)
packages/preset-dumi/src/transformer/demo/index.ts 94.00% <50.00%> (-1.84%) ⬇️
packages/theme-default/src/builtins/Previewer.tsx 89.36% <60.00%> (-3.50%) ⬇️
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af2c142...34cc1b6. Read the comment docs.

@xiaohuoni
Copy link
Member Author

@PeachScript 到你上场了。页面要重新设计一下。

@PeachScript
Copy link
Member

@xiaohuoni 神速👍 用例也加一下呗,辛辛苦苦到的 87%…

@afc163
Copy link
Contributor

afc163 commented Aug 17, 2020

可以加个 https://github.com/afc163/surge-preview 用来预览效果。

@xiaohuoni
Copy link
Member Author

可以加个 https://github.com/afc163/surge-preview 用来预览效果。

#289

@github-actions
Copy link

github-actions bot commented Aug 18, 2020

🎊 PR Preview 445d173 has been successfully built and deployed to https://umijs-dumi-pr-287.surge.sh

🕐 Build time: 235.447s

🤖 By surge-preview

@xiaohuoni
Copy link
Member Author

@PeachScript 现在的构建流程中,好像没办法使用 mobile 主题。因为它的生效机制是在 package.json 中包含它。

@PeachScript
Copy link
Member

@PeachScript 现在的构建流程中,好像没办法使用 mobile 主题。因为它的生效机制是在 package.json 中包含它。

嗯嗯,可以加个配置项手动指定主题路径,和 umi 的 plugins 一样,只是 theme 配置项被占用了;除了这个还得考虑怎么同时把 PC 和 mobile 主题都进行预览的问题

@xiaohuoni

This comment has been minimized.

@PeachScript
Copy link
Member

@xiaohuoni v1.1.0-beta.9 可以用 src/content.tsx 来自定义内容渲染区域,应该能减少许多重复代码

@xiaohuoni

This comment has been minimized.

@xiaohuoni
Copy link
Member Author

@PeachScript 代码干净了很多,发现三个问题记录如下,请跟进。

问题1: src/layout 应该是可选的
问题2: 使用 src/content 时,showSlugs 应该是可控制的。
问题3: 找不到模块 dumi/theme 或其相应的类型声明。

@xiaohuoni
Copy link
Member Author

@PeachScript 现在的构建流程中,好像没办法使用 mobile 主题。因为它的生效机制是在 package.json 中包含它。

嗯嗯,可以加个配置项手动指定主题路径,和 umi 的 plugins 一样,只是 theme 配置项被占用了;除了这个还得考虑怎么同时把 PC 和 mobile 主题都进行预览的问题

@afc163 能支持环境变量之类的预览嘛?

@PeachScript
Copy link
Member

问题2: 使用 src/content 时,showSlugs 应该是可控制的。

@xiaohuoni 这个有思路吗,没想到优雅的方式实现

@afc163
Copy link
Contributor

afc163 commented Aug 20, 2020

@xiaohuoni 已支持多个预览任务:afc163/surge-preview#16

@github-actions
Copy link

github-actions bot commented Aug 20, 2020

🎊 PR Preview 34cc1b6 has been successfully built and deployed to https://umijs-dumi-preview-pr-287.surge.sh

🕐 Build time: 229.302s

🤖 By surge-preview

@PeachScript
Copy link
Member

更新了一波,应该还有 3 个待解决问题:

  1. 单测 case 和覆盖率,用例应该挂了
  2. rem 的问题
  3. safe area 的问题

图片

@doxiaodong
Copy link
Contributor

现在还差什么

@xiaohuoni
Copy link
Member Author

现在还差什么

应该还有 3 个待解决问题:

  1. 单测 case 和覆盖率,用例应该挂了
  2. rem 的问题
  3. safe area 的问题

@xiaohuoni
Copy link
Member Author

@PeachScript 剩下单测覆盖率这个问题了。

@PeachScript
Copy link
Member

#287 opened 25 days ago by xiaohuoni

+1,给 @xiaohuoni 纪念下

@PeachScript PeachScript merged commit af61668 into master Sep 11, 2020
@PeachScript PeachScript deleted the dumi-theme-mobile branch September 11, 2020 11:40
@KMBaby-zyl
Copy link

KMBaby-zyl commented Sep 24, 2020

反馈一个bug, .umirc中有 base的时候手机框中的iframe路由错误,组件出不来

@PeachScript
Copy link
Member

PeachScript commented Sep 25, 2020

反馈一个bug, .umirc中有 base的时候手机框中的iframe路由错误,组件出不来

#335 (comment) 回复了

@ChenYCL
Copy link

ChenYCL commented Jul 30, 2021

现在,rem的问题解决了么,如何配置对应设计稿标准呢,750的设计稿

@xiaohuoni
Copy link
Member Author

@starWangx
Copy link

px可以自动转成rem吗

@xiaohuoni
Copy link
Member Author

px可以自动转成rem吗

px 转 rem 是工程化的问题,不是组件设计的吧?如果你要在组件库中自动转rem,自己加一个 PostCSS 插件 postcss-plugin-px2rem

@umijs umijs deleted a comment from ChenYCL Dec 2, 2021
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.

None yet

7 participants