-
Notifications
You must be signed in to change notification settings - Fork 50
feat: Store view name as part of additional info in fragment body #3696
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: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 225b206 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Changes look good
Changeset looks good
Coverage is good
Did not test manually
Please don't forget to fill the right panel of the PR with the assignee and labels 👍🏻
| if (templateName || (controlType && targetAggregation && viewName)) { | ||
| const result: AddXMLAdditionalInfo = {}; | ||
| if (templateName) { | ||
| result.templateName = templateName; | ||
| } | ||
| if (controlType && targetAggregation && viewName) { | ||
| result.targetAggregation = targetAggregation; | ||
| result.controlType = controlType; | ||
| result.viewName = viewName; | ||
| } | ||
| return result; | ||
| } |
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.
This doesn't seem to scale well. Next time we need to add something else we'll need to add another set of conditions which are repeated in two places. Maybe we can just check if there are any keys set before we return?
return Object.keys(result).length > 0 ? result : undefined;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.
Changed in: 5053c37
| if (isA('sap.ui.core.mvc.View', control)) { | ||
| return control as View; | ||
| } |
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.
| if (isA('sap.ui.core.mvc.View', control)) { | |
| return control as View; | |
| } | |
| if (isA<View>('sap.ui.core.mvc.View', control)) { | |
| return control; | |
| } |
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.
Changed in: 5053c37
…b.com/SAP/open-ux-tools into feat/3479/sotre-view-name-in-fragment
017546c to
82ccbb4
Compare
82ccbb4 to
225b206
Compare
|



Feat for #3479.