New Features
To reduce development learning costs and provide a better frontend development experience, we have phased a reconstruction of the frontend core over the past few months, including:
This time, v0.17 has refactored the UI Schema designer-related SchemaInitializer and SchemaSettings.
To address the difficulty for users to get started, we have also reorganized various sections of the documentation:
- Plugin Development (completely revised and published)
- API Reference / Client (new section, already published)
- User Manual (completely revised, will be released in the next one to two weeks)
- Plugin List (new section, including introductions, usage, and extension development instructions for all existing plugins, will be released in the next one to two weeks)
Incompatible Changes
Changes to SchemaInitializer
- Added
SchemaInitializerManager
for registeringSchemaInitializer
- Added
useSchemaInitializerRender()
to replace the originaluseSchemaInitializer()
render()
- Added
useSchemaInitializerItem()
for obtaining the context of the current initialization item - Added
SchemaInitializerItemGroup
component as the default component fortype: 'itemGroup'
- Added
SchemaInitializerSubMenu
component as the default component fortype: 'subMenu'
- Added
SchemaInitializerDivider
component as the default component fortype: 'divider'
- Added
SchemaInitializerChildren
component for custom rendering of multiple list items - Added
SchemaInitializerChild
component for custom rendering of a single list item - Changed the responsibilities of
SchemaInitializerContext
for storing the context of the current initializer - Changed the responsibilities of
useSchemaInitializer()
for obtaining the context of the current initializer - Changed
function SchemaInitializer
toclass SchemaInitializer
for defining initializer - Changed parameters of
SchemaInitializer
- Added
name
required parameter for the value ofx-initializer
- Added
Component
parameter for custom rendering of the button. Default isSchemaInitializerButton
. - Added
componentProps
,style
for configuring the properties and style ofComponent
- Added
ItemsComponent
parameter for custom rendering of the list. Default isSchemaInitializerItems
. - Added
itemsComponentProps
,itemsComponentStyle
for configuring the properties and style ofItemsComponent
- Added
popover
parameter for configuring whether to display thepopover
effect - Added
useInsert
parameter for when theinsert
function needs to use hooks - Changed
dropdown
parameter topopoverProps
, usingPopover
instead ofDropdown
- Added
- Changed parameters of
items
forSchemaInitializer
- Added
useChildren
function for dynamically controlling child items - Added
componentProps
function for the properties of the component itself - Added
useComponentProps
function for dynamically processing the props of the component - Changed
key
parameter toname
for the unique identification of list items - Changed
visible
parameter touseVisible
function for dynamically controlling whether to display - Changed
component
parameter toComponent
for rendering list items
- Added
- Changed
SchemaInitializer.Button
toSchemaInitializerButton
, the default value for the Component parameter of SchemaInitializer - Changed
SchemaInitializer.Item
toSchemaInitializerItem
, with unchanged parameters - Changed
SchemaInitializer.ActionModal
toSchemaInitializerActionModal
, with unchanged parameters - Changed
SchemaInitializer.SwitchItem
toSchemaInitializer.Switch
, with unchanged parameters - Deleted
SchemaInitializerProvider
, replaced bySchemaInitializerManager
- Deleted
SchemaInitializer.itemWrap
, no longer need to wrap theitem
component
Changes to SchemaSettings
- Added
SchemaSettingsManager
for registeringSchemaSettings
- Added
useSchemaSettingsItem()
- Added
useSchemaSettingsRender()
- Added
x-settings
parameter for configuring schema settings - Added
x-toolbar
parameter for configuring schema toolbar - Added
SchemaToolbar
component for customizing schema toolbar - Added
useSchemaToolbarRender()
to replace the originaluseDesigner()
- Changed
function SchemaSettings
toclass SchemaSettings
for defining settings - Changed the original
SchemaSettings
toSchemaSettingsDropdown
- Changed
SchemaSettings.Item
toSchemaSettingsItem
- Changed
SchemaSettings.ItemGroup
toSchemaSettingsItemGroup
- Changed
SchemaSettings.SubMenu
toSchemaSettingsSubMenu
- Changed
SchemaSettings.Divider
toSchemaSettingsDivider
- Changed
SchemaSettings.Remove
toSchemaSettingsRemove
- Changed
SchemaSettings.SelectItem
toSchemaSettingsSelectItem
- Changed
SchemaSettings.CascaderItem
toSchemaSettingsCascaderItem
- Changed
SchemaSettings.SwitchItem
toSchemaSettingsSwitchItem
- Changed
SchemaSettings.ModalItem
toSchemaSettingsModalItem
- Changed
SchemaSettings.ActionModalItem
toSchemaSettingsActionModalItem
- Deleted
x-designer
parameter, deprecated, will be removed in the future, usex-toolbar
instead - Deleted
useDesigner()
, deprecated, will be removed in the future, useuseSchemaToolbarRender()
instead
For more details, see Incompatible Changes in NocoBase 0.17