-
Notifications
You must be signed in to change notification settings - Fork 7
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
UXP API reference for v6.4 #90
Conversation
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.
Partial review (1/n)
See inline comments. I'm not sure if it's wise to, for primitive types, use capitalized type names (string, number, etc.), since this can cause confusion in the TypeScript world:
https://www.typescriptlang.org/docs/handbook/2/everyday-types.html
Cases where this came up are marked with a reference to the corresponding issue (#86)
| Param | Type | | ||
| --- | --- | | ||
| value | `string` | | ||
|
||
|
||
|
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 feel right. It might be coming from a set
function, but this just makes the "multiple innerHTML
confusion" worse 🤔
@@ -6,13 6,13 @@ | |||
|
|||
| Name | Type | Description | | |||
| --- | --- | --- | | |||
| uxpallowinspector | `boolean` | Enable Developer tools for WebView e.g., `<webview src="https://www.adobe.com" uxpallowinspector="true"></webview>` | | |||
| uxpallowinspector | `Boolean` | Enable Developer tools for WebView <br></br> e.g., `<webview src="https://www.adobe.com" uxpallowinspector="true"></webview>` | |
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.
|
||
|
||
|
||
<a name="htmlwebviewelement-src" id="htmlwebviewelement-src"></a> | ||
|
||
## src : `string` | ||
## src : `String` |
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.
|
||
<a name="path-sep" id="path-sep"></a> | ||
|
||
## sep |
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.
Missing type
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.
@padmkris123 .... we will update the changes in v7.0.
For now please pick the updates from nodejs public docs https://nodejs.org/api/path.html#pathsep
|
||
<a name="path-delimiter" id="path-delimiter"></a> | ||
|
||
## delimiter |
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.
Missing type
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.
@padmkris123 .... we will update the changes in v7.0.
For now please pick the updates from nodejs public docs https://nodejs.org/api/path.html#pathdelimiter
|
||
**Returns**: `string` - the session token for the given entry | ||
**Returns**: `String` - the session token for the given entry |
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.
@@ -220,21 215,16 @@ Returns the file system Entry that corresponds to the session token obtained fro | |||
|
|||
| Param | Type | | |||
| --- | --- | | |||
| token | `string` | | |||
| token | `String` | |
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.
|
||
**Returns**: `Promise<string>` - the persistent token for the given entry | ||
**Returns**: `Promise<String>` - the persistent token for the given entry |
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.
|
||
**Returns**: `Promise<Entry>` - the corresponding entry for the persistent token | ||
|
||
| Param | Type | | ||
| --- | --- | | ||
| token | `string` | | ||
| token | `String` | |
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.
@@ -296,7 280,7 @@ if (!success) { | |||
Checks if the supplied object is a `FileSystemProvider`. It's safe to use even | |||
if the object is `null` or `undefined`. Useful for type checking. | |||
|
|||
**Returns**: `boolean` - If `true`, the object is a file system provider | |||
**Returns**: `Boolean` - If `true`, the object is a file system provider |
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.
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.
Partial review (2/2)
A small change request regarding a description.
I haven't marked the type notation inconsistenciy issues in the remaining files since we're now discussing this separately and it would only add clutter to this review.
<a name="module-storage-errors-notsupported" id="module-storage-errors-notsupported"></a> | ||
|
||
## NotSupported | ||
Not supported error |
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 feel like a great description if I'm a developer looking for details on this error. This might have small impact if the actual error.message
is clear, but this is not visible from this review.
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.
@padmkris123 ... you can remove this part for now. It looks like this was removed even in docs-6.3.
I will check with the dev if an appropriate description can be provided for upcoming releases
Normalize a string path, reducing '..' and '.' parts. | ||
When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used. | ||
|
||
**Returns**: `String` - normalized string path |
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.
@padmkris123 ... please update the String
with string
.
For 6.5 why have modified it to string
|
||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| path | `String` \| `Entry` | path to normalize | |
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.
Same as above
## join(paths) | ||
Join all arguments together and normalize the resulting path. | ||
|
||
**Returns**: `String` - joined string path |
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.
Same as above
@@ -101,16 101,16 @@ const strLen = await fs.writeFile("plugin-data:/textFile.txt", "It was a dark an | |||
Writes data to a path synchronously, appending if desired. | |||
The format of the file is controlled via the encoding option, and defaults to a binary format. | |||
|
|||
**Returns**: `int` - the length of contents written to the file |
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.
@padmkris123 ... this should be Promise<number>
.
This is fixed in docs-6.5
**Returns**: `int` - 0 if succeeded, otherwise throws an Error | ||
|
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.
number
|
||
<a name="path-delimiter" id="path-delimiter"></a> | ||
|
||
## delimiter |
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.
@padmkris123 .... we will update the changes in v7.0.
For now please pick the updates from nodejs public docs https://nodejs.org/api/path.html#pathdelimiter
|
||
<a name="path-posix" id="path-posix"></a> | ||
|
||
## posix |
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.
@padmkris123 .... we will update the changes in v7.0.
For now please pick the updates from nodejs public docs https://nodejs.org/api/path.html#pathposix
|
||
<a name="path-win32" id="path-win32"></a> | ||
|
||
## win32 |
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.
@padmkris123 .... we will update the changes in v7.0.
For now please pick the updates from nodejs public docs https://nodejs.org/api/path.html#pathwin32
|
||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| pathObject | `object` | path to evaluate | |
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.
@padmkris123 ... please refer https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules__types_node_path_d_._path_.path.platformpath.html#extname
format(pP: [FormatInputPathObject](https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules__types_node_path_d_._path_.path.formatinputpathobject.html)): string
Defined in node_modules/@types/node/path.d.ts:136
Returns a path string from an object - the opposite of parse().
Parameters
pP: [FormatInputPathObject](https://microsoft.github.io/PowerBI-JavaScript/interfaces/_node_modules__types_node_path_d_._path_.path.formatinputpathobject.html)
Returns string```
## parse(path) | ||
Returns an object from a path string - the opposite of format(). | ||
|
||
**Returns**: `object` - ParsedPath |
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.
Will open a fresh PR after addressing the review comments. |
UXP API reference for v6.4
Description
This PR contains changes to UXP API reference docs for v6.4.0
Related Issue
Motivation and Context
This change is required to keep the various product documentation site up to date with latest UXP API reference.
How Has This Been Tested?
Tested locally
Types of changes
Checklist: