Skip to content

Commit 860fe6f

Browse files
committed
XD 20 documentation changes
1 parent 17b1970 commit 860fe6f

File tree

5 files changed

+57
-18
lines changed

5 files changed

+57
-18
lines changed

changes.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Change Log
22

3+
## XD Release 20.0.12 (June 2019)
4+
5+
### UI Changes
6+
7+
* **"Launchpad" UI and menu structure changes** -- XD 20 introduces a new, easier way for users to run plugins -- the "launchpad" sidebar menu:
8+
<div style="background:url(images/launchpad-icon.png); width: 39px; height: 111px; margin-left: 40px" alt="Launchpad icon"></div><!-- works around fancybox plugin breaking image size-->
9+
10+
This panel lists all installed plugins, with quick access to all the same commands as the Plugins menu. In addition, XD now arranges plugin menu items more cleanly:
11+
* Multiple menu items are automatically grouped together into a submenu named after the plugin. There's
12+
no longer any need to manually specify submenus.
13+
* If your plugin only has a single menu item, it'll still be available directly at the top level of the
14+
Plugins menu.
15+
* However, _top level menu items always use the name of the plugin._ If your plugin's single menu item had a
16+
different label specified, it will be ignored.
17+
18+
### API Improvements
19+
20+
* **Text scenenode super/subscript** -- Work with Text nodes and style assets using the new [textScript](./reference/scenegraph.md#Text-textScript)
21+
feature.
22+
23+
### Known Issues
24+
25+
No new known issues. See the [Known Issues page](./known-issues.md) for a comprehensive list of existing known issues.
26+
27+
28+
----
29+
330
## XD Release 19.0.12 (May 2019)
431

532
### New API Features

images/launchpad-icon.png

1.04 KB
Loading

reference/assets.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ Assets library entry representing a set of text character styles.
6868

6969
Character style properties. See documentation for the [Text](scenegraph.md#Text) node type for more details.
7070

71+
When creating a new character style, all properties are mandatory except those with default values specified here. When deleting
72+
an existing character style, always pass the exact object returned by [`characterStyles.get()`](#module_assets-characterStyles-get) (with all properties fully
73+
specified) to avoid any ambiguity.
74+
7175
| Property | Type | Description |
7276
| --- | --- | --- |
7377
| fontFamily | !string | the font family |
@@ -79,6 +83,7 @@ Character style properties. See documentation for the [Text](scenegraph.md#Text)
7983
| underline | !boolean | whether underline is turned on |
8084
| strikethrough | ?boolean | (**Since**: XD 19) Default false; whether strikethrough is turned on |
8185
| textTransform | ?string | (**Since**: XD 19) Default "none"; one of "none", "uppercase", "lowercase", or "titlecase" |
86+
| textScript | ?string | (**Since**: XD 20) Default "none"; one of "none", "superscript", or "subscript" |
8287

8388

8489
* * *
@@ -246,7 +251,7 @@ var assets = require("assets"),
246251
charSpacing: 0,
247252
lineSpacing: 0,
248253
underline: false
249-
// (leaves optional strikethrough & textTransform properties at default values)
254+
// (leaves optional strikethrough, textTransform, & textScript properties at default values)
250255
},
251256
numAdded = assets.characterStyles.add([
252257
{ style: arialItalic }, // No name provided: uses default name

reference/scenegraph.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ Text bounds and layout work differently depending on the type of text:
15061506
&nbsp;<!-- prevent the bullet list above from running into this one -->
15071507
* [Text](#Text)
15081508
* [.text](#Text-text) : <code>string</code>
1509-
* [.styleRanges](#Text-styleRanges) : <code>!Array&lt;!{length:number, fontFamily:string, fontStyle:string, fontSize:number, fill:!Color, charSpacing:number, underline:boolean, strikethrough:boolean, textTransform:string}&gt;</code>
1509+
* [.styleRanges](#Text-styleRanges) : <code>!Array&lt;!{length:number, fontFamily:string, fontStyle:string, fontSize:number, fill:!Color, charSpacing:number, underline:boolean, strikethrough:boolean, textTransform:string, textScript:string}&gt;</code>
15101510
* [.fontFamily](#Text-fontFamily) : <code>string</code>
15111511
* [.fontStyle](#Text-fontStyle) : <code>string</code>
15121512
* [.fontSize](#Text-fontSize) : <code>number</code>
@@ -1515,6 +1515,7 @@ Text bounds and layout work differently depending on the type of text:
15151515
* [.underline](#Text-underline) : <code>boolean</code>
15161516
* [.strikethrough](#Text-strikethrough) : <code>boolean</code>
15171517
* [.textTransform](#Text-textTransform) : <code>string</code>
1518+
* [.textScript](#Text-textScript) : <code>string</code>
15181519
* [.flipY](#Text-flipY) : <code>boolean</code>
15191520
* [.textAlign](#Text-textAlign) : <code>string</code>
15201521
* [.lineSpacing](#Text-lineSpacing) : <code>number</code>
@@ -1541,7 +1542,7 @@ the new string's indices unless you explicitly change styleRanges as well.
15411542

15421543
<a name="Text-styleRanges"></a>
15431544

1544-
### text.styleRanges : <code>!Array&lt;!{length:number, fontFamily:string, fontStyle:string, fontSize:number, fill:\![Color](Color.md), charSpacing:number, underline:boolean, strikethrough:boolean, textTransform:string}&gt;</code>
1545+
### text.styleRanges : <code>!Array&lt;!{length:number, fontFamily:string, fontStyle:string, fontSize:number, fill:\![Color](Color.md), charSpacing:number, underline:boolean, strikethrough:boolean, textTransform:string, textScript:string}&gt;</code>
15451546
Array of text ranges and their character style settings. Each range covers a set number of characters in the text content. Ranges
15461547
are contiguous, with each one starting immediately after the previous one. Any characters past the end of the last range use the
15471548
same style as the last range.
@@ -1658,6 +1659,18 @@ Set textTransform ("none", "uppercase", "lowercase", or "titlecase") across all
16581659

16591660
* * *
16601661

1662+
<a name="Text-textScript"></a>
1663+
1664+
### text.textScript : <code>string</code>
1665+
**Default**: `"none"`
1666+
**Since**: XD 20
1667+
1668+
Set textScript ("none" or "superscript" or "subscript") across all style ranges, or get the textScript of the last style range.
1669+
1670+
**Kind**: instance property of [<code>Text</code>](#Text)
1671+
1672+
* * *
1673+
16611674
<a name="Text-flipY"></a>
16621675

16631676
### text.flipY : <code>boolean</code>

reference/structure/manifest.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,32 +81,26 @@ Key path | Type | Description | Required
8181
`host.app` | `string` | Indicates that this is a plugin for Adobe XD (currently, the only valid value here is `"XD"`). | Develop / Publish
8282
`host.minVersion` | `string` | Minimum required version of the host app (in `x.y` format) that can run this plugin. <br> **Note:** Must be two segments. Typically, you'll leave the minor segment set to `0`, e.g. `16.0`. | Develop / Publish
8383
`host.maxVersion` | `string` | Maximum version of host app that can run this plugin. Same formatting as `host.minVersion`. | Optional
84-
`uiEntryPoints` | <code>array&lt;MenuItemDefinition &#124; SubmenuDefinition&gt;</code> | Describes the entries your plugin adds to the _Plugins_ menu in XD. See the next section for details. | Develop / Publish
84+
`uiEntryPoints` | <code>array&lt;[MenuItemDefinition](#MenuItemDefinition)&gt;</code> | Describes the entries your plugin adds to the _Plugins_ menu & "plugin launchpad" sidebar in XD. See the next section for details. | Develop / Publish
8585

86-
## UI entry points array
86+
## UI entry points
8787

88-
The `uiEntryPoints` field is an _array_ of objects, and each object must match one of the two formats below. Items appear in the _Plugins_ menu in the same order as they're listed in the `uiEntryPoints` array.
88+
The `uiEntryPoints` field is an _array_ of objects matching the MenuItemDefinition format specified below. These entries appear both in the _Plugins_ menu in the native menubar, and the "plugin launchpad" sidebar panel.
8989

90-
_It is strongly encouraged to only add **one** item to `uiEntryPoints`_ -- either one top-level MenuItemDefinition, or one SubmenuDefinition containing multiple submenu items. In either case, this menu
91-
item should closely match the name of your plugin so it is easy to locate after installing (bear in mind the user may have a bunch of other plugins' entries in this menu already).
90+
* If only one entry point is specified, clicking the plugin name in the menu or in the launchpad sidebar runs your plugin command directly. There is no label to specify since the plugin name acts as the label.
9291

93-
### MenuItemDefinition (executable menu items)
92+
* If multiple entry points are specified, items are automatically grouped into a submenu and into a collapsible section in the launchpad sidebar. The overall submenu/section uses the plugin name as its label, but you
93+
must specify a label for each individual MenuItemDefinition. Items appear in the submenu/section in the same order as they're listed in the `uiEntryPoints` array.
94+
95+
### MenuItemDefinition
9496

9597
Key | Type | Description
9698
----|------|------------
9799
`type` | `string` | Entry point type. Currently `"menu"` is the only supported value.
98-
`label` | `string` or `Object` | Label for this menu item that the user will select to run your plugin. May be a single string _or_ an object containing localized strings (see "Menu Localization" below).
100+
`label` | <code>?string&#124;[LocaleMap](#menu-localization)</code> | _Required_ if multiple items defined; _ignored_ if only one defined (see above).<br><br> Label for this menu item that the user will select to run your plugin. May be a single string _or_ an object containing localized strings (see "Menu Localization" below).
99101
`commandId` | `string` | Identifier that links the menu item to a function in your plugin's JavaScript code. This identifier needs to be unique within your plugin. It can be whatever you like, but it makes sense to succinctly describe what the command will do.
100102
`shortcut` | `Object` | _Optional._ Object defining Mac and Windows keyboard shortcuts for this menu item, formatted as `{"mac": "string", "win": "string"}`. See "Keyboard shortcuts" below for details.
101103

102-
### SubmenuDefinition (submenu)
103-
104-
Key | Type | Description
105-
----|------|------------
106-
`type` | `string` | Entry point type. Currently `"menu"` is the only supported value.
107-
`label` | `string` or `Object` | Label for this submenu. May be a single string _or_ an object containing localized strings (see "Menu Localization" below).
108-
`menuItems` | `Array<MenuItemDefinition>` | Nested array specifying the menu items this submenu contains. Only a single submenu nesting level is supported, so this array may not contain any `SubmenuDefinition`s itself, only executable `MenuItemDefinition`s.
109-
110104
### Keyboard shortcuts
111105

112106
Keyboard shortcuts are defined separately for each platform (as seen in the example at the top of this tutorial). Each definition is a string that follows this syntax:

0 commit comments

Comments
 (0)