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

feat: Add global detection for XML Templating #481

Merged
merged 2 commits into from
Feb 14, 2025

Conversation

matz3
Copy link
Member

@matz3 matz3 commented Jan 14, 2025

JIRA: CPOUI5FOUNDATION-917

@matz3 matz3 force-pushed the feat-detect-xml-templating-globals branch from 8eb3ce4 to 28701d2 Compare January 20, 2025 13:09
@matz3 matz3 force-pushed the feat-detect-xml-templating-globals branch 2 times, most recently from ff4a39b to bb0bd34 Compare February 11, 2025 09:46
@matz3 matz3 marked this pull request as ready for review February 11, 2025 14:55
@matz3 matz3 requested review from a team and KlattG February 11, 2025 14:56
Comment on lines +376 to +379
message: ({moduleNames}: {moduleNames: string}) =>
`Usage of space-separated list '${moduleNames}' in template:require`,
details: () => `Use the object notation of template:require instead ` +
`{@link topic:263f6e5a915f430894ee290040e7e220}`,
Copy link
Member Author

Choose a reason for hiding this comment

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

@KlattG please review this new message

Copy link
Contributor

@KlattG KlattG left a comment

Choose a reason for hiding this comment

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

LGTM

d3xter666
d3xter666 previously approved these changes Feb 13, 2025
@matz3 matz3 force-pushed the feat-detect-xml-templating-globals branch from 6c2d8d4 to 79ea964 Compare February 14, 2025 08:02
@matz3 matz3 requested a review from d3xter666 February 14, 2025 08:02
@matz3 matz3 force-pushed the feat-detect-xml-templating-globals branch from 79ea964 to 1afb25a Compare February 14, 2025 08:23
@matz3 matz3 force-pushed the feat-detect-xml-templating-globals branch from 1afb25a to a840e1f Compare February 14, 2025 08:30
<template:with path="field>Value/$Path" var="target">

<!-- Global access via computed annotation - no arguments, expression binding template:if -->
<template:if test="{= ${target>@@sap.ui.model.odata.v4.AnnotationHelper.getValueListType} !== 'None' }">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<template:if test="{= ${target>@@sap.ui.model.odata.v4.AnnotationHelper.getValueListType} !== 'None' }">
<template:if test="{= ${target>@@sap.ui.model.odata.v4.AnnotationHelper.getValueListType} !== 'None' }">

It's just a question as I cannot reason myself, but is this intentionally missed in the snapshots?
Line #23 is reported, but not this one

Copy link
Member Author

Choose a reason for hiding this comment

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

It's an expression binding, which creates "parts" that are not checked, yet. This will be done in a separate PR.

<template:else>

<!-- Global access via computed annotation - no arguments, composite binding -->
<Text text="ValueListType: {field>@@sap.ui.model.odata.v4.AnnotationHelper.getValueListType}" />
Copy link
Contributor

Choose a reason for hiding this comment

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

The same as above. Why is that not reported? Is it because of the binding + text inside?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's a composite binding, which creates "parts" that are not checked, yet. This will be done in a separate PR.

@matz3 matz3 merged commit 76394f8 into main Feb 14, 2025
15 checks passed
@matz3 matz3 deleted the feat-detect-xml-templating-globals branch February 14, 2025 10:10
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.

3 participants