Migrating from 1.x
Components
FileNavbar
component was added. The folder chain is now displayed inFileNavbar
instead ofFileToolbar
.- ⚠️
FileSearch
component 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
- ⚠️
EssentialFileActions
were introduced. These are file actions required by Chonky to function correctly. They are always enabled.DefaultFileActions
now only contain non-essential actions, and users can still disable them. - ⚠️
toolbarButton
field was renamed intobutton
.button
object now needs eitherbutton.toolbar
orbutton.contextMenu
to be set totrue
to be displayed in respective parts of the interface. Thebutton.dropdown
field was deprecated, nowgroup
being truthy/falsy serves the same purpose. specialActionToDispatch
field was removed. In fact, "special" actions were completely deprecated. Instead, Chonky now allows actions to define theeffect
function 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.