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

新版计划(The new plan) 3.0.0 - Discussion #119

Closed
14 tasks done
BANG88 opened this issue Oct 21, 2018 · 35 comments
Closed
14 tasks done

新版计划(The new plan) 3.0.0 - Discussion #119

BANG88 opened this issue Oct 21, 2018 · 35 comments

Comments

@BANG88
Copy link
Member

BANG88 commented Oct 21, 2018

  • General

    • Upgrade react-native and other dependencies to the latest version
    • bug fixes
    • Improve the documentation (use expo to preview or provide Gif) CodeSandBox
  • Refactoring

    • File naming (remove the native suffix)
    • More friendly theme support, user-friendly
    • Improve TypeScript type definitions
    • Split the components in react-component (previously shared with the Web)

  • 常规

    • 升级 react-native 以及其他依赖到最新版
    • bug修复
    • 完善文档(看是否可以使用expo来预览,不然就只能提供Gif了) CodeSandBox
  • 重构

    • 文件命名(去掉native后缀)
    • 更友好的主题支持,方便用户自定义
    • 完善TypeScript 类型定义
    • 拆分react-component里面的组件(之前是跟Web共用的)
@Manweill

This comment has been minimized.

@BANG88

This comment has been minimized.

@warmhug

This comment has been minimized.

@xiaohuoni

This comment has been minimized.

@Manweill

This comment has been minimized.

@BANG88

This comment has been minimized.

@Manweill
Copy link

@BANG88
那提一个全局自定义样式的配置吧,类似Nativebase

@BANG88

This comment has been minimized.

@youngjuning

This comment has been minimized.

@youngjuning
Copy link

还有就是 List 组件的上下border,很多场景是不需要的,grid的图片大小需要自定义,item的thumb尺寸也太小,需要自定义

@BANG88
Copy link
Member Author

BANG88 commented Oct 25, 2018

计划里面已经有了

更友好的主题支持,方便用户自定义

@BANG88
Copy link
Member Author

BANG88 commented Oct 25, 2018

@youngjuning 可以整理一下列表这些看起来问题都不大.

@youngjuning
Copy link

期待,主要是很多有用的props都没有暴露,希望能给开发者更多的自定义权限

@1111mp

This comment has been minimized.

@Manweill

This comment has been minimized.

@GreatAuk
Copy link

GreatAuk commented Nov 4, 2018

expo 的 demo 无法查看了,还有官网怎么会这么慢😂

@afc163
Copy link
Member

afc163 commented Nov 6, 2018

如果换包名,可以用 @ant-design/react-native

@yxh10
Copy link

yxh10 commented Nov 6, 2018

expo 的 demo 无法查看了,还有官网怎么会这么慢😂

可以使用,今天刚测。

@tabfed
Copy link

tabfed commented Nov 13, 2018

modal/action-sheet/picker使用原生动画modal动画提高性能,还有建议自定义动画单独整一个配置文件,现在动画还会回弹一下,不友好,在安卓上表现不好;
action-sheet不能修改动画时长animationDuration
checkbox的图片不能自定义?
弹出modal之后不支持在弹一个toast/loading(modal最高层级)并且只能弹出一个,建议
内部依赖的react-native-top-view 建议能使用数组方式多弹几个组件,比如现在弹出loading的时候不能弹出toast
还有就是建议优化一下picker,在安卓上体验不是很好,数据量多的时候动画性能表现不好
picker在使用做省市区的时候,建议回调函数参数是整个item,现在好像给的是id?
picker在做省市区的时候,固定了label和value字段,建议能够自定义字段
button等点击处理事件在安卓上能否可选使用TouchableNativeFeedback?提高安卓用户体验

大幅度提高性能,吃透react-native API,感觉整个组件用下来性能不是很好

更完善的文档,现在有的props只能查看源码才能了解具体的作用。。

组件可见的样式建议都能提供自定义,例如字体大小、边框、颜色、placeholder等等

暂时就想到这么多,望各位大佬采纳。。

@gianpaj

This comment has been minimized.

@BANG88
Copy link
Member Author

BANG88 commented Nov 28, 2018

Thanks @gianpaj

Will use CodeSandbox after this get fixed codesandbox/codesandbox-client#1293

@SexySix

This comment has been minimized.

@BANG88

This comment has been minimized.

@SexySix

This comment has been minimized.

@BANG88

This comment has been minimized.

@BANG88
Copy link
Member Author

BANG88 commented Dec 9, 2018

Install the beta version with yarn add @ant-design/react-native@next

If you haven't used Provider before, you need to add Provider to the app entry to support the latest version of the theme.

eg:

import { Provider } from '@ant-design/react-native'
return (
      <IntlProvider>
        <AppThemeProvider value={theme}>
          {t => (
            <Provider >
              ...
            </Provider>
          )}
        </AppThemeProvider>
      </IntlProvider>
    )

Feedback is the best support for me. and documentation also needs more help too. 😄

@jiangxia
Copy link

tabs 组件有一个很普遍的问题,就是某个选项卡的内容比较长,另一个选项卡内容区域的底部就会留下很长的空白,这个有办法解决么?

@BANG88
Copy link
Member Author

BANG88 commented Dec 18, 2018

Please file an issue directly.

@Tosiwe
Copy link

Tosiwe commented Dec 18, 2018

调用

Modal.operation([
       { text: "标为未读", onPress: () => console.log("标为未读被点击了") },
       { text: "置顶聊天", onPress: () => console.log("置顶聊天被点击了") }
])

报错:
Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

This error is located at:
in RCModal
in RCTView (at View.js:60)
in View
in WithTheme (created by AntmModal)
in AntmModal
in WithTheme (created by OperationContainer)
in OperationContainer
in RCTView (at View.js:60)
in View (created by PortalManager)
in PortalManager (created by Portal.Host)
in Portal.Host (created by Provider)
in ThemeProvider (created by Provider)
in LocaleProvider (created by Provider)
in Provider (at router.js:150)
in Router (created by Connect(Router))
in Connect(Router) (at index.js:18)
in Provider (at dva.js:17)
in Unknown (at renderApplication.js:33)
in RCTView (at View.js:60)
in View (at AppContainer.js:102)
in RCTView (at View.js:60)
in View (at AppContainer.js:122)
in AppContainer (at renderApplication.js:32)

@SexySix
Copy link

SexySix commented Dec 25, 2018

tabs 组件有一个很普遍的问题,就是某个选项卡的内容比较长,另一个选项卡内容区域的底部就会留下很长的空白,这个有办法解决么?

两个内容都用ScrollView包一下

@hamxiaoz
Copy link

hamxiaoz commented Feb 6, 2019

@BANG88 3.0可以用custom font吗? 貌似default theme里面没有'fontFamily' variable

@BANG88
Copy link
Member Author

BANG88 commented Feb 6, 2019 via email

@tourze
Copy link

tourze commented Jun 1, 2019

调用

Modal.operation([
       { text: "标为未读", onPress: () => console.log("标为未读被点击了") },
       { text: "置顶聊天", onPress: () => console.log("置顶聊天被点击了") }
])

报错:
Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

This error is located at:
in RCModal
in RCTView (at View.js:60)
in View
in WithTheme (created by AntmModal)
in AntmModal
in WithTheme (created by OperationContainer)
in OperationContainer
in RCTView (at View.js:60)
in View (created by PortalManager)
in PortalManager (created by Portal.Host)
in Portal.Host (created by Provider)
in ThemeProvider (created by Provider)
in LocaleProvider (created by Provider)
in Provider (at router.js:150)
in Router (created by Connect(Router))
in Connect(Router) (at index.js:18)
in Provider (at dva.js:17)
in Unknown (at renderApplication.js:33)
in RCTView (at View.js:60)
in View (at AppContainer.js:102)
in RCTView (at View.js:60)
in View (at AppContainer.js:122)
in AppContainer (at renderApplication.js:32)

请问你这个问题解决了吗。。我也遇到了

@feige-2011
Copy link

3.1.5 版本怎么改变主题,要做一个夜间模式效果,谢谢大家

@feige-2011
Copy link

* General
  
  * [x]  Upgrade react-native and other dependencies to the latest version
  * [x]  bug fixes
  * [x]  ~Improve the documentation (use expo to preview or provide Gif)~ CodeSandBox

* Refactoring
  
  * [x]  File naming (remove the native suffix)
  * [x]  More friendly theme support, user-friendly
  * [x]  Improve TypeScript type definitions
  * [x]  Split the components in `react-component` (previously shared with the Web)


* 常规
  
  * [x]  升级 react-native 以及其他依赖到最新版
  * [x]  bug修复
  * [x]  ~完善文档(看是否可以使用expo来预览,不然就只能提供Gif了)~ CodeSandBox

* 重构
  
  * [x]  文件命名(去掉native后缀)
  * [x]  更友好的主题支持,方便用户自定义
  * [x]  完善TypeScript 类型定义
  * [x]  拆分`react-component`里面的组件(之前是跟Web共用的)

现在的改变主题,怎么用的,我想要动态改变主题,做夜间模式,求大神指点

@1uokun 1uokun mentioned this issue Dec 29, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests