Over the past two months, iView has released two major versions, 2.9.0 and 2.10.0. There were a total of 255 Commits and over 40 updates for the two releases. So let’s take a look at what’s been updated in iView.

The full update log can be accessed with GitHub Releases: 2.9.0: github.com/iview/iview… 2.10.0: github.com/iview/iview…

Or in the iView document update log view: www.iviewui.com/docs/guide/…

Note: There is a problem with large files after compilation in 2.10.0, please update to 2.10.1

Visible updates

A visible update is something that feels real after the update. Both versions have been improved thanks to the work of two Swedish gods, SergioCrisostomo and Xotic750.

Refactoring of the date component DatePicker

The first was the refactoring of the date component DatePicker in 2.10.0. DatePicker is one of the most complex of iView’s 48 components. Complex functions make the code logic very heavy, and many new features such as compatibility with calendar specifications of different countries are difficult to iterate on this basis, and have to be torn down and started from scratch.

SergioCrisostomo has previously developed date-related JS libraries (github.com/SergioCriso…). , so familiar with date-related function points and apis, and iView was refactored based on this library.

The new date component adds the following features:

1. Range selection is now supported from right to left. Previously, when selecting a range, you had to select the starting point first and then the end point, i.e. from left to right, but many users did the opposite. This version supports both directions.

2. Added split-panels: After this function is enabled, the left and right panels do not interlock. In the previous range selection, the left and right panels were linked, that is, the right side is always one month older than the left side, and any panel switching month or year, the other panel will automatically switch. In this version, you can set the linkage to no, which facilitates locating the start and end months. As shown in the figure:

3. Add the multiple attribute. After this function is enabled, you can select multiple dates. Although the previous version could combine multiple dates with other iView components, the effect and interaction were somewhat reduced. This version simply added the multiple attribute to allow simultaneous selection and rendering of multiple dates in a single date panel. As shown in the figure:

4. Add the show-week-numbers attribute. After this attribute is enabled, the number of weeks is displayed. Add this property to display the current week of the year on the calendar panel. As shown in the figure:

There are also a number of other updates, such as the addition of the start-date attribute, which allows you to set the date displayed by default when the panel expands. Timepicker-options: configures TimePicker properties, such as steps, when type is datetime and dateTimerange. Complete updates can be viewed in the update log, which is not listed here.

Keyboard accessibility support

Keyboard accessibility, mainly through the keyboard keys, TAB keys, space bar to complete the form components switch and interaction. This is especially useful when filling out a Form (the iView Form component), where you can complete and submit a complex Form without the mouse.

The latest version of iView supports keyboard accessibility components: Button, Input, Radio, Checkbox, Switch, AutoComplete, Slider, and InputNumber. More components are being supported.

In fact, native form controls, such as

At present, all the above components can be selected by the TAB key of the keyboard, which is the first step, as shown in the figure:

It can be seen that when the component is selected, there is a highlight layer outside, indicating the currently selected control. At this time, other keys on the keyboard can continue to operate, such as Radio Radio, under the selected state, you can directly switch options through the arrow keys on the keyboard. When the Checkbox is activated, you can press the space key to select or deselect an item and press the TAB key to activate the next item.

Invisible updates

There are also some updates that cannot be directly seen or experienced.

For example, updating a large number of dependencies:

  • Babel series all updated
  • Using thebrowserslist

Sourcemap is used.

Some components of the reconstruction, although the function of no change, but the code structure and logic have been optimized and maintainability design.

Automated testing of some components, continuous integration compatibility with GitHub Travis – CI, etc.

The exterior needs to be optimized as well as the interior. Just like a person, there should be both external beauty and internal beauty.

The “untold” story

A lot of interesting things have happened in open source work, and here are a few of them.

In Sweden, if you want to use open source projects, you have to fix the bugs

When using open source projects in Sweden for production, developers are obligated to fix bugs in open source projects. At this moment, I think Sweden is good.

No more “noisy” than foreigners

Sorry for my poor English. I’m Sorry for my poor Chinese. Therefore, my English is not good, sometimes “noisy” but foreigners.

By the time I’m looking up what “optimisation” means, they are balabala. Compromise if you can’t fight.

It’s like talking to a goddess you admire, you bibibi a lot of things and they say “oh” back to you, haha.

However, compromise is compromise, and what we have said is reasonable. We should not compromise for the sake of compromise. Truth is the most important thing.

Speaking of these, I would like to say more that each function point of iView is carefully studied and discussed by us, which will not be done by subjective consciousness or supported by any Feature Request. Each Feature is the result of discussion. So, this is an open source project with both feelings and responsibility.

At present, the core team of iView has 3 people maintaining it at the same time, which is much better than I used to struggle independently. However, more engineers with open source spirit like Swedish developers are still needed to join in and make iView the most user-friendly and beautiful UI component library in the world. Looking forward to your joining us!

The next release: The next release plans to refactor the Select component to fully support keyboard accessibility of the forms component, so stay tuned. The full program is at milestone github.com/iview/iview…