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

UXP API reference for v6.4 #90

Closed
wants to merge 11 commits into from
Closed

UXP API reference for v6.4 #90

wants to merge 11 commits into from

Conversation

padmkris123
Copy link
Collaborator

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Contributor

@pklaschka pklaschka left a 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:

image
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)

Comment on lines 187 to 192
| Param | Type |
| --- | --- |
| value | `string` |



Copy link
Contributor

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>` |
Copy link
Contributor

Choose a reason for hiding this comment

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

#86




<a name="htmlwebviewelement-src" id="htmlwebviewelement-src"></a>

## src : `string`
## src : `String`
Copy link
Contributor

Choose a reason for hiding this comment

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

#86


<a name="path-sep" id="path-sep"></a>

## sep
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing type

Copy link
Collaborator

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing type

Copy link
Collaborator

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
Copy link
Contributor

Choose a reason for hiding this comment

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

#86

@@ -220,21 215,16 @@ Returns the file system Entry that corresponds to the session token obtained fro

| Param | Type |
| --- | --- |
| token | `string` |
| token | `String` |
Copy link
Contributor

Choose a reason for hiding this comment

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

#86


**Returns**: `Promise<string>` - the persistent token for the given entry
**Returns**: `Promise<String>` - the persistent token for the given entry
Copy link
Contributor

Choose a reason for hiding this comment

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

#86


**Returns**: `Promise<Entry>` - the corresponding entry for the persistent token

| Param | Type |
| --- | --- |
| token | `string` |
| token | `String` |
Copy link
Contributor

Choose a reason for hiding this comment

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

#86

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

#86

Copy link
Contributor

@pklaschka pklaschka left a 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
Copy link
Contributor

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.

Copy link
Collaborator

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
Copy link
Collaborator

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 |
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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

Comment on lines 150 to 151
**Returns**: `int` - 0 if succeeded, otherwise throws an Error

Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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 |
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

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

@padmkris123
Copy link
Collaborator Author

Will open a fresh PR after addressing the review comments.

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.

4 participants