|
2 | 2 |
|
3 | 3 | ## XD Release 21.0.12 (July 2019)
|
4 | 4 |
|
5 |
| -### UI Changes |
| 5 | +XD 21 adds major updates: the ability to **show panel UI**, and the much-improved **UXP 3 CSS & layout engine**. |
6 | 6 |
|
7 |
| -* Display changes should no longer cause random crashes. |
8 |
| -* Plugins can now display persistent UI in the plugin panel. More information: [Panel Quick Start](./tutorials/quick-start-panel/index.md), [Migrating from Modals to Panels](./tutorials/how-to-migrate-from-modal-to-panel/index.md), [Panel Reference](./reference/ui/panels/index.md). |
| 7 | +_The new layout engine likely constitutes a **breaking change** for any plugin with UI_ -- read below for details. |
9 | 8 |
|
10 |
| -### XD API Changes |
| 9 | +### Plugin Panel UI |
11 | 10 |
|
| 11 | +* Plugins can now display UI persistently in a side panel. More information: |
| 12 | + * [How to define a panel](./reference/structure/handlers.md#panel) |
| 13 | + * [Panel overview / reference](./reference/ui/panels/index.md) |
| 14 | + * [Panel Quick Start tutorial](./tutorials/quick-start-panel/index.md) |
| 15 | + * [Migrating from dialogs to panels](./tutorials/how-to-migrate-from-modal-to-panel/index.md). |
12 | 16 | * A new default stylesheet is provided for plugin UI that renders inside a plugin. This means that UI that renders in one manner in a modal dialog may not render in the same exact manner in a panel.
|
13 |
| -* Default styles are now easier to override as the specificity in the default stylesheet has been reduced. |
14 |
| - |
15 | 17 |
|
16 |
| -### UXP API Changes |
| 18 | +### UXP 3 HTML/CSS changes |
17 | 19 |
|
18 |
| -UXP provides several common APIs to XD, including File I/O, Networking, and the User Interface layer. XD 21 now ships with version 3.1 , and as such, there are lots of new features you can take advantage of. In order to gain access to these features, your plugin must _opt-in_ to the UXP 3.1 layout by changing the `host.minVersion` key in the `manifest.json`: |
| 20 | +In order to gain access to most of these features, your plugin must _opt-in_ to the UXP 3.1 layout engine by changing the `minVersion` in your `manifest.json`: |
19 | 21 |
|
20 |
| -```js |
21 |
| -{ |
| 22 | +```json |
22 | 23 | "host": {
|
23 | 24 | "minVersion": "21.0"
|
24 | 25 | }
|
25 |
| -} |
26 | 26 | ```
|
27 | 27 |
|
28 | 28 | > **NOTE:** Without this change, your plugin will run in [backwards-compatibility mode](./migrations/uxp-2-to-3.md).
|
29 | 29 |
|
30 |
| -* **Inline layout**. This means you now have the ability to write code like `<p>This is <a href="...">a link</a></p>` and have the link render _inline_ with the rest of the text. This is **huge**, but it can also create a tremendous impact on your plugin's layout as _the default layout for an HTML element_ now more closely aligns with the Web specification. This means that `span` elements will render with `inline`, `button`s will render as `inline-block`, etc. This means that some elements may no longer render as they did in the previous version of UXP. |
31 |
| -* **CSS Variables**. You can now use CSS variables to help apply themes and other layout to your plugin. |
32 |
| -* **`calc`**. You can use `calc` to calculate lengths in your CSS. For example, `width: calc(100% - 9px)`. Note that you can mix units, just like you can on the web. |
33 |
| -* **Units**! The previous version of UXP understood `px` and `%`, but this version understands nearly all of them. You can use `rem`, `em`, `px`, `pt`, `vh`, `vw`, `cm`, `in`, etc. **NOTE:** If you previously didn't specify units in your CSS, you should start. Values (other than `0`) without units will be ignored. |
34 |
| -* **Fixed positioning**. `position: fixed` is now technically supported, but _should not be used in panels_. It can be used in dialogs to anchor your element to a fixed position in its container, regardless of scrolling position. This is most useful for plugins that want to live within a panel. **KNOWN ISSUE:** Do not use in panels, as it is possible for a plugin to partially escape the normal bounds of a panel when using `position: fixed`. This will be addressed in the future, but the fix **will break** your plugins in the future. |
35 |
| -* **z-index**. You can now stack your element using `z-index`. |
36 |
| -* **Additional property values**: The CSS parser now understands `initial`, `unset`, and `inherit`. You can also use `!important` to override styles (although you should use this as a last resort). |
37 |
| -* **Linear gradient support**: You can now use the CSS syntax for linear gradients. |
38 |
| -* **Outline support**: You can assign an outline to your elements with the `outline` rule. |
39 |
| -* **object-fit**: You can use `object-fit` to better control the size of images and other elements,. |
40 |
| -* **New pseudo-selectors**: `:lang` and `:focus` are now available. |
41 |
| -* **Tab index, v1**: Setting `tab-index` to `0` will now cause any element to be focusable. You can **not** yet control the tab order. |
42 |
| -* **Improved default for `overflow`**: `overflow` now defaults to `visible`, not `hidden`, as per the web specification. |
43 |
| - |
| 30 | +* **Layout engine** |
| 31 | + * **Inline layout** -- You now have the ability to write code like `<p>This is <a href="...">a link</a></p>` and have the link render _inline_ with the rest of the text |
| 32 | + * **Layout now defaults to inline** (no longer flexbox) -- This has a tremendous impact on pre-existing plugin UI code: now `span` elements will render with `inline`, `button`s will render as `inline-block`, etc. |
| 33 | + * **`overflow` defaults to `visible`** (no longer `hidden`), as per the web specification |
| 34 | + * `object-fit` -- to control the size of images |
| 35 | + * `z-index` |
| 36 | +* **SVG UI elements** |
| 37 | +* **New UI controls** |
| 38 | + * Radio buttons -- `<input type="radio" />` |
| 39 | + * Progress bars & spinners -- `<progress>` |
| 40 | +* **CSS improvements** |
| 41 | + * `linear-gradient()` |
| 42 | + * `outline` |
| 43 | + * More units! -- UXP now understands `rem`, `em`, `px`, `pt`, `vh`, `vw`, `cm`, `in`, etc. **NOTE:** UXP will now start ignoring values (other than `0`) that don't specify any units, which can break older plugin UI code. |
| 44 | + * CSS Variables -- easily apply themes and other layout to your plugin. |
| 45 | + * More pseudo-selectors -- `:lang` and `:focus` |
| 46 | + * `calc()` -- For example, `width: calc(100% - 9px)`. Note that you can mix units, just like you can on the web. |
| 47 | + * Inheritance -- The CSS parser now understands `initial`, `unset`, and `inherit`. You can also use `!important` to override styles (although you should use this as a last resort). |
| 48 | + * Default styles are now easier to override as the specificity in the default stylesheet has been reduced. |
| 49 | +* _Basic_ **Tab index** support: Setting `tab-index` to `0` will now cause any element to be focusable. You can **not** yet control the tab order. |
44 | 50 |
|
45 | 51 | ### Known Issues
|
46 | 52 |
|
47 | 53 | See the [Known Issues page](./known-issues.md) for a comprehensive list of existing known issues.
|
48 | 54 |
|
| 55 | + |
| 56 | +---- |
| 57 | + |
49 | 58 | ## XD Release 20.0.12 (June 2019)
|
50 | 59 |
|
51 | 60 | ### UI Changes
|
|
0 commit comments