Skip to content

Commit 362a896

Browse files
authored
Updated sample.json + readme.md
1 parent 6908d7d commit 362a896

File tree

2 files changed

+49
-20
lines changed

2 files changed

+49
-20
lines changed
Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,54 @@
1+
# Form Factor Selector
2+
13
Form factor selection in editor
24

35
Allow you to change the form factor in edit mode, helping you to design responsive applications
46

5-
<img width="216" alt="msedge_rcavLxE04h" src="./assets/formfactorselector.png" />
7+
![Form Factor Selector](./assets/formfactorselector.png)
8+
9+
## Authors
10+
11+
Snippet|Author
12+
--------|---------
13+
David Zoonekyndt | [GitHub](https://github.com/DavidZoon) ([LinkedIn](https://www.linkedin.com/in/david-zoonekyndt/) )
614

7-
⚠️⚠️⚠️ Important:
15+
## Minimal path to awesome
816

9-
Set Gallery.Y to : -Self.Height
17+
1. Open your canvas app in **Power Apps**
18+
2. Copy the contents of the **[YAML-file](./source/formfactor.yaml)**
19+
3. Click on the three dots of the screen where you want to add the snippet and select "Paste"
1020

21+
### ⚠️⚠️⚠️ Important:
22+
23+
Set `Gallery.Y` to `-Self.Height`
24+
25+
You need to replace for<b> every screen</b> the following properties, otherwise screen will not be affected by your formfactor selection:
1126

12-
You need to replace for<b> every screen</b> properties, otherwise screen will not be affected by your formfactor selection :
27+
**Width**
1328

14-
Width :
15-
Max(App.Width, App.MinScreenWidth)
29+
Replace:
30+
```Max(App.Width, App.MinScreenWidth)```
31+
32+
by:
33+
```Coalesce(vFormFactor.Width,Max(App.Width, App.MinScreenWidth))```
34+
35+
**Height**
36+
37+
Replace:
38+
```Max(App.Height, App.MinScreenHeight)```
39+
40+
by:
41+
```Coalesce(vFormFactor.Height,Max(App.Height, App.MinScreenHeight))```
42+
43+
<img width="520" alt="sample_tablet_landscape" src="./assets/sample_tablet_landscape.png" />
44+
<img width="206" alt="sample_tablet_portrait.png" src="./assets/sample_tablet_portrait.png" />
45+
<img width="150" alt="phone_portrait.png" src="./assets/sample_phone_portrait.png" />
46+
47+
## Code
48+
**[YAML-file](./source/formfactor.yaml)**
1649

17-
by :
18-
Coalesce(vFormFactor.Width,Max(App.Width, App.MinScreenWidth))
19-
Height :
20-
Max(App.Height, App.MinScreenHeight)
50+
## Disclaimer
2151

22-
by :
23-
Coalesce(vFormFactor.Height,Max(App.Height, App.MinScreenHeight))
52+
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
2453

25-
<img width="520" alt="sample_tablet_landscape" src="./assets/sample_tablet_landscape.png" /><img width="206" alt="sample_tablet_portrait.png" src="./assets/sample_tablet_portrait.png" /><img width="150" alt="phone_portrait.png" src="./assets/sample_phone_portrait.png" />
54+
<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-snippets/power-apps/form-factor-selector" aria-hidden="true" />

power-apps/form-factor-selector/assets/sample.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"name": "pnp-powerplatform-snippets-form-factor",
55
"version": "1.0.0.0",
66
"source": "pnp",
7-
"creationDateTime": "2025-05-18T00:00:00.000Z",
8-
"updateDateTime": "2025-05-18T00:00:00.000Z",
9-
"title": "Form factor for power apps editor",
10-
"shortDescription": "Allow you to change the form factor in edit mode",
7+
"creationDateTime": "2025-07-13T00:00:00.000Z",
8+
"updateDateTime": "2025-07-13T00:00:00.000Z",
9+
"title": "Form Factor selector",
10+
"shortDescription": "Allows you to change the form factor in edit mode",
1111
"longDescription": [
12-
"Allow you to change the form factor in edit mode, helping you to design responsive applications. 5 formats are present : smartphone & tablet, landscape & portrait for both plus laptop. You can customize or add your own formats"
12+
"Allows you to change the form factor in edit mode, helping you to design responsive applications. 5 formats are present : smartphone & tablet, landscape & portrait for both plus laptop. You can customize or add your own formats"
1313
],
1414
"url": "https://github.com/DavidZoon/powerplatform-snippets/blob/main/power-apps/form-factor-selector/",
1515
"products": [
@@ -34,14 +34,14 @@
3434
{
3535
"type": "image",
3636
"order": 100,
37-
"url": "https://github.com/DavidZoon/powerplatform-snippets/raw/main/power-apps/form-factor-selector/assets/formfactorselector.png",
37+
"url": "https://raw.githubusercontent.com/pnp/powerplatform-snippets/main/power-apps/form-factor-selector/assets/formfactorselector.png",
3838
"alt": "Preview PNG"
3939
}
4040
],
4141
"authors": [
4242
{
4343
"gitHubAccount": "DavidZoon",
44-
"name": "Dvid Zoonekyndt",
44+
"name": "David Zoonekyndt",
4545
"pictureUrl": "https://github.com/DavidZoon.png"
4646
}
4747
]

0 commit comments

Comments
 (0)