-
Notifications
You must be signed in to change notification settings - Fork 5
feat: Add format options to llm guidelines #108
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
matz3
left a comment
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.
LGTM, requesting UA review by @KlattG
|
Also looks good to me. The only concern is what the size of the guidelines will be over time. I know of another incoming guideline extension in the Form area. Every added piece improving one thing will make all other things a tiny bit worse because they lose a bit of focus. But that's not a problem at this point yet. |
|
I agree that this will be an issue in the future. I noticed that on my local agent rules. I would also agree that this is not a problem yet. |
KlattG
left a comment
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.
I suggest rephrasing the new content for clarity and conciseness.
6eaa75e to
99992d2
Compare
|
Applied changes suggested by @KlattG and fixed the commit message |
99992d2 to
0a3f2a5
Compare
Co-authored-by: Günter Klatt <57760635+KlattG@users.noreply.github.com>
0a3f2a5 to
d9dd29f
Compare
KlattG
left a comment
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.
LGTM
| - **ALWAYS** use data binding in views to connect UI controls to data or i18n models. | ||
| - When binding data from OData services, **NEVER** use custom formatters for standard data types (e.g., dates, numbers, currencies). The built-in types handle these cases automatically. | ||
| - **ALWAYS** prefer built-in data types with format options for formatting in data binding: | ||
| - To handle standard formatting needs, use **built-in data types with format options**, for example `sap.ui.model.type.Integer` or `sap.ui.model.type.Currency` with a `formatOptions` object. For OData models, use the types provided in the `sap.ui.model.odata.type` namespace, for example `sap.ui.model.odata.type.Decimal`. |
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.
The OData types can also be used w/o ODataModels. Would we not enforce the usage of the OData types? I.e. recommend sap.ui.model.odata.type.Currency and sap.ui.model.odata.type.Int64. Non-OData types should only be used if there is no matching OData type, e.g. for DateInterval.
Background: OData types work also w/o OData. And the data often enough comes from an OData-service even if a JSONModel is used (at least in the SAP context).
Hi Colleagues,
we would like to improve the llm guidelines regarding formatting data in XML views.
Thank you for your contribution! 🙌
To get it merged faster, kindly review the checklist below:
Pull Request Checklist