Replies: 2 comments 1 reply
-
resuite 挺不错的UI。 扩展的重型组件 layout table list 能多点 推广起来就更方便了。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
可以更新一下文档么 特别是多主题编译动态切换的demo 尝试一下 跑不起来 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
It has been a year since the first version of React Suite v4. In this year or so, v4 has iterated a total of 30 versions, adding many new features, and more and more developers are starting to use React Suite , And participate in function development and improvement. There are also developers who have always provided us with valuable suggestions. We thank you again and hope that we will move forward together in the future so that React Suite can serve more developers. We are starting to plan new features in v5, and plan to release with React 17.
The following content will not be the final content. There will be new additions and adjustments during the development process. At the same time, I hope that the community's friends will provide valuable suggestions.
Major changes
1. Improve accessibility
It is our hope that more users can use barrier-free use of products developed by React Suite. We will improve each component provided by React Suite in multiple scenarios such as keyboard operation and screen reading devices.
2. Use SVG Icon instead of Icon font
Icon font has some rendering problems, which makes the icon blurry, the need to load the font file, and the content area flickers. For better accessibility, we decided to prefer SVG Icon.
3. Support CSS variables
Current mainstream browsers already support CSS variables. We plan to provide a set of component CSS variable configurations to make theme customization and theme switching more convenient.
4. Add a set of high contrast themes
In React Suite v4, we refer to the 《Web Content Accessibility Guidelines (WCAG) 》 standard for color contrast requirements, and have made great improvements to the components to meet most users. We still hope to improve on this basis and take care of a small number of people with visual impairments.
5. Refactoring with functional components
We will use function components to refactor most of the components, and use the new features brought by React Hooks to improve the development experience.
Improvements in components
color
property. Badge should have acolor
property #1033srcSet
,sizes
,imgProps
on AvataronChangeCommitted
on Slider and RangeSliderBreaking changes
1.date-fns upgrade v2.
The date-fns tool is used in React Suite for date format, calculation, etc. Based on the Unicode standard, new format strings for formatting functions have been changed. See this post for more details.
2.Abandon the support for IE10 browser.
With the market share of IE10 browser getting lower and lower, we will abandon it in the new version, which can effectively reduce the code size.
3.Remove the
Alert
component and usetoaster.push(<Message>)
insteadAll pop-up notification messages are managed using the new API
toaster
. TheAlert
component will be deleted. The alternative is to usetoaster
andMessage
in combination. E.g:A configurable notification
4.Rename Form related components
FormGroup
toForm.Group
FormControl
toForm.Control
ControlLabel
toForm.ControlLabel
ErrorMessge
toForm.ErrorMessge
HelpBlock
toForm.HelpText
5.The
componentClass
property of all components has been renamed toas
Development
next
branch, and https://next.rsuitejs.com is also provided for preview.Version
You can install the latest version with the following command:
介绍
React Suite v4 的第一个版本已经有一年的时间了,在这一年左右的时间里 v4 一共迭代了 30 个版本,新增了许多特性,也越来越多的开发者开始使用 React Suite,并且参与功能开发与改进。还有一直对我们提出宝贵建议的开发者们,我们再次表示感谢,希望未来我们一起前行,让 React Suite 能够服务到更多的开发者。我们正在开始计划 v5 的新功能,并且计划能够同步 React 17 一起与大家见面。
以下内容会不是最终内容,随着开发过程中的讨论会有新增和调整,同时也希望社区的小伙伴们提出宝贵的建议。
主要功能
1. 提升可访问(Accessibility)
可以让更多的用户在 React Suite 开发的产品上无障碍的使用,是我们的希望,我们会在键盘操作、读屏设备等多个场景去改善 React Suite 提供的每一个组件。
2. 采用 SVG Icon 代替 Icon font
Icon font 存在存在一些渲染上问题,导致图标模糊,需要载入字体文件,导致内容区域闪烁等问题。 为了更好的可访问性(Accessibility),我们决定优先采用 SVG Icon
3. 支持 CSS 变量
当前主流的浏览器都已经支持 CSS 变量,我们计划提供一套组件 CSS 变量配置,可以更方便的做主题自定义,主题切换。
4. 新增一套高对比度主题
在 React Suite v4 我们参照 《Web Content Accessibility Guidelines (WCAG) 》标准对颜色对比度的要求,对组件做了很大的改进,可以满足大多数用户。 我们还是希望在此基础上进行提升,并照顾到一小部分在视力上存在障碍的人群。
5. 采用函数组件重构
我们会用函数组件去重构大部分的组件,采用 React Hooks 所带来的新特性,提升开发体验。
组件上的改进
color
属性。 Badge should have acolor
property #1033onChangeCommitted
破坏性的变更
1. date-fns 升级 v2
在 React Suite 中使用了 date-fns 工具用于对日期格式、计算等等。基于 Unicode 标准,用于格式功能的新格式字符串有变更。详细说明
2.放弃对 IE10 浏览器的支持
随着 IE10 浏览器市场占有率越来越低,我们将在新的版本中放弃它,这样可以有效减少代码体积。
3.删除 Alert 组件,用
toaster.push(<Message>)
代替所有的弹出的通知消息,都使用新的 API toaster 进行管理。Alert 组件将会被删除,替代的方式是通过 toaster 与 Message 组合使用。 例如:
一个可以配置的通知信息
4.Form 相关组件重命名
FormGroup
重命名为Form.Group
FormControl
重命名为Form.Control
ControlLabel
重命名为Form.ControlLabel
ErrorMessge
重命名为Form.ErrorMessge
HelpBlock
重命名为Form.HelpText
5.所有组件的 componentClass 属性重命名为 as
开发
next
分支上进行, 同时提供 https://next.rsuitejs.com 进行预览访问。版本
你可以通过以下命令安装最新版本:
Beta Was this translation helpful? Give feedback.
All reactions