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

Adding the developer mode requirement to PWA widgets doc #2800

Merged
merged 3 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 13 additions & 4 deletions microsoft-edge/progressive-web-apps-chromium/how-to/widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In Windows 11, Progressive Web Apps (PWAs) can define widgets, update them, and
<!-- ------------------------------ -->
#### Requires building a custom widget for the PWA

An existing PWA cannot simply be placed into the widget dashboard as-is, like you can with the Microsoft Edge Sidebar. Instead, you need to build a custom widget experience that's appropriate for the widget host, which currently is the Win11 Widgets Board. (There may be other widget hosts in the future.) The Win11 Widgets Board requires widgets to be built by using Adaptive Card templates instead of HTML and JavaScript, so the widget has to be designed separately from the rest of the app's UI.
An existing PWA cannot simply be placed into the widget dashboard as-is, like you can with the Microsoft Edge Sidebar. Instead, you need to build a custom widget experience that's appropriate for the widget host, which currently is the Windows 11 Widgets Board. (There may be other widget hosts in the future.) The Windows 11 Widgets Board requires widgets to be built by using Adaptive Card templates instead of HTML and JavaScript, so the widget has to be designed separately from the rest of the app's UI.

See also:
* [Build PWAs for the sidebar in Microsoft Edge](./sidebar.md)
Expand All @@ -35,9 +35,18 @@ See also:


<!-- ====================================================================== -->
## Install WinAppSDK
## Install WinAppSDK and enable Developer Mode

To enable developing widgets on your local machine, install [WinAppSDK 1.2](/windows/apps/windows-app-sdk/older-downloads#windows-app-sdk-12).
To enable developing and testing widgets on your local machine:

* Install [WinAppSDK 1.2](/windows/apps/windows-app-sdk/older-downloads#windows-app-sdk-12).
* Enable Developer Mode in Windows 11:

1. Open **Settings**.
1. In the **Find a setting** textbox, enter `developer`, and then click **Use developer features**.
1. Enable **Developer Mode**:

![The Developer settings of Windows 11](./widgets-images/developer-mode.png)


<!-- ====================================================================== -->
Expand Down Expand Up @@ -400,7 +409,7 @@ async function updateWidget(widget) {

PWAmp is a music player PWA demo application that defines a widget. The PWAmp widget lets users visualize the current song and play the previous or next songs.

1. If not done yet, install [WinAppSDK 1.2](/windows/apps/windows-app-sdk/older-downloads#windows-app-sdk-12).
1. If not done yet, install [WinAppSDK 1.2](/windows/apps/windows-app-sdk/older-downloads#windows-app-sdk-12) and enable Developer Mode in Windows 11.

1. Go to [PWAmp](https://microsoftedge.github.io/Demos/pwamp/) and install the app on Windows 11.

Expand Down