Fwd: Using WebAppKind instead of bool force_shortcut_app

10 views
Skip to first unread message

Alexey Baskakov

unread,
Feb 6, 2020, 12:11:10 AM2/6/20
to web-apps-pl...@chromium.org, Sunggook Chue, Jason McConnell


---------- Forwarded message ---------
From: Alexey Baskakov <lo...@chromium.org>
Date: Thu, Feb 6, 2020 at 3:18 PM
Subject: Fwd: Using WebAppKind instead of bool force_shortcut_app
To: <web-apps-pl...@chromium.org>


+web-apps-pl...@chromium.org

Hi, Sunggook and Jason!

Thanks for the nice question!

At the moment, we are trying to unify website shortcuts and Desktop PWAs. 
In terms of code, I would rather remove `force_shortcut_app` rather than split it into enum.

Moreover, we already have so many indirect "kinds" of PWAs (differentiated by InstallSource, ExternalInstallSource, InstallParams,
ForInstallableSite enum etc). We would like to reduce those app parameters and app install parameters (that's a separate thing).
In the long term, we have an idea to create some unified AppTraints parameter object.

As you can see, this is complicated (not to mention the product side of things).
Let's discuss everything in web-apps-pl...@chromium.org public group, where all stakeholders can express their thoughts on
this.
 
With Best Regards,
Alexey.

---------- Forwarded message ---------
From: Sunggook Chue <sun...@microsoft.com>
Date: Thu, Feb 6, 2020 at 10:56 AM
Subject: Using WebAppKind instead of bool force_shortcut_app
To: Alexey Baskakov <lo...@google.com>
Cc: Jason McConnell <jaso...@microsoft.com>


Hi Alexey,

 

I’m thinking to upgrade the interface API of web_app::InstallWebAppFromManifestWithFallback and the related apps where it receives force_shortcut_app parameter.

 

From

void InstallWebAppFromManifestWithFallback(

      content::WebContents* contents,

      bool force_shortcut_app,

 

 

To

  void InstallWebAppFromManifestWithFallback(

      content::WebContents* contents,

      WebAppKind app_kind,

 

enum class WebAppKind {

  kPwa,

  kShortcut,

};

 

The main reason is to accommodate the additional Web App type from the Edge. Edge browser supports 3 different Web App types; PWA, Installed Site, Pinned Site. These Web Apps has slight different UI experience and the decision is made in the WebAppInstallTask::OnDidPerformInstallableCheck.  I’ve tried to fork the code from the Edge side only, but realized that enum based WebApp type seems better than simple bool and Edge can avoid potential merge conflict.

 

Please let me know what you think?

 

Thanks,

Sunggook

 

Sunggook Chue

unread,
Feb 11, 2020, 4:52:48 PM2/11/20
to Alexey Baskakov, web-apps-pl...@chromium.org, Jason McConnell

Hi Alexey,

 

Did you mean to use existing parameter such as “WebappInstallSource install_source “ instead of ‘force_shortcut_app’ or new kind param?  Can you elaborate your suggestion?

Alexey Baskakov

unread,
Feb 11, 2020, 6:51:23 PM2/11/20
to Web Apps Platform Team, lo...@chromium.org, jaso...@microsoft.com
Hi, Sunggook!

I mean that there is a separate big sub-project to refactor the whole web_app::InstallManager API.
We want to have less parameters, not more.

For now, this refactoring is blocked on the legacy bookmark apps implementation.

Alexey.


On Wednesday, February 12, 2020 at 8:52:48 AM UTC+11, Sunggook Chue wrote:

Hi Alexey,

 

Did you mean to use existing parameter such as “WebappInstallSource install_source “ instead of ‘force_shortcut_app’ or new kind param?  Can you elaborate your suggestion?

 

From: Alexey Baskakov <lo...@chromium.org>
Sent: Wednesday, February 5, 2020 9:11 PM
To: web-apps-platform-team@chromium.org; Sunggook Chue <sun...@microsoft.com>; Jason McConnell <jaso...@microsoft.com>
Subject: [EXTERNAL] Fwd: Using WebAppKind instead of bool force_shortcut_app

 

---------- Forwarded message ---------
From: Alexey Baskakov <lo...@chromium.org>
Date: Thu, Feb 6, 2020 at 3:18 PM
Subject: Fwd: Using WebAppKind instead of bool force_shortcut_app


Thanks for the nice question!

 

At the moment, we are trying to unify website shortcuts and Desktop PWAs. 
In terms of code, I would rather remove `force_shortcut_app` rather than split it into enum.

Moreover, we already have so many indirect "kinds" of PWAs (differentiated by InstallSource, ExternalInstallSource, InstallParams,
ForInstallableSite enum etc). We would like to reduce those app parameters and app install parameters (that's a separate thing).
In the long term, we have an idea to create some unified AppTraints parameter object.

As you can see, this is complicated (not to mention the product side of things).

Let's discuss everything in web-apps-platform-team@chromium.org public group, where all stakeholders can express their thoughts on

Reply all
Reply to author
Forward
0 new messages