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

[desk-tool] Resolve document type from template if available #1633

Merged
merged 2 commits into from
Nov 30, 2019

Conversation

rexxars
Copy link
Member

@rexxars rexxars commented Nov 27, 2019

Given the following structure:

S.documentList()
  .title('Unspecified books list')
  .menuItems(S.documentTypeList('book').getMenuItems())
  .filter('_type == $type')
  .params({type: 'book'})

You may end up in a situation where the automatically generated editor has the schema type value *, which should be resolved by the desk tool to the correct type (structure doesn't figure out that this pane holds a specific schema type, since it's not set using schemaType(someTypeName)/documentTypeList(someTypeName).

With this PR, we use the template parameter to resolve the schema type to use if none is explicitly defined.

Copy link
Contributor

@thomax thomax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably need to make document available in the new resolve... function? See comment

@rexxars rexxars force-pushed the fix-resolve-doctype-from-template branch from 3d3feed to f32918b Compare November 29, 2019 00:10
@rexxars rexxars requested a review from thomax November 29, 2019 00:11
Copy link
Contributor

@thomax thomax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants