Migrating from 1.x
Components
FileNavbarcomponent was added. The folder chain is now displayed inFileNavbarinstead ofFileToolbar.- ⚠️
FileSearchcomponent was removed. The search input was moved intoFileToolbar.
Icons
- ⚠️ To decrease the bundle size, the default FontAwesome icon component was moved
into a separate package -
chonky-icon-fontawesome. It is now also possible to provide custom icon component.
File actions
- ⚠️
EssentialFileActionswere introduced. These are file actions required by Chonky to function correctly. They are always enabled.DefaultFileActionsnow only contain non-essential actions, and users can still disable them. - ⚠️
toolbarButtonfield was renamed intobutton.buttonobject now needs eitherbutton.toolbarorbutton.contextMenuto be set totrueto be displayed in respective parts of the interface. Thebutton.dropdownfield was deprecated, nowgroupbeing truthy/falsy serves the same purpose. specialActionToDispatchfield was removed. In fact, "special" actions were completely deprecated. Instead, Chonky now allows actions to define theeffectfunction that has access to Chonky's Redux state.- Although you can still define custom file actions using the old way (plain JS objects), new utility functions are provided to create type-safe action definitions.
File action handler
- ⚠️ The file action handler has changed completely - it is now called differently, and different parameters are passed in. These changes are not backwards-compatible, so you will need to re-define your file action handlers.
Styling
- ⚠️ Chonky now uses a CSS-in-JSS library called JSS. Thanks to this, you no longer
need to import Chonky CSS manually. You can remove this line from your project:// No longer needed; will throw error.import 'chonky/style/main.css';
- As Chonky no longer uses plain CSS, the mechanisms for overriding built-in classes have changed . You can still override styles using custom CSS rules, but the class names in 2.x are different to 1.x.
State management
- Chonky now uses Redux for state management instead of Recoil. If your application used Chonky's internal Recoil atoms, your code will no longer receive updates.