-
-
Notifications
You must be signed in to change notification settings - Fork 180
refact!: Models fields use models picker dialogs #7522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v6/develop
Are you sure you want to change the base?
refact!: Models fields use models picker dialogs #7522
Conversation
a4ed279
to
52a752a
Compare
52a752a
to
ad089d8
Compare
1aa18cc
to
dfc5fcc
Compare
40cd2bc
to
e1d00b0
Compare
e1d00b0
to
fe7633f
Compare
fe7633f
to
beb5075
Compare
beb5075
to
cbb78ce
Compare
@@ -48,9 +49,6 @@ | |||
'parent' => function () { | |||
return $this->parentModel->apiUrl(true); | |||
}, | |||
'query' => function () { | |||
return $this->query ?? $this->parentModel::CLASS_ALIAS . '.files'; | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanation:
Query default is handled by new FIlePickerDialogController
class.
} | ||
'pattern' => 'items', | ||
'method' => 'GET', | ||
'action' => fn () => $this->field()->itemsFromRequest() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't found a better way as api
routes cannot be defined by a mixin as it seems.
} | ||
} | ||
|
||
return $items; | ||
return $ids; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review:
Does it make sense that we always use IDs here and not UUIDs? Since we use ->toModel()->{$store)
in the save
callback, it should work consistently to always just communicate with the IDs. But wondering if conceptually we should also use $uuid?? $id
here.
cbb78ce
to
225da0b
Compare
Description
Merge first:
::pickerData()
for models #7510picker
field mixin #7528Todo
Changelog
♻️ Refactored
☠️ Deprecated
k-models-dialog
,k-pages-dialog
,k-files-dialog
andk-users-dialog
have been deprecated. Usek-models-picker-dialog
,k-pages-picker-dialog
,k-files-picker-dialog
,k-users-picker-dialog
instead.Kirby\Cms\Picker
,Kirby\Cms\PagePicker
,Kirby\Cms\FilePicker
andKirby\Cms\UserPicker
have been deprecated. UseKirby\Panel\Controller\Dialog\ModelsPickerDialogController
,Kirby\Panel\Controller\Dialog\PagesPickerDialogController
,Kirby\Panel\Controller\Dialog\FilesPickerDialogController
andKirby\Panel\Controller\Dialog\UsersPickerDialogController
instead.🚨 Breaking changes
pagepicker
,filepicker
anduserpicker
field mixinsFor review team