Skip to content

Commit 4071512

Browse files
authored
Merge pull request #9484 from MicrosoftDocs/gachasta-patch-1
Adding Auto mode and removing some restrictions
2 parents cdc084d + df1bc29 commit 4071512

File tree

2 files changed

+40
-62
lines changed

2 files changed

+40
-62
lines changed
Lines changed: 24 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,34 @@
11
---
2-
title: Optimize for devices controls (preview)
2+
title: Optimize for devices (preview)
33
description: Learn which controls and properties are supported for device-optimized screens.
44
author: anuitz
55
ms.topic: conceptual
66
ms.custom: canvas
77
ms.reviewer: sericks
8-
ms.date: 03/14/2024
8+
ms.date: 05/01/2024
99
ms.subservice: canvas-maker
1010
ms.author: anuitz
1111
search.audienceType:
1212
- maker
1313
contributors:
14-
- sericks
15-
- anuitz
14+
- gachasta
15+
- sericks
1616
ms.contributors:
1717
- devangpandya
1818
---
1919

20-
# Optimize for devices controls (preview)
21-
22-
[This article is prerelease documentation and is subject to change.]
23-
24-
For a screen to be optimized for devices, it must use controls that are supported natively. You can filter the control **Insert** pane to only show device-optimized controls.
20+
# Optimize for devices (preview)
2521

22+
For a screen to be optimized for devices, it must use controls that are supported natively. You can filter the control Insert pane to only show device-optimized controls.
2623
:::image type="content" source="media/optimized-for-devices-control-filter.png" alt-text="The Insert pane is filtered to only show controls that are device-optimized.":::
2724

2825
> [!Important]
29-
> - This is a preview feature.
26+
> - This is a preview feature. Documentation is subject to change.
3027
> - Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.
3128
3229
## Device-optimized controls
3330

34-
The following controls are available for screens that are optimized for devices. All other controls are currently unsupported.
35-
36-
### [Modern controls](../maker/canvas-apps/controls/modern-controls/modern-controls-reference.md)
37-
38-
- Button
39-
- Check box
40-
- Date picker
41-
- Text
42-
- Text input
43-
- Toggle
44-
45-
#### Turn on modern controls
46-
47-
Makers must complete the following steps to turn on modern controls and themes for an app.
48-
49-
1. Sign in to [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc).
50-
1. In the navigation pane, select **Apps**.
51-
1. Select an app.
52-
1. Select **Settings** in the command bar.
53-
1. In the **Settings** window, select **General**.
54-
1. Turn on the **Modern controls and themes** option.
31+
The following controls are optimized for iOS and Android devices. All other controls are currently unsupported. A screen that has one or more unsupported controls automatically renders in a web view instead of native UI. Learn more: [Optimize for devices overview](optimize-for-devices-overview.md).
5532

5633
### [Controls](../maker/canvas-apps/reference-properties.md)
5734

@@ -64,6 +41,7 @@ Makers must complete the following steps to turn on modern controls and themes f
6441
- Circle
6542
- Components
6643
- Container (horizontal and vertical included)
44+
- Form
6745
- Gallery (vertical, horizontal, flexible height)
6846
- Icon (all icons supported)
6947
- Image
@@ -73,34 +51,39 @@ Makers must complete the following steps to turn on modern controls and themes f
7351
- Text label
7452
- Timer
7553

76-
## Unsupported controls
54+
### [Modern controls](../maker/canvas-apps/controls/modern-controls/modern-controls-reference.md)
55+
56+
- Button
57+
- Check box
58+
- Date picker
59+
- Text
60+
- Text input
61+
- Toggle
62+
63+
Learn more: [Overview of modern controls and themes in canvas apps](../maker/canvas-apps/controls/modern-controls/overview-modern-controls.md)
7764

78-
If a screen is set for optimization for devices, but has an unsupported control, you see an error message in a box.
65+
## Unsupported controls
7966

80-
:::image type="content" source="media/optimized-for-devices-control-error.png" alt-text="The error that shows when an unsupported control is on a screen set to optimize for devices.":::
67+
If a screen has an unsupported control, the screen automatically reverts to render with a web view.
8168

8269
## Device-optimized properties
8370

84-
Some properties must be configured so they're optimized for devices. For example, consider the [barcode reader](../maker/canvas-apps/controls/control-barcodereader.md) control. The maker can select **Scan Inline** for the **Scanning mode** property. In Power Apps Studio, when this mode is selected, the control displays as a warning box indicating the control only works on mobile devices. On a device, in a screen optimized for devices, the control displays a camera feed to enable barcode scanning.
71+
Some properties must be configured so they're optimized for devices. For example, consider the [barcode reader](../maker/canvas-apps/controls/control-barcodereader.md) control. The maker can select **Scan Inline** for the **Scanning mode** property. In Power Apps Studio, when this mode is selected, the control displays as a warning box indicating that the control only works on mobile devices. On a device, in a screen optimized for devices, the control displays a camera feed to allow barcode scanning.
8572

8673
## Known limitations
8774

8875
Note the following limitations with the 'optimize for devices' feature.
8976

90-
- Only the **Segoe UI** font is supported. If a control is using another font, it displays the Segoe UI font instead. Due to the differences in fonts, the control can take up more or less space than expected. We recommend that you use the Segoe UI font for device-optimized screens.
91-
- The **Image** control, when showing an SVG, only supports the fit and stretch image position options. Its default behavior is to fit, if another option is selected. All other image types work as expected for all image positions.
92-
- In the **modern Text** control, the **Semi-bold** and **Medium** font weights aren't supported on Android devices. It displays a regular font weight instead.
77+
- The **Image** control, when showing an SVG file, only supports the fit, fill, and stretch image position options. Its default behavior is to fit, if another option is selected. All other image types work as expected for all image positions.
9378
- In the **modern Text input** control, the **Value** property, when set to a Power Fx variable, isn't displayed at first navigation. Instead, it shows the placeholder value until the user navigates away and back to the screen with the **modern Text input** control.
94-
- In the **modern Text input** control, the **OnChange** property is called twice when the control is exited, and then blurred.
79+
- In the **modern Text input** control, the **OnChange** property is called each time the user interacts with the control, instead of when navigating away from the control.
9580
- In the **modern Text input** control, the **Validate state** property doesn't display a red border around the control.
9681
- In the **Image** control, the **Image rotation** property isn't supported. The image isn't rotated.
9782
- In the **Dropdown** and **Radio** control, the **Items** property doesn't support references to other controls. Items aren't shown if they're complex values, like references.
9883
- In the **modern Date picker** control, tapping on the control opens a modal with a calendar instead of allowing users to type into the control directly.
9984
- In the **modern Date picker** control, the **Base palette color** and modern theme aren't applied on Android devices. Instead, it displays as the device's theme color.
10085
- In the **Button**, **Image**, **Label**, and **Icon** controls, the **SetFocus** Power Fx function doesn't support keyboard focus, only accessibility focus (for example, screen reader).
101-
- In **Horizontal and vertical containers**, the **Drop shadow** property isn't supported. Instead, containers display without drop shadow.
10286
- In **Horizontal and vertical containers**, the **Scroll** option only works for a single direction, depending on the **Wrap** property. If **Wrap** is off, the container is scrollable in the primary direction, otherwise it's scrollable in the secondary direction.
10387
- Multiple **Barcode reader** controls on a single screen aren't supported.
10488
- Multiple **Camera** controls on a single screen aren't supported.
10589
- In the **Camera** control, the **Display mode** property of the parent control isn't supported. For example, if the camera control is part of a form that is set to view mode, the camera might still be in edit mode.
106-
- On **Screen**, the **Background image** property isn't supported.

powerapps-docs/mobile/optimize-for-devices-overview.md

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,47 @@ author: anuitz
55
ms.topic: conceptual
66
ms.custom: canvas
77
ms.reviewer: sericks
8-
ms.date: 11/14/2023
8+
ms.date: 05/01/2024
99
ms.subservice: canvas-maker
1010
ms.author: anuitz
1111
search.audienceType:
1212
- maker
1313
contributors:
1414
- sericks
1515
- anuitz
16+
- gachasta
1617
---
1718

1819
# Optimize for devices overview (preview)
1920

2021
[This article is prerelease documentation and is subject to change.]
2122

22-
_Optimize for devices_ is a feature that changes the way canvas app screens are loaded and displayed for Android and iOS devices that use native UI. This feature lets makers build stunning native apps for mobile users with device-optimized screens that use native UI elements instead of rendering inside of web view. This feature provides the following benefits:
23+
**Optimize for devices** is a feature that changes the way canvas app screens are loaded and displayed on Android and iOS devices. This feature lets makers build stunning, native apps for mobile users with device-optimized screens that use native UI elements, instead of rendering inside of web view. Device-optimizes screens provide the following benefits:
2324

24-
- Brings modern mobile user experiences and interaction patterns
25-
- Improves performance and reliability
26-
- Integrates device capabilities with maker-defined UI
25+
- Modern mobile user experiences and interaction patterns
26+
- Improved performance and reliability
27+
- Integrated device capabilities with maker-defined UI
2728

28-
There's no need to rebuild apps as makers can use all the familiar app building elements to create device-optimized experiences, though there are some limitations around which [controls are supported natively today](./optimize-for-devices-controls.md). Apps that are optimized for devices work with other mobile features like [offline](./canvas-mobile-offline-overview.md), [push notifications](./power-apps-mobile-notification.md), and [wrap](../maker/common/wrap/overview.md).
29+
There's no need to rebuild apps as makers can use all the familiar app-building elements to create device-optimized experiences, though there are some [limitations](./optimize-for-devices-controls.md). Apps that are optimized for devices work with other mobile features such as [offline](./canvas-mobile-offline-overview.md), [push notifications](./power-apps-mobile-notification.md), and [wrap](../maker/common/wrap/overview.md).
2930

3031
> [!Important]
3132
> - This is a preview feature.
3233
> - Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.
3334
34-
## How screens are optimized for devices
35-
36-
For a canvas app running on Power Apps mobile, there are UI elements, their current state, and the related business logic. For example, on a screen you might have a button at position 0 with a width and height of 200 and 40 respectively and with fill color blue. The business logic, with Power Fx, lets you navigate the user to a different screen.
3735

38-
If 'optimize for devices' is off for that screen, the screen loads and displays in a web view, running similarly to how it would in a desktop's web browser. When optimized for devices is on, each element's current state is passed over to the device where it renders that same element, but using native UI. So now we have a natively rendered, long blue button in the upper-left corner. Business logic modifies state or takes actions, which run the same way it did before. When the natively rendered button is selected, the device runs Power Fx and the user is navigated to the specified screen.
39-
40-
Each [control needs a device-optimized](./optimize-for-devices-controls.md), native equivalent that supports the same properties so it can render the way a maker expects. During preview, there are some [limitations](optimize-for-devices-controls.md#known-limitations) to which controls and properties are supported. Whether a control is classic or modern, it filters the list of controls for device-optimized ones.
36+
## Allow screens to be device-optimized
4137

42-
## Enable screens to be device-optimized
38+
1. Select **Settings** > **Upcoming features** > **Preview** > **Optimize for devices**.
39+
2. Only use supported controls on the screen.
4340

44-
There are two steps to enabling a screen to be optimized for devices.
41+
After this feature is turned on, you can find which controls are supported in the **Insert** pane by selecting the **Device optimized (preview)** filter. Learn more about [which controls are supported natively today](./optimize-for-devices-controls.md).
4542

46-
1. The **Optimize for devices** experimental app setting must be turned on.
43+
Screens made solely with device-optimized controls automatically render natively on Android and iOS devices. An app can have screens which are optimized, while some others aren't. This only depends on the controls chosen by the maker to create that screen.
4744

48-
The setting can be found in the **Settings** > **Upcoming features** > **Experimental** tab. Turning on the **Optimize for devices** app setting shows the **Optimize for devices** property on screens.
49-
50-
:::image type="content" source="media/optimized-for-devices-app-setting.png" alt-text="Shows the app setting that enables Optimize for devices.":::
45+
## How screens are optimized for devices
5146

52-
2. On each screen, the **Optimize for devices** property must be set to **On**.
47+
For a canvas app running on Power Apps mobile, there are UI elements, their current state, and the related business logic that determines how screens are optimized. For example, on a screen you might have a button at position 0, with a width and height of 200 and 40 respectively, and with fill color blue. The business logic, with Power Fx, lets you navigate the user to a different screen.
5348

54-
A maker can open the tree view in the navigation pane and select a screen where the **Optimize for devices** property is located. By setting this property to **On**, the screen is rendered natively when running on Power Apps mobile in iOS and Android devices.
49+
If the **Optimize for devices** option is off for that screen, the screen loads and displays in a web view, running similarly to how it would in a desktop's web browser. When **Optimize for devices** is on, each element's current state is passed over to the device where it renders that same element, but using native UI. So now we have a natively rendered, long blue button in the upper-left corner. Business logic modifies state or takes actions, which runs the same way it did before. When the natively rendered button is selected, the device runs Power Fx and the user is navigated to the specified screen.
5550

56-
:::image type="content" source="media/optimized-for-devices-screen-setting.png" alt-text="Shows the screen setting that sets the screen to display natively.":::
51+
Each [control needs a device-optimized](./optimize-for-devices-controls.md), native equivalent that supports the same properties so it can render the way a maker expects. During preview, there are some [limitations](optimize-for-devices-controls.md#known-limitations) to which controls and properties are supported. Whether a control is classic or modern, it filters the list of controls for device-optimized ones.

0 commit comments

Comments
 (0)