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

Align jsdoc template with openui5 #1100

Merged
merged 12 commits into from
Dec 10, 2024
Merged

Conversation

codeworrior
Copy link
Member

No description provided.

@codeworrior codeworrior force-pushed the align-jsdoc-template-with-openui5 branch from 21089e6 to 88be039 Compare December 5, 2024 20:12
@coveralls
Copy link

coveralls commented Dec 5, 2024

Coverage Status

coverage: 94.907% (+0.08%) from 94.832%
when pulling 0e3d0b8 on align-jsdoc-template-with-openui5
into 599bddd on main.

@codeworrior codeworrior changed the title Align jsdoc template with openui5 (wip, more to come, maybe?) [WIP] Align jsdoc template with openui5 (wip, more to come, maybe?) Dec 5, 2024
@codeworrior codeworrior force-pushed the align-jsdoc-template-with-openui5 branch from 33b3e68 to c840ae8 Compare December 10, 2024 10:50
@codeworrior codeworrior marked this pull request as ready for review December 10, 2024 10:50
@codeworrior codeworrior changed the title [WIP] Align jsdoc template with openui5 (wip, more to come, maybe?) Align jsdoc template with openui5 Dec 10, 2024
@codeworrior codeworrior requested a review from a team December 10, 2024 10:51
The statement was probably used for debugging purposes so it can be
removed.

Cherry-picked from SAP/openui5@8be158412.
Improved handling of compound types, including union types (e.g.,
string | boolean) and array notations (e.g., string[]).

This update ensures accurate and efficient identification of built-in
types, reducing the likelihood of incorrect links in documentation due
to unrecognized types.

Cherry-picked from SAP/openui5@2dc53cf86.
This change is a follow-up to the previous commit, which introduced
a new, simplified way to handle base types in JSDoc.

Cherry-picked from SAP/openui5@e419b0223.
Background:
The jsdoc allows to specify multiple types for:
- function parameters (including constructor parameters)
- function return values
- properties of typedefs e.g. typedef sap/ui/performance/Measurement.Entry
- UI5 metadata properties
Then transformApiJson.js adds those multiple types
into the "types" field of the entries of the api.json
files for each library

Problem:
The UI5 Demokit did not correctly display multiple types
for UI5 metadata properties e.g. it created a single
link for all types that opened the Not Found page

Solution:
- in transformApiJson.js, assign the "linkedEnabled"
flag per type (instead of per group of types).
Further, set "linkedEnabled"=true only if the type
is a UI5 symbol.
- in the UI5 Demokit ApiRef section, for each displayed
control property, bind the view to the "types"
model field, to ensure all types are covered.

Cherry-picked from SAP/openui5@4cd0cc12d.
…omplete`

Processing of @Augments, @mixin and @borrows tags might produce new
duplicates which are not yet visible during the `parseComplete` event.

Moving the cleanup to `processingComplete` fixes this.

The merge of the additional data that the UI5 AST visitor collected,
is still done in `parseComplete` so that it is available when doclets
are cloned during the processing of @Augments, @mixin and @borrows tags.

Cherry-picked from SAP/openui5@96f6f095d.
…penui5 build

Adds some more Web APIs to the list of known globals.

Cherry-picked from SAP/openui5@a7eb4e6d0.
…sap/ui/base/DataTypes

The JSDoc template now detects when a managed property
uses a global type name but the type itself has a `module:*` name.
In that case, the `module:*` name is used for the generated API
documentation.

Cherry-picked from SAP/openui5@e4d070423.
Problem:
In the API Reference section, the complex types of entities
[declared in the jsdoc] are not properly displayed and
linked to their composing types.

Solution:
-- Utilize the existing TypeParser in order to parse the
individual simple-types composing a complex type.
-- Render as links only the simple-types that correspond
to UI5 symbols.

Cherry-picked from SAP/openui5@03bb1394d.
…jsdoc-template

 - structure types require an additional set of curly braces
 - optional fields in a structure are denoted with a trailing "="
   as part of the field name

Cherry-picked from SAP/openui5@0cb9f8401.
@codeworrior codeworrior force-pushed the align-jsdoc-template-with-openui5 branch from c840ae8 to 0e3d0b8 Compare December 10, 2024 12:16
@codeworrior codeworrior merged commit 0654efb into main Dec 10, 2024
17 checks passed
@codeworrior codeworrior deleted the align-jsdoc-template-with-openui5 branch December 10, 2024 12:32
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