Migration from previous versions¶
Migration 2.0b21 -> 2.0b22¶
Simplified naming of managed widgets:
ManagedTextInputAdapter->ManagedTextInputManagedCalendarAdapter->ManagedCalendarManagedCounterAdapter->ManagedCounterManagedCheckboxAdapter->ManagedCheckboxManagedMultiSelectAdapter->ManagedMultiselectManagedRadioAdapter->ManagedRadioManagedListGroupAdapter->ManagedListGroup
Migration 2.0b18 -> 2.0b21¶
en_errorcallback in TextInput now receivesValueErrorinstance as 4th parameter in addition to previously used threeon_errorandon_successin TextInput now receiveManagedTextInputAdapterinstead ofTextInputas a 2d parameter
Migration 2.0b10 -> 2.0b18¶
Registryclass removed.Each Dialog` is now a
Router. You should dodp.include_router(dialog)to attach it.setup_dialogsis now a replacement ofregistry.setup_dp(). Parameters are the same.render_previewandrender_transitionsmethods now expectDispatcher,RouterorDialoginstance instead ofRegistryaiogram-dialog-previewnow expectsDispatcher,RouterorDialoginstance instead ofRegistry
Migration 2.0b10 -> 2.0b17¶
Registryis now created without dispatcher. After that you need to setup dispatcher usingsetup_dpmethodRegistry.register_start_handlernow requires router (or dispatcher)
Migration 1.x -> 2.0b10¶
Main objects like
Dialog,LaunchModeandDialogManagershould be imported directly fromaiogram_dialogpackage.Whenableis moved towidgets.commonsubpackageWhen finding widget by
idyou will get managed version of widget. This objects no more expectDialogManagerorChatEventarguments in their methodsFor
ListGroupitems callbacks you will getSubManagerwhich behavior slightly changed.SubManagermoved toaiogram_dialogpackageManagedDialogprotocol renamed toDialogProtocolDialogno more contains.next,.backand.switch_tomethods. They are available inDialogManagerDialogManagerFactoryprotocol simplifiedno more
ManagedDialogAdapterProto. You will getDialoginstance insteadno more
datainContext. Renamed tostart_datamany time agodialog_dataandstart_dataadded toDialogManager,datais renamed tomiddleware_data
Migration 0.11 -> 1.0¶
reset_stackwas replaced withStartMode. E.g.reset_stack=trueis nowmode=StartMode.RESET_STACKdialog no more changes current aiogram state
- In manager
contextandcurrent_intent()were replaced withcurrent_context()call. dialog_datais a dict to hold user datawidget_datais a dict to hold data of widgetsstart_datais a data provided whe dialog startstateis current dialog state
- In manager
When subdialog finishes parent is restored with previous state, not which it was started
Changed signature of
on_process_resultcallback. It now accepts start data used to start subdialogGroup.keep_rowsoption removed. Setwidth=None(default value) if you want to keep rows.