Skip to content
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

Add missing parent to `page dialog's` API and consume it correctly in the panel #1842

Closed

Conversation

2 participants
@steirico
Copy link
Contributor

commented Jun 8, 2019

Describe the PR

According to

this.options.parent = this.model.parent ? this.model.parent.id : null;
the API should provide the models parent to the pages dialog if available.

Seen the code in https://github.com/steirico/kirby/blob/d250d832888f15c1b08a056c131bb8602784afe5/config/fields/pages.php#L102-L139 that's never the case.

This PR modifies the API to set the model's parent id if available and consumes it in the pages dialog accordingly.

Related issues

PR relates to issues in the kirby repo:

Todos

If you feel like you can help to check off the following tasks, that'd be great. If not, don't worry - we will take care of it.

  • Add unit tests for fixed bug/feature
  • Pass all unit tests
  • Fix code style issues with CS fixer and composer fix
  • If needeed, in-code documentation (DocBlocks etc.)
@steirico

This comment has been minimized.

Copy link
Contributor Author

commented Jun 8, 2019

Any hints on where to add unit test for this PR?
Thanks

@steirico steirico changed the title Add missing parent to `page dialog's` API and consume it correctly in thpanel Add missing parent to `page dialog's` API and consume it correctly in the panel Jun 8, 2019

@bastianallgeier

This comment has been minimized.

Copy link
Contributor

commented Jun 11, 2019

I already fixed this in another commit. Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.