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

Continued: Default book templates #4721

Merged
merged 13 commits into from
Dec 12, 2023
Merged

Continued: Default book templates #4721

merged 13 commits into from
Dec 12, 2023

Conversation

ssddanbrown
Copy link
Member

@ssddanbrown ssddanbrown commented Dec 11, 2023

Continuation of #3918.

Todo

  • Implement page picker.
  • Handle changes, to allow saving of non-changes to non-visible template, but prevent saving changes to a non-visible template.
  • In page picker, show ID if no permission to view, to prevent submission clearing template.
  • Check use/loading of template checks permission/access to the given template page. [PageRepo]
  • Check removing default template from books results in null, not 0, in DB.
  • Test delete of template page removes default template field from books.
  • Test markdown and cross-editor scenarios.
    • Kinda works, can be a bit janky when HTML template in a markdown page, but same behaviour as existing template usages really.
  • Rename field to default_template_id.
  • Check buttons in search boxes to find possible affects.
    • Specifically in template manager.
  • API Support
    • Update API Tests
    • Update API examples
  • PHPUnit tests
    • Cover the above things to check also

lennertdaniels and others added 13 commits December 2, 2022 13:10
- Adapted existing page picker to be usable elsewhere.
- Added endpoint for getting templates for entity picker.
- Added search template filter to support above.
- Updated book save handling to check/validate submitted template.
  - Allows non-visible pages to flow through the save process, if not
    being changed.
- Updated page deletes to handle removal of default usage on books.
- Tweaked wording and form styles to suit.
- Updated migration to explicity reflect default value.
Included new helper in Test PermissionProvider to set app to public,
since that's a common test scenario.
Cleaned up and updated page picker a bit, allowing longer names to show,
clicking through to item without triggering popup, and updated to use
hidden attributes instead of styles.

Added phpunit tests to cover supporting entity-selector-templates
endpoint.
Null accessor is akward in php8.0 and throws warnings, so removed.
Added test to check template assingment handling on page delete.
@ssddanbrown ssddanbrown added this to the Next Feature Release milestone Dec 12, 2023
@ssddanbrown ssddanbrown self-assigned this Dec 12, 2023
@ssddanbrown ssddanbrown merged commit 4896c40 into development Dec 12, 2023
22 checks passed
@ssddanbrown ssddanbrown deleted the default-templates branch December 12, 2023 16:06
This was referenced Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants